Everywhere in the world and business, there is software. In almost all industries, both software and computer programming are critical to daily life and business success. As a result, being a software developer is a dream for many.
In this article, we’ll look at how to think like a programmer.
From performing basic calculations to running complex, dynamic software, computers are capable of many things. The computer does all these using three main parts; the CPU, Memory, and Input/output devices.
This is the computer’s storage unit. There are primary and secondary memories.
Primary memory is the computer’s default memory and is easily accessible. The most common primary memory devices are the Read-Only Memory (ROM) and Random Access Memory (RAM).
ROM has programs and non-editable data for basic operations, for instance, instructions to turn on the computer. However, ROM cannot store any new data or programs.
RAM stores data currently in use. If RAM is exhausted, the computer will store extra programs in secondary storage. In addition, RAM is volatile, contrary to ROM, meaning it’s wiped whenever the computer is off.
Secondary memory includes hard drives and hard disks. These storages are for mass storage and are non-volatile. Secondary memories are not accessible to the CPU. Instead, they are first loaded to the RAM then fed to the processor.
This processes and executes instructions and commands fed to the computer. It has three components: Control Unit, Arithmetic Logic Unit, and Registers.
The control Unit recovers commands from the RAM and decides which part of the CPU should execute them.
Arithmetic Logic Unit carries out all instructions containing mathematical or logic operations.
Registers are small volatile locations of memory within the CPU. Registers stores data temporarily while speeding a program by running performance. Registers are much smaller than RAM, so they can only store a small amount of data.
The devices allow the computer to interact with input devices that enable the user to control the computer. They also allow output devices that will enable the computer to display feedback to the user.
These are a sequence of instructions and commands that we write to perform a task with a computer.
Reasons for programing language
All the parts of a computer process data and instructions are called binary. Binary is a collection of 1s and 0s in a particular order. Unfortunately, humans cannot understand binary strings.
Programming languages fill the gap between humans and computers by providing a medium between human language and binary code essential for program writing. In addition, high-level languages are easy-to-read computer languages.
Programmers first write programs in a high-level programming language like python. The computer then sends it to the interpreter or compiler, which converts it into binary instructions. The instructions can then pass to the CPU for execution.
Thinking like a programmer
Writing in a programming language requires a unique style of solving problems. Computers finish an instruction at a time. Thus, problem-solving requires one to focus on simplifying problems into steps. This often takes time to learn.
It’s easy for senior developers to miss incremental steps when planning a program due to how we think daily. Expose yourself to new challenges to learn more in this field.