Book of the Week: Structure and Interpretation of Computer Programs

12 Apr 2014

Structure and Interpretation of Computer Programs

This week I read Structure and Interpretation of Computer Programs, because I want to learn Clojure, a dialect of LISP. All the cool kids know LISP. It is a classic. It doesn’t teach you how to program in LISP, but teaches how to do magic and become a wizard. This is why SICP is nicknamed the wizard book.

Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data. The evolution of a process is directed by a pattern of rules called a program. People create programs to direct processes. In effect, we conjure the spirits of the computer with our spells.

It was a very enjoyable read, but I can understand why some learners of computer science are unable to appreciate the beauty of the book. My friend told me that the original Feynman Lectures were not well received by the undergrads at the time, but is now considered excellent material. Computer science majors probably have the same relationship with SICP as physics majors have with the Feynman Lectures. It’s hard to see the beauty of the presentation if you are trying to figure out to print “hello world” or trying to write down and solve a differential equation. These books present a different view of the material. A view that a master of the subject would have. It must be like seeing the Earth from space and being in awe of its beauty. It is hard to do what SICP does without using LISP. You need a language that treats functions as first-class citizens. I like LISP, but it takes a while to be able to digest it. Just like learning a foreign language. I came from a C++ background, where the closest thing I get to functional programming is passing a pointer to a function. I rarely do that except for callbacks and passing a function pointer to sort. Luckily I was introduced to some functional programming concepts in Python through Udacity and Scala through Cousera. Being at home with functional programming definitely made the reading a bit easier, but my mind was still blown away by the book. This is a book that you go back and read from time to time. I skipped the exercises on the first read since it would have taken a long time to go through them. The exercises seem necessarily to fully flesh out the thoughts laid out in the text. They aren’t like homework problems that you need to put into the textbook. Since different programming languages change how we think, it is important to expand your thinking by learning new languages and reading new books.