Skip to content

Latest commit

 

History

History
115 lines (89 loc) · 6.48 KB

STUDY.md

File metadata and controls

115 lines (89 loc) · 6.48 KB

SICP Study Guide

Choosing a language and interpreter

I recommend using Racket.

Racket is a programming language, and at the same time a programming environment capable of running many different programming languages that are not Racket. The main Racket language is based on Scheme, which is what was originally used in the book, but now it is a language on its own with some incompatible changes and extensions. Fortunately, since SICP very purposefully uses a spartan subset of Scheme, the code from the book is trivial to port to the Racket language.

Racket has the advantage of being very actively maintained and developed, making it easier to install and use by people used to modern programming environments, in comparison to "standard" Scheme implementations. Racket is capable of running programs in "standard" Scheme, but this just seems to complicate everything - REPL is worse, it is not clear how to unit test your code etc., so I recommend sticking to both Racket-the-environment and Racket-the-language.

You could also use Clojure, or a modern Common Lisp implementation like SBCL, but the code would significantly diverge from what is in the book. MIT Scheme was used in the 6.001 class for which SICP was written, but it does not see the kind of active development Racket does.

Note that the point of the book is to implement many sophisticated programming concepts like objects, lazy evaluation, logic programming etc. using the simplest means like let, lambda, cons, car, cdr, so I purposefully do not use any advanced Racket language features in my solutions. I do make use of the libraries, for example for unit tests.

Choosing an editor/IDE

Racket includes an IDE called DrRacket, and has very good documentation on Racket extensions for text editors.

Background knowledge from mathematics and electronics

The book uses mathematics and electronics for a lot of the example programs, without giving any background knowledge on those topics, which might scare some people off. My most important advice on this: do not panic. Only a very cursory understanding of those disciplines is required for most of the exercises, you do not have to do a lot of additional study, although some background reading will certainly increase appreciation. I recommend lcamtuf's Concise electronics for geeks for electronics, and 3Blue1Brown Essence of calculus video series for mathematics, as the quickest way to get the necessary background.

On your first pass through the book, I would recommend trying to maintain a steady tempo, even if this means skipping some exercises or solving them without fully understanding all the details. Ideas typically form a graph in which many nodes are mutally dependent, and so you should not expect to learn everything at once when going through a textbook which is by necessity linear - by trying too hard to do this you will only loose motivation. A second and third pass will make everything make much more sense without anywhere as much effort, especially having spent some months or years in between working on or learning anything related to the book topics. This is the spiral approach to learning.

For me a big part of the value from studying SICP was the further interests it sparked and the broad intellectual perspective it gave me on all of those topics. It is worth noticing that some of the book themes apply to mathematics and electronics as well as they apply to computer programming. If you actually enjoy learning about those topics, I recommend eventually also reading the books What is Mathematics? and The Art of Electronics which are the closest to being SICP-equivalents for their respective fields.

Generally useful resources