Computers exist for one purpose: to help us do things. But they aren’t independent thinkers; they’re machines built to execute our commands. They always need you to tell them what to do. What computers do have is excellent memory and speed that enable them to process vast amounts of information with unprecedented efficiency.
The CPU (central processing unit) is the closest thing computers have to a brain. It's designed to read instructions and execute them in a process called the fetch-execute cycle. It fetches instructions from the main memory and executes them one at a time. The speed at which the computer executes these instructions is called a clock speed, measured in cycles per second, or 1 hertz. The hertz determines how many times a computer can execute instructions in a second. So a CPU with a clock speed of 3 gigahertz (GHz) executes 3 billion instructions per second. The higher the gigahertz, the faster the computer can execute instructions.
(By the way, here’s how to check your computer’s GHz: For Windows users, click on the Windows Start icon at the bottom-left corner of your screen, go to Systems >> About, and check Processor under Device specifications. For Mac users, click on the Apple icon in the top-left corner of your screen, then click About this Mac; or, on the terminal, enter sysctl -n machdep.cpu.brand_string.
)
OK, back to our discussion.
To describe a task to a computer, you need to be able to speak its language. It's much easier to learn the language of computers than for them to learn ours.
Programmers know the way of computer programs. We put many different instructions into the memory of the computer, which it executes line by line. Code. Software. Program. These all refer to the same thing:
a sequence of instructions
a little piece of our intelligence in the computer
a work of creative art (yes, there’s art in programming)
Because computers aren’t autonomous thinkers (although this is about to change, with the rise of autonomous agents), to use them to solve problems effectively, you must first have a thorough understanding of the problem itself and the possible ways in which it could be solved. Programmers do this using four techniques:
decomposition — breaking down the problem into smaller, manageable steps
abstraction — focusing only on the most important details, ignoring the rest
pattern recognition — sifting through data looking for similarities among and within problems; how have other people solved similar problems in the past?
algorithm design — developing a recipe, a step-by-step solution to the problem. (If you follow this recipe sequentially, you should arrive at the delicious solution).
The sum of all these techniques is called computational thinking
But programming isn't about languages. It's about solving problems with computers. Users just want something that works; they don't care what language you use to create it. So in the end, the language you choose doesn't really matter. What matters is empathizing with users' needs and writing computer code to create software that addresses those needs. Programming is about explaining instructions to the dump computer.
The secret ingredients that power software isn't code or language. It's algorithms (precisely stated sets of instructions to solve a problem; a recipe for a solution) and data (factual information; the raw materials programmers use to create their solutions). And both of these have nothing to do with a specific language.
Programming is simply the art of problem-solving. The first step to becoming a programmer is learning how to think like one. And knowing how to organize actions coherently and predict outcomes is what makes a skillful programmer.