Learning and using a programming language

A language is a language is a language

Programming languages are languages. Not surprisingly, therefore, when it comes to the mechanics of the task, learning to speak and use a programming language is in many ways like learning to speak a human language. In both kinds of language you have to learn new vocabulary, syntax and semantics (new words, sentence structures and meanings). And both kinds of language require considerable practice to make perfect.

Be prepared for something different

There is, however, at least one important general difference which will strike you forcibly as you learn. Computer languages - high-level languages just as much as machine code - lack ambiguity and vagueness. Questions raised in English by sentences such as I saw the man with a telescope (Who had the telescope?) or Take a pinch of salt (How much really is a pinch?) simply do not arise. In a programming language a sentence either means one thing or it means nothing (i.e it is an incorrect or unacceptable sentence). This should make life easier, you might think. But because your computer companion will regularly take you literally and will always be extremely pedantic about the linguistic precision required in your conversations, you are likely to find yourself getting angry with the stupid machine (rather than yourself) in the early stages of the learning process.

Some know-how is necessary

Learning the correct use of new words, sentence patterns and meanings is, of course, only part of the business of learning to use a language. You also need to know how to take advantage of the linguistic resources available to you, how to develop them as need be and even how and when to avoid them.

This course aims to provide enough examples of Logo in use to show you how you might take advantage of Logo as a student of linguistics. In doing this it will teach you how to extend the language to suit your special needs. If it seems odd to suggest that you will also need to learn to avoid Logo, then please just accept my word that new programmers often have great difficultiy in holding back from direct interaction with the computer to think calmly what needs to be done.

In fact, with experience, you will soon discover that there are genuine benefits in starting the development of a program by getting away from the keyboard. With pencil and paper in front of you, there is nothing to stop you, from sketching out your ideas in Logo, especially as you become more fluent. You will find that the language lends itself well to experimenting with ideas whether you are working top-down (from general plans to closer and closer specification of the fine details) or bottom-up (developing progressively more complex environments by integrating previously developed sub-components). But away from the keyboard you can also flesh out your ideas with diagrams (e.g flow-charts) or even in some form of simplified English (as a super-high-level language) and leave the business of writing in Logo until your plans have become clear. Avoiding Logo in this way does not imply a poor control of the language. It is often the most sensible way to proceed. And if you are working in a lab and sharing your machine, it is public spirited too!

Ron Brasington
Department of Linguistic Science
The University of Reading

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