Top positive review
79 people found this helpful
Norvig's Corollary to Greenspun's Tenth Law of Programming
on April 23, 2005
This book has been called "The best book on programming ever written". I'd have to agree--it is certainly the best that I've ever read.
William Zinsser said, "The essence of writing is rewriting" and the same can be said for writing computer programs. Norvig's book presents this process--how the limitations of a program are overcome by revision and rewriting. What sets Norvig apart as a writer is that, amazingly enough, he can write about debugging (the most dreaded part of computer programming) and make it a fascinating read!
Lisp has been getting a higher profile lately because of essayists like Paul Graham and Philip Greenspun; in particular, Greenspun's Tenth Rule of Programming which states: "Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp." So, should this book be read as an exhortation to return to Lisp as the preferred programming language?
Paradoxically, I think not. One third of the way through the book, Norvig shows us how to implement Prolog in Lisp. From then on out, most of the AI techniques he presents either directly use Prolog instead of Lisp (such as his excellent discussion of natural language processing using Prolog) or use Prolog as a base to build on (such as his discussions on knowledge representation).
From this we can abstract what I'd like to call Norvig's Corollary to Greenspun's Tenth Law of Programming: "Any sufficiently complicated LISP program is going to contain a slow implementation of half of Prolog". I'm leaving out the "ad hoc", "bug-ridden" part of Greenspuns's law, because Norvig's programs are neither. But it is quite remarkable the degree to which, once having absorbed Prolog, Norvig uses Prolog as the basis for further development, rather than Lisp.
Is this a book about Prolog then? Again, no. What is the take-away message? It is this: as our world becomes more and more complex, and as the problems which programmers are facing become more and more complex, we have to program at a higher and higher level.
Norvig does not stop at just embedding Prolog in Lisp. He also shows us how to embed scheme as well. Excellent discussion on the mysterious call/cc function and on continuations.
In a capsule review, it is impossible to really give an overview of a 1,000 page book like this one. But the scope and heft of the volume really needs to be commented on: the programs presented in this book are like basis vectors, the totality of which nearly span the space of programming itself. In no way should this be considered "just an AI book" or "just a LISP book". This book transcends language, time, and subject matter. It is a programmer's book for the ages.