Page xvi
don't collapse, but it doesn't have any fun in it. There are no pleasures in writing Algol programs. It's a labor of
necessity, a preoccupation with the details of tedium.
Harvey and Wright's introduction to computing emerges from a different intellectual heritage, one rooted in research in
artificial intelligence and the programming language Lisp. In approaching computing through this book, you'll focus
on two essential techniques.
First is the notion of symbolic programming. This means that you deal not only with numbers and letters, but with
structured collections of data—a word is a list of characters, a sentence is a list of words, a paragraph is a list of
sentences, a story is a list of paragraphs, and so on. You assemble things in terms of natural parts, rather than always
viewing data in terms of its tiniest pieces. It's the difference between saying "find the fifth character of the third word
in the sentence" and "scan the sentence until you pass two spaces, then scan past four more characters, and return the
next character."
The second technique is to work with higher-order functions. That means that you don't only write programs, but
rather you write programs that write programs, so you can bootstrap your methods into more powerful methods.
These two techniques belong at center stage in any beginning programming course, which is exactly where Harvey and
Wright put them. The underlying principle in both cases is that you work with general parts that you extend and
combine in flexible ways, rather than tiny fragments that you fit together into rigid structures.
You should come to this introduction to computing ready to think about ideas rather than details of syntax, ready to
design your own languages rather than to memorize the rules of languages other people have designed. This kind of
activity changes your outlook not only on programming, but on any area where design plays an important role, because
you learn to appreciate the relations among parts rather than always fixating on the individual pieces. To quote Alan
Perlis again,
You begin to think in terms of patterns and idioms and phrases, and no longer pick up a trowel and some cement and
lay things down brick by brick. The Great Wall, standing for centuries, is a monument. But building it must have been a
bore.
HAL ABELSON
CAMBRIDGE, MA
Page xvii
PREFACE
There are two schools of thought about teaching computer science. We might caricature the two views this way:
• The conservative view: Computer programs have become too large and complex to encompass in a human mind.
Therefore, the job of computer science education is to teach people how to discipline their work in such a way that 500
mediocre programmers can join together and produce a program that correctly meets its specification.
• The radical view: Computer programs have become too large and complex to encompass in a human mind.
Therefore, the job of computer science education is to teach people how to expand their minds so that the programs
can fit, by learning to think in a vocabulary of larger, more powerful, more flexible ideas than the obvious ones. Each
unit of programming thought must have a big payoff in the capabilities of the program.