文档介绍:All too often, the teaching puter programming consists of explaining the
syntax of the chosen language, showing the student a 10-line program, and then
asking the student to write programs. In this book, we take the approach that the
best way to learn to write is to read (and conversely, a good way to improve reading
skills is to write). After the briefest of introductions to Lisp, we start right off with
complex programs and ask the reader to understand and make small modifications
to these programs.
The premise of this book is that you can only write something useful and inter-
esting when you both understand what makes good writing and have something
interesting to say. This holds for writing programs as well as for writing prose. As
Kernighan and Plauger put it on the cover of Software Tools in Pascal:
Good programming is not learned from generalities, but by seeing how signif-
icant programs can be made clean, easy to read, easy to maintain and modify,
human-engineered, efficient, and reliable, by the application mon sense
and good programmingpractices. Careful study and imitation of good programs
leads to better writing.
The proud craftsman is often tempted to display only the finished work, without
any indication of the false starts and mistakes that are anunfortunate but unavoidable
part of the creative process. Unfortunately, this reluctance to unveil the process is
a barrier to learning; a student of mathematics who sees a beautiful 10-line proof in
a textbook can marvel at its conciseness but does not learn how to construct such a
proof. This book attempts to show plete programming process, "warts and
all." Each chapter starts with a simple version of a program, one that works on some
examples but fails on others. Each chapter shows how these failures can be analyzed
to build increasingly sophisticated versions of the basic program. Thus, the reader
can not only appreciate the final result but also