Introduction: The Way of the Program¶
The goal of this book is to teach you to understand and create computer programs. You will use that ability to shed light on how people and computers are alike and different as processors of information. You will also use that ability to create programs that process information created by people, information about people, and information for people. In other words, this book provides a human-centric view of computer programming.
Understanding computer programs requires algorithmic, mechanistic thinking. Programs specify mechanistic sequences of actions to perform; when executed, they transform input data into output data. They execute very reliably, and very fast, but not creatively. Computers do what you tell them to do, not you mean for them to do. Understanding computer code, and especially debugging it, involves a lot of mental simulation of what will actually happen, not what you wish would happen.
Writing computer programs requires not only mechanistic thinking but creative problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity to practice problem solving skills. That’s why this chapter is called, The Way of the Program.
On one level, you will be learning to program, a useful skill by itself. On another level, you will use programming as a means to an end. As we go along, that end will become clearer.