Dada
|> Structures
|> Algorithms

The Little Schemer

A delightful little book

I finished a first reading of "The Little Schemer" by Daniel P. Friedman and Matthias Felleisen.

It is such a beautiful, delightful book. It is a book about Lisp and Scheme, the programming languages. It is also about functional programming, math, logic, and computation. We realize that once we are done with the book. The authors are so subtle presenting the different topics, and we, the readers, don't notice it until they tell us, what is it that we have been learning in the chapter.

The book follows a programmed learning format, where each learning step is presented as a sigle card with a prompt and with an answer. The idea of programmed learning is to engage the reader by having them produce the answer and then check if they are right immediately. I have read a number of these kinds of books, I enjoyed them, so I had an idea of what I was about to experience.

I was wrong. Although the book is organized as a programed learning text, it is unique within the genre. It is playful. The prompts sometimes mislead. Sometimes it asks one to do something, only to tell us that we couldn't do it because they haven't told us how to do it. At some point I stopped thinking about it as a programmed learning text and more as a kind of socratic conversation with the readers.

The book starts a scheme tutorial, having us explore what are atoms and lists. We then move how to process a list via recursion. They teach us how to write recursive programs. The next chapter shows us how to build and return lists. Up to this point we are engaging in the topics that one would expect from a computer programming textbook.

It is starting in chapter four where the book becomes amazing. Rather than teaching more about programming capabilities, such as how to read files or build records, it begins to dive into mathematical topics using what we have learned so far. We build up numbers using recursive definitions. Later on we explore pairs and functions. We then tour over a number of computational and mathemtical concepts. From this point we dive into a topic, and at the end we are told what we have learned. We don't even know that we are working on some of hard concepts. I was often surprised when I realized what I was learning. All of this delivered with gentle, kind humor, and some wonderful illustrations of elephants.

It is a good textbook for students? I don't know. I had studied most of the topics previously. It is a wonderful book for people who do know the subjects, though. I gained new insights into the topics due to the clear explanations. It has made me want to go back and review the topics, especially the ones where I realized, thanks to the book, I don't fully understand. I also have gained a lot more respect for Lisp, because it has the power to teach these complex ideas in such a simple manner.

I am going to reread parts of it more carefully this year. The book has that quality that inspires you to learn more about these topics. It even helpfully provides a list of books for one to learn more. I happen to already own many of them.

I deeply enjoyed the book. It has become one of my programming favorites.