SICP – conclusion

April 18th, 2008 at 4:54 pm

I’ve completed the SICP reading project, which I began on June 19th, 2007. In hindsight, it seems like a very long time (almost a year!), during which this was my main hacking project at home. So, in this conclusion I want to examine my progress, and compare the result with my initial goals.

The original plan was:

  1. Read the book
  2. See all the video lectures by Sussman and Abelson themselves
  3. Do most of the interesting exercises in the book
  4. Do some of the larger projects listed here and here

Let’s see how I’ve managed:

  1. Done
  2. Done
  3. This is the point I’m most happy with. I’ve completed the vast majority of the exercises in SICP and posted them online. Of the 356 exercises in the book, I’ve skipped about 20, so I’ve completed 94% of the exercises – which is far above my initial plans.
  4. I didn’t do this, but there’s no need, having completed so many of the exercises. I feel I gained a completely solid understanding of the material, and won’t gain much by doing the projects.

Also, I originally planned to reimplement all the code do all the exercises in Common Lisp. Later I changed my mind and decided to use PLT Scheme for some of them. Eventually, I’ve been using both languages interchangeably, which is a good thing, as I got some practice with both.

Here are some numerical statistics that emphasize the magnitude of this endeavor:

  1. I’ve written 52 blog posts (not including this one) in the SICP category, spread over 10 months.
  2. The combined total length of my posts (including code snippets) is 66,265 words. For comparison, Jack London’s “Son of the Wolf” is 50K words long.
  3. Some of the large projects from the book I’ve re-implemented in wholeness: a constraint propagation solver, an evaluator (interpreter) for Scheme, a generic object-oriented arithmetic package including complex and polynomial arithmetic, Huffman encoding, an interpreter for a logic programming language similar to Prolog (as a DSL on top of Lisp), a picture-language interpreter, a simulator for digital circuits, a symbolic differentiation package, a virtual machine for a simplified pseudo-assembly DSL, an interpreter for Scheme written in this pseudo-assembly, and finally, a compiler for Scheme that spits out pseudo-assembly code.
  4. Counting with the cloc tool (Count Lines Of Code), the total physical LOC count1 for the code I’ve written during this time: 7,300 LOC of Common Lisp, 4,100 LOC of Scheme. If you prefer raw LOCs2, it’s 10,800 LOC of Common Lisp, 5,600 LOC of Scheme. So this is more than 10 KLOC of Lisp code, any way you look at it, which is a lot, since Lisp is a very expressive high-level functional language.

A word on SICP and its exercises. Abelson and Sussman have created a masterpiece, a book initially written in the 1980s, and that still hasn’t lost one bit of relevance. Everything it contains must, must be learned and understood by any aspiring programmer. It teaches algorithms and data structures, good programming style, provides some contact with large systems, experimenting with their implementation and modification. You will learn about functional programming, imperative programming, object-oriented programming in it. You will learn how to implement interpreters, compilers, arithmetic systems, simulators, a whole virtual machine in it, and much more.

The exercises of SICP are essential to understanding. Looking back at the work I’ve done on the book, I don’t think I would have understood it near so well without doing a lot of the exercises. There’s only so much material that can be gained from reading. Getting your hands dirty with code is essential to true understanding. And the authors of SICP brought this concept to perfection, with their excellent exercises, that are an unreplaceable companion to the book. Although they’re not 100% perfect, for the most part the exercises are very well thought out and tuned to aid understanding and practice writing parts of large systems.

1 Physical LOC: lines of code, excluding comments and blank lines. To test my Common Lisp and Scheme code counts with cloc.pl, I used these commands:

cloc.pl --force-lang="Lisp",lisp *.lisp
cloc.pl --force-lang="Lisp",scm *.scm

2 Including comments and blank lines, as output by wc -l.

Related posts:

  1. Introducing the “SICP reading notes”
  2. SICP – a midway recap
  3. Book review: “Structure and Interpretation of Computer Programs” by Harold Abelson, Gerald Jay Sussman
  4. SICP section 4.4
  5. SICP section 1.1

