Why program?

Learning Latin . . .

When I went to school it was quite normal to learn Latin, (Oh, yes! It was a very long time ago.) It was also quite normal for the inquiring minds in a Latin class to wonder why they should suffer this fate, given that the chances of ever making use of the skill in later life - as opposed to any after life - were practically nil. Anyone who was brave enough to raise the point could expect one of two answers - or both for good measure.

The first answer was: A knowledge of Latin allows direct access to some of the world's greatest literature. This could obviously not be denied. It was true that by dint of great perseverance you could indeed get to the point of reading a page of Vergil's Aeneid virtually unaided at about the speed at which you might type it out with no previous practice and one finger.

But it was the second argument which was the clincher. Learning Latin is an intellectual exercise: it trains the mind. Well, for the majority, it certainly was very hard work, like most other forms of exercise, and, of course, we had been led to believe that hard work was by definition good for us.

...and learning to program

Although Latin has now lost its place in the national curriculum, it is not hard to see that an introductory programming course will raise the same sorts of questions for the same sorts of reasons. Very few of us, after all, end up as professional programmers. So why learn to program?

The literary heritage response is in this case even less likely to succeed. It is not that the relevant texts do not exist. There are, to judge by their effects, some very sophisticated examples of the programmer's art and programmers are often to be heard talking of programming style. But reading programs in search of that style is certainly no gentle leisure activity. It is not uncommon for even an experienced programmer to have considerable difficulty puzzling out the intention and mechanics of one of his (or her) own creations. Vergil, at least, cannot have had such problems.

The claim that programming provides a training for the mind, however, is a line which can be borrowed and this time it can be used with greater justification.

Learning to program is like learning a foreign language

It would be nice to think that the mind training argument gains its force from whatever similarities there are between learning to program and learning Latin, and it is true that learning to program and language learning in general are activities with much in common. Programming a computer amounts literally to talking to a computer. This is why we use the term programming language about the medium of communication. (By comparison, although you communicate with a car engine by pressing pedals, it would be far fetched to think of the foot movements involved as even a primitive type of language.) Moreover, you talk to a computer for much the same reasons that you talk to another person - in order to get it to do something or to respond in some useful fashion.

You might argue, too, that learning Latin in particular is in some respects especially closely related to learning to program. For one thing, although talking to a computer can be more or less interactive, depending on the language you are speaking, the activity is usually rather less like a conversation than the word talk might imply. Typically you provide a set of written instructions, or perhaps write out a set of facts and rules, for the computer to read and react to. These documents in computer-speak are normally called programs, but they are text documents rather like letters to freind. In using Latin, you are also more likely to read (Cicero's letters) and write (the occasional sentence) rather than speak and hear the language, because real live ancient Romans are fairly hard to find.

But it's who you talk to that matters

What makes the mind training argument successful, however, is not that in learning to program you learn a new language. Nor is it important that the language is by and large written rather than spoken. What matters is that you learn this new language to talk (OK, write) to someone (OK, something) who is really quite special. You learn this new language to talk to a computer.

Ron Brasington
Department of Linguistic Science
The University of Reading

E-mail: ron.brasington@rdg.ac.uk