From Thinking To Code
From Thinking To Code
Now we can finally return to something that beginners usually encounter first: the programming language. But notice how much thinking has already happened before we reached it. We understood the machine, recognised that information becomes data, learned to represent that data, turned problems into algorithms, and learned to use sequence, selection, iteration and decomposition to construct solutions. Only now do we need a language to express those solutions. Imagine that you have figured out exactly how to explain a complicated idea to another person. You know what you want to say, the order in which you want to say it, and the examples you need. Now imagine that the person speaks a different language. Your thinking has not changed. You simply need to translate your idea into words they understand. Programming languages work in a similar way. Python, Java, C and other languages give programmers different ways to express computational ideas. Their syntax may look different, but underneath, they still have to describe operations that the computer can ultimately execute. This is why learning a new programming language becomes much easier once you understand programming itself. You don't start from zero. You already know how to think about the problem. You are learning a new way to express that thinking. A beginner often thinks, “I know Python, therefore I know programming. ” A programmer eventually realises the relationship is almost the opposite: “I understand programming, therefore I can learn Python. ” The language is the instrument. Problem-solving is the music.
