So you want to do the SICP…

That’s awesome! But maybe you don’t know where to start.

So here we go!

Wait, the what?

Structure and Interpretation of Computer Programs, a.k.a. the SICP, is an MIT class teaching computer languages turned into a book.

Why should you care? I’ll let Stack Overflow answer:

Some classics […] teach you the effective working habits and the painstaking details of the trade. Others […] delve into the psychosocial aspects of software development. […] These books all have their place.

SICP, however, is in a different league. It is a book that will enlighten you. It will evoke in you a passion for writing beautiful programs. Moreover, it will teach you to recognize and appreciate that very beauty. It will leave you with a state of awe and an unquenchable thirst to learn more. Other books may make you a better programmer; this book will make you a programmer.

If you’re not sold on the SICP by this point, I’m afraid I can’t help you.

 

The book

The full material for the book, including lessons and the exercises, is available on the MIT website:

http://mitpress.mit.edu/sicp/full-text/book/book.html

Of course, you will need to do the exercises to fully grasp the SICP. The exercises are easy at first and get progressively more challenging. You’ll find a lot to make you think, and some concepts are guaranteed to make your head spin.

The language used to teach the SICP is Scheme, a Lisp dialect. This makes the SICP a gentle introduction to functional programming, made trendy again by the likes of Erlang, Haskell, Scala, Clojure, and even Arc if you’re an HN reader.

Okay, but doing the exercises without ever testing is not that motivating. What you need is a Scheme REPL!

 

A REPL

REPL stands for Read-Eval-Print-Loop. For example, bash could be considered a REPL: enter lines of code, they’re interpreted and results are printed out. Repeat.

Several good Scheme REPL exist, such as Gambit Scheme. If you’re on OS X with Homebrew, just type brew install gambit-scheme and launch it with scheme-r5rs in command-line. You’re good to go!

If you don’t really want to mess with Scheme locally, you can use the awesome online REPL here:

http://sisc-scheme.org/sisc-online.php

(NB: copy and paste doesn’t work on OS X, and apparently it doesn’t work with Firefox 4 on either OS X or Windows. Can anyone confirm?)

This is all good and well, but what if you’re stuck?

 

The answers

Numerous people over the web have posted their take on the SICP exercises. One of the best resources is the Scheme community wiki:

http://community.schemewiki.org/?sicp-solutions

If you trust me enough, you can see my take on the exercises on Github.

 

There it is. You don’t have any excuse not to do the SICP now, you lazy bum.

Happy hacking!

 

Edit: as always, the Hacker News discussion is very insightful.

18 thoughts on “So you want to do the SICP…”

  1. it wont you make a programmer. it will make you a dumb jackass. if you want to be a programmer, code something that will make you money.

    1. Hipster ape, you’re right programmer is too loose of a term..

      SICP makes you an artist who’s medium is applied logic. I honestly don’t care if you think this makes me a jackass.. Luckily the beauty of being an artist is that I don’t create art for you or anyone else.. I do it for the concept which burns to be given form.

      It sounds as if you’re a code monkey.. That’s fine but at heart you’re a businessman with good computer communication skills.

      I guess the value depends upon what you aspire to.

    2. You will never be a good programmer if you care only about money.
      You sound like a 10-year-old kid that never saw a piece of code in his life.
      Go program in your Visual Basic!

  2. SICP is definitely the best programming and software engineering book I’ve ever read, it improved my abilities immensely. However, the drawback of completing SICP is that you join a small group of people (who didn’t necessarily read SICP) who think that elegance and programming are inseparable. This will make you an oddity in the slam-together-a-few-libraries-fast school of software development that dominates the industry. Beware, you will start commenting on how Lisp isn’t really so bad and perhaps suggest the people should look at something other than Java. In all seriousness, it leads to a somewhat outsider point of view that has some drawbacks… but if I’ve dissuaded you, then it probably wasn’t the right book for you anyway. Good luck.

  3. There are so many programmers now but despite the numbers only few stand out. If you really want to be a great programmer then you need to start reading now

  4. SICP is the sort of thing that happens when you allow people who know nothing about teaching design a course.

    The appeal of both the approach and, indeed the book, is quite narrow. For the vast majority of aspiring programmers this approach makes no sense. And you can’t dismiss this by saying “well, only brilliant people get it so obviously those who do not benefit from it must be morons”. It doesn’t work that way. Teaching people to program and to think about what they do in deep ways is a fragile process.

    I read the book. In fact I read it every 2-3 years. And yes, it did appeal to me. But it is NOT an introductory text for computer science. It is a text that you benefit from only once you have a certain amount of knowledge and experience.

    People who recommend SICP as an introductory text are either fucking snobs or they do not bother understanding the needs of students upon first contact with the field.

  5. Even easier:

    http://icampustutor.csail.mit.edu/6.001-public/

    This will give an on-line environment in which to do problems from SICP. They will be automatically checked for correctness and graded.

    And here’s video lectures to go with it:

    http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/

    Only downside is problems and video lectures and book don’t exactly line up (different semesters, slightly different content), but it’s close enough, and quite a bit better than the alternatives.

  6. I know this will never go through “moderation”, but I hate websites like yours. You should either not censor comments, or give users some indication that they’re reading censored comments designed to line up with your point of view.

    What you’re doing is sleazy and dishonest.

    1. Hello!
      I use Akismet to filter spam. Akismet is usually excellent to block spam, but a bit agressive regarding genuine comments. Your post contained two links, which Akismet heuristics flagged as suspect and asked me for moderation.
      I had no reason to delete your comment anyway, it brings interesting information on the topic!

  7. Dose anyone know how to get a REPL up and running on Windows. I would like to have copy paste. That just doesn’t work in the Java online REPL (it also has problems with multi line declarations – when I press enter it just submits the field; ctrl + enter dose the same thing)

    I think I like the idea of going through this book because chances are I’ll never use Lisp in a real life project. So this will be just for fun and I like fun :)

  8. SICP a bar-none the best programming book out there. Despite what others have said it is not only a good intro book, it is the best intro book. It doesn’t hold your hand and give you cook-book style experience. It teaches you how to think computationally, it forces you to understand each exercise before moving to the next and it demands that you work extremely hard. You can complete this book in a few days, but those that do understand its content are well on their way to becoming true programmers.

  9. SICP a bar-none the best programming book out there. Despite what others have said it is not only a good intro book, it is the best intro book. It doesn’t hold your hand and give you cook-book style experience. It teaches you how to think computationally, it forces you to understand each exercise before moving to the next and it demands that you work extremely hard. You can’t complete this book in a few days, but those that do understand its content are well on their way to becoming true programmers.

  10. SICP was a true eye-opener for me. While at college teachers would say about recursion and state that its not good to use too much recursion, but SICP explained to me what recursion truely is and in doing so made me realize for my self why it shouldn’t be used too much.

    I read SICP after finishing by B-Tech Degree, i would suggest people to read and work out SICP while they are in college itself.

  11. HTDP2 is a similar book used for the same purpose in the same university, keeping the spirit of SICP and Scheme, but made teaching in mind. A winner.

  12. I’ve been postponing SICP from quite some time now. Hopefully when I’m here the next time, I’d have finished a considerable chunk.

Leave a Reply

Your email address will not be published. Required fields are marked *