32 Responses to “SICP – conclusion”

  1. MattNo Gravatar Says:

    Exceptional accomplishment! Even as a former TA of 6.001 at MIT, I have never seen anyone go so far in-depth with the SICP material as you have. It really is one of the greatest programming texts ever written, and a damn shame that they have ceased to teach it any more at MIT. Hopefully, they will recognize the error sooner rather than later, although I fear that those who prefer to emphasize “practical” enterprise coding over actually learning how to program may have won out.

    Anyways, great job!

  2. elibenNo Gravatar Says:

    Matt – thanks for the feedback.
    I’m very disappointed that MIT stopped teaching SICP. This is a real shame. Are they really planning to emphasize enterprise coding ? I would expect this from some hype-unknown-college that tries to generate buzzword-interest, but not from MIT. Somehow, MIT has always connected with strong theoretical background for me.

  3. Rob ONo Gravatar Says:

    Wow this is a very aspiring acomplishment. Huge props for seeing the project all the way through, even after 10 months. That is an insane amount of dedication an focus.

  4. nickNo Gravatar Says:

    Way to go Eli!

    Strong work, you’re my hero :-)

  5. Ken DyckNo Gravatar Says:

    Kudos to you, Eli! I hope someday I’ll be able to join you. Until then, it seems you’ll be host to the most extensive discussion of SICP on the web. Congratulations!

    Any thoughts on what project you’ll take on next?

  6. rsheridan6No Gravatar Says:

    I did roughly the same thing several years ago (OK, I skipped some exercises in chapter 5). I didn’t like “Learn C++ in 21 Days” so I found out what book MIT used, bought it, and grinded through it. I was so ignorant and newbish when I started that, when I looked at the table of contents and saw a chapter about register machines, I wondered why they devoted a chapter to cash registers.

    Anyway, my conclusion is essentially the same as yours, and I would recommend this to anybody who wants a solid grounding in CS, with the caveat that it’s not easy and you should expect to take some time on it (like months, not 21 days).

  7. ripper234No Gravatar Says:

    Congrats! It’s very satisfying to successfully complete such a long project.

  8. elibenNo Gravatar Says:

    Thanks for all the feedback !

    Ken – I have a couple more in the pipe. For example, I have “Lisp in Small Pieces” on my shelf, yet unread. So some serious Lisp compiler hacking is expected soon :-)

    Also, I bought “Programming Pearls” and was intending to go through it.

    I’m not sure any of them will be such a comprehensive, fully-documented project though. We’ll see.

  9. Ed BurnsNo Gravatar Says:

    Hello there,
    I found this post from reddit and wanted to share some very distilled feedback about SICP. I have written a book that is a collection of interviews with some of today’s top practicing programmers. It’s called “Secrets of the Rock Star Programmers”. Two of the interviewees, Dave Thomas and Adrian Colyer, cite SICP as THE BOOK on CS. Dave even goes on to say a few words about the origins of SICP as The Lambda Papers. If it’s good enough for these guys, it’s good enough for you!

  10. Chris DoneNo Gravatar Says:

    Inspiring. Truly inspiring. I have dabbled with SICP before but lost focus in favour of other projects. I will now focus my attention on completing it in its entirety; every single bit. Thank you!

  11. YodaNo Gravatar Says:

    The force is strong In this one!

  12. Chris RathmanNo Gravatar Says:

    Nice to see someone finish their SICP project as so many start out with grand ambitions only to fall short. My own SICP project to Translate to other PLs has kind of stalled on chapters 4 and 5.

  13. wineshtainNo Gravatar Says:

    An interesting post might be – sharing your time managment techniques.

    How do you acomplish all this while working and book crunching?

    Happy holiday.

  14. gojoNo Gravatar Says:

    good job Eli. It is a huge inspiration. Now the big question is, what’s next?

    A 52inch 1080p? come on, you got to reward yourself :)

  15. elibenNo Gravatar Says:

    gojo: Is this a TV ? I don’t have a TV at home at all, and not because I cannot afford one… This is a hint to wineshtain who wondered about my time management techniques :-)

  16. mmitNo Gravatar Says:

    Hi,

    This is just a comment about Matt’s post (#1). They stopped teaching 6.001 as the core CS prereq at MIT. I, like many other students who had taken 6.001 felt distraught that it was being replaced by a course that made students program robots in Python. I talked to Sussman about it, and he supported the decision. His main argument was that SICP is great, but not for beginners. You want something that excites young freshmen – SICP can be overwhelming.

    Instead, MIT now has this more advanced course (Adventures in Symbolic Programming) http://swiss.csail.mit.edu/classes/symbolic/spring08/

  17. CasisNo Gravatar Says:

    Great post!

    Congratz on finishing it !

    There is also another book about programming (with scheme, too): How to Design Programs: An Introduction to Programming and Computing (freely available at: http://www.htdp.org ). I don’t know if it is as good as SICP, and if someone read it, could he post a little review about it? I am only at the beggining, and I think it is less “hardcore” than SICP, for us, the rest of the world :)

  18. rdsrNo Gravatar Says:

    A truly great accomplishment…
    Your success truly inspires me to work at SICP even harder….
    currently I’m about to finish 2nd chapter…
    Looking forward to the day when even I can boast of the same accomplishment….

  19. VinayNo Gravatar Says:

    Hi Eli,
    Only hard working people and strong will can accomplish this!!! Kudos to you.
    I am reading SICP but pace is very slow and i am also trying to do each and every exercise . Whenever i got stuck i refer your solutions. Thanks for posting the solutions :-) .

  20. Grant RettkeNo Gravatar Says:

    Congratulations Eli!

    You are an inspiration to and fine example for all of us other students of programming.

  21. Grant RettkeNo Gravatar Says:

    Casis,

    I am tackling HTDP before SICP.

    If you would like to chat about it, send me an email!

  22. Rory WinstonNo Gravatar Says:

    Well done Eli. SICP is the book that keeps on giving! ;-)

  23. Phillip RhodesNo Gravatar Says:

    Congrats! Sounds like quite the adventure. :-)

  24. Binny V ANo Gravatar Says:

    Great job. Some day I will follow your path. Hopefully someday soon.

  25. 3fenNo Gravatar Says:

    Congratulations!
    I’m doing these exercises too, and I hope I can complete them like you.

  26. Geoff KnauthNo Gravatar Says:

    I’ll buy you dinner if you ever come through Williamsport PA, or if we meet elsewhere.

  27. lukasjobNo Gravatar Says:

    man you’re my hero!!! ;) as someone already said …
    great accomplishment I’m studying SICP too (currently at section 2.5) and come to see your blog from time to time
    I’ve almost finished HTDP doing every single exercise this is a great book too.
    luca

  28. raof01No Gravatar Says:

    Hi, I’ve a question.
    I’m going to read the dragon book, Introduction of algorithm, and SICP(in this order). According to your article, I think it’s better to start with SICP.
    Any suggestions?
    Thanks in advance.
    ——
    My background: a programmer. Only learned (5 years ago) data structure (in C) and OS internals, 386 architecture. oh, and assembly of 386, because my major in college was civil engineering.

  29. elibenNo Gravatar Says:

    raof01:
    It all depends on your goals. What do you expect to learn ? Which tools do you think will be important for you in the future ?

    IMHO it’s best to begin with SICP, anyway.

  30. Shannon -jj BehrensNo Gravatar Says:

    I watched all the videos, and blogged about them 8 times: http://jjinux.blogspot.com/search/label/sicp

    Suddenly, I feel so inadequate ;)

  31. Mike SluyterNo Gravatar Says:

    You’ve inspired me to work through the SICP as well. Thanks!

  32. seiskaNo Gravatar Says:

    That sounds like a lot of work that you have accomplished there nothing to be shame of even it took a year.