Thoughts on learning to program

Learning to program your computer? Wondering why should I learn to program a computer? Trying to teach computer programming? For some time I’ve been trying to find the words to explain things like:

  • Why is programming such a rewarding occupation and/or hobby?
  • Why does a little bit of programming knowledge help you get more out of your machine?
  • Does knowing how to program change the way you think?

While I ponder this further, here are some thoughts from others along the same lines - maybe you will find some inspiration in their words.

Taming the beast

The best reason for [people] to learn to program is that they thereby are telling the machine what to do — they are in control. If they must always rely on programs written by others, they are at the programmers’ mercy; [people] may or may not want to do what the programmers think they want to do.

– Eric Johnson
Humanists and Programming

Computer users are now told “You don’t have to learn to program to use a computer.” Or they are told to read their manuals if they run into trouble with a program. But the problems users have with computers is most often not because they don’t know how to read directions, or because they haven’t studied their manuals enough. The problem is most often that users don’t understand how computer technology functions and thus have unrealistic or wrong expectations of the computer.

But those users who know some programming, know how the computer functions and so have the basis to troubleshoot any unexpected or difficult situations. (In fact they know to expect difficulties, not to expect using a computer to be easy.) Software writers can only anticipate some of the problems with computers. They can’t anticipate all the uses or problems that may occur. Hence there will be bugs, not ease, in using computers at our current state of technological development. And a broad knowledge of programming among computer users will make it possible for users to customize the software for their own needs.

It’s as if someone said “You don’t need to learn to read. Someone can read to you,” when the printing press was first invented.

– Ronda Hauben
The Amateur Computerist, April 1, 1989 Volume 2 No. 2 (PDF document)

Asking “Why learn to program when others have written so many useful programs?” is almost like asking “Why learn to drive a car when there are so many busses and trains?” Certainly, most [people] will want to go somewhere in the computing world where there is no public transportation. Also, people who create programs have a better understanding of how computers work. Programmers, naturally, have insight into what kinds of things computers can do well or not so well. They understand the causes of (and thus, perhaps, have more tolerance for) slow-executing software, unclear messages, and bugs.

– Eric Johnson
Humanists and Programming

Many people never quite achieve their potential with computers because nobody ever took the time to explain to them the most fundamental tenets of how these things work, or more precisely how they can be made to work. There are two separate parts to computers. Firstly there is the design and construction of the box and its various components. That’s the physical computer, the one we can pick up, plug in, switch on and off or move around.

Secondly there is the logic involved, the control and use of the electricity supplied to the computer; the part that seems to frighten many people. Too often one hears words like “I don’t care [how it works], I just want it to do the [whatever] job for me”.

… Articles about programming are the same as the programs themselves. You might read a line several times before the meaning and the intent sinks into that tired brain. You can look at a line of code for a long time and never understand what it’s doing - that’s the point at which your level of interest takes control and you begin experimenting.

–Gary Taig
Editorial comment, PC Update, May 2004

[Tim] O’Reilly and others believe that the open source effort is just an extension of a need to make the internal workings more and more open to users. This is the only way users can solve their problems and use the computers effectively … That is, more and more of the Source is going to need to become transparent to the users. It’s not a political battle of Microsoft versus the world. It’s not just a programmer’s struggle to poke a nose into every corner of a device. It’s about usability. More and more people need to write programs to teach computers to do what they need to do. Access to the Source is the only way to accomplish it.

– Peter Wayner
“Free For All - How Linux and the Free Software Movement Undercut the High-Tech Titans”
HarperCollins, 2000. p. 123-4

“Go thou, and do likewise”

Mathematics and computing courses and articles sometimes resemble instruction by intimidation. Students (or readers) are shown an elegant proof, formula, or algorithm and then told, “Go thou and do likewise!” without any real explanation of HOW to do so. This is very unfortunate, because programming is not like a joke, where either you get it or you don’t. It is a skill that can be learned (and practiced) in a step-by-step manner.

– Joel Neely
Recursion, Iteration, and Algebra

Many professions require some form of computer programming. Accountants program spreadsheets and word processors; photographers program photo editors; musicians program synthesizers; and professional programmers instruct plain computers. Programming has become a required skill.

Yet programming is more than just a vocational skill. Indeed, good programming is a fun activity, a creative outlet, and a way to express abstract ideas in a tangible form. And designing programs teaches a variety of skills that are important in all kinds of professions: critical reading, analytical thinking, creative synthesis, and attention to detail.

We therefore believe that the study of program design deserves the same central role in general education as mathematics and English. Or, put more succinctly, everyone should learn how to design programs.

How to Design Programs - An Introduction to Computing and Programming

Thinking, solving, understanding

The single most important skill for a computer scientist is 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 … 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.

How to Think Like a Computer Scientist - Learning with Python

I like to teach programming for (at least) two reasons. One is because teaching people how computers work, and how to make computers do what they want them to do, gives them power. The other reason is that it teaches people how to think in a logical, connected, sequential, directed way. That gives them even more power; power over their own minds, power to control their thinking and the sequences of ideas in their own heads.

I think that teaching computer programming is a very powerful tool for teaching people how to think clearly. The program runs, or it doesn’t. It does what you want, or not. The cause is (usually) in plain sight, in the source code; the error is in one’s understanding or precision.

This is not to say that logic is the only, or even the best, way to think–but it’s a powerful and necessary tool for one’s mental toolbox, and one that too few people have or can use. Intuition is good, too… and an aesthetic sense… just use the right tool for the job at hand.

– John Kleinjans
Python Tutor mailing list (Sun, 04 Apr 1999 14:35:20 -050)

What I mean is that if you really want to understand something, the best way is to try and explain it to someone else. That forces you to sort it out in your own mind. And the more slow and dim-witted your pupil, the more you have to break things down into more and more simple idea. And that’s really the essence of programming. By the time you’ve sorted out a complicated idea into little steps that even a stupid machine can deal with, you’ve certainly learned something about it yourself. The teacher usually learns more than the pupil. Isn’t that true?

–Doulgas Adams
“Dirk Gently’s Holistic Detective Agency”
Pan Books, 1988. p. 19-20

… learning to program amounts to learning how to construct mechanisms and how to construct explanations. The need to construct mechanisms and explanations transcends the domain of programming. In daily life, people constantly are developing mechanisms and explanations to solve problems … In an introductory programming course, students should be taught what they really need to know about programming, and in doing so, they will learn effective problem-solving strategies that transcend the domain of programming.

– Elliot Soloway
“Learning to program = Learning to construct mechanisms and explanations”
Communications of the ACM, September 1986, Vol. 29, No. 9. p. 851


To appreciate programming as an intellectual activity in its own right you must turn to computer programming; you must read and write computer programs — many of them. It doesn’t matter much what the programs are about or what applications they serve. What does matter is how well they perform and how smoothly they fit with other programs in the creation of still greater programs. The programmer must seek both perfection of part and adequacy of collection.

– Alan J. Perlis
Structure and Interpretation of Computer Programs” (Second Edition)

First published: PC Update Dec 2005