
Ask HN: How can I get the most out of SICP? - seancron
I've heard so many people highly recommend Structure and Interpretation of Computer Programs, and say that it changed their complete view on programming, that I've decided to dive into it for the first time. I've been looking into the MIT OpenCourseWare to use a basis, and I've heard good things about the video lectures as well.  I have a time frame of about two months to work through it, although I hope that it won't that long; there are other things that I want to work on during my break.<p>So my question is fellow HNers is do you have any suggestions for how I can get the most out of this book? Are there any concepts or sections that I should pay particular attention to? Are there resources that would help me understand it better?  Thank you.
======
tsally
You're going to be tempted to skip exercises because you think you understand
the exercise or it is not applicable to you. Don't fall into this trap, as we
humans are notoriously bad at judging what will and will not be useful for our
own learning. Do all the exercises.

The two month time frame seems very optimistic unless SICP is one of your only
responsibilities. It's my understanding that most semester courses that
use/used the book usually never even get/got through the last chapter.

You might consider reading How to Design Programs (HtDP) as an alternative or
supplement to SICP. The authors of HtDP have published a paper comparing the
two works (mostly detailing the perceived shortcomings in SICP that motivated
them to write HtDP in the first place). Read it here:
<http://www.ccs.neu.edu/scheme/pubs/jfp2004-fffk.pdf>.

Good luck. :)

~~~
Confusion
However, do skip some of the more difficult/theoretical exercises, if you feel
they are over your head. As usual, doing half of the exercises probably
provides 80% of the benefits. As an example of a question you may want to
skip: the proof question 1.13 asks you to give requires some mathematical
background knowledge concerning how to go about proving something. Don't let
those questions demotivate you if you lack that knowledge.

~~~
jules
Strongly disagree. You should be able to do exercise 1.13. Knowing how to
prove something is very valuable. I remember spending several hours trying to
do exercise 1.13 and when I finally got it I had learned a great deal about
proving, induction (altough I didn't know its name) and manipulation of
exponentials.

The exercises that are hard for you are exactly the exercises that you'll
learn a lot from.

~~~
zephyrfalcon
Hm, the way I read it, "Confusion" wasn't suggesting to skip the exercise
because it's hard, but because it assumes specific mathematical knowledge
which, strictly speaking, is unnecessary to master SICP concepts.

As you point out, it may still be _useful_ to have that knowledge, and if you
have the time and the mathematically-inclined brains, it may be a skill worth
learning... but I feel that it shouldn't be _required_ to successfully learn
the concepts in SICP. SICP is hard enough as it is, no need to get sidetracked
if you don't absolutely have to.

(I realize this comment may bring all the "programming is math" fans out of
the woodwork, but so be it. :-)

~~~
jules
Learning what a proof is is valuable for programming too. Many people don't
see a difference between a proof and an argument. It is valuable to learn the
difference between "This is why this program is correct" and "Here are some
reasons why this program is probably correct".

------
RiderOfGiraffes
You won't get through it "properly" in two months. It really is mind-changing,
and that takes time. You _must_ do the exercises - pretty much all of them -
because that's where your thinking gets changed. Reading the text sets you up
for it, but that's like reading about weight-training. It has very little
effect unless you actually do it.

Without knowing more about what you already do or already know, I can't advise
paying particular attention to one thing or another, but simply to repeat -
the benefit is in the exercises. The text reads clearly and simply, but the
exercises are where you put in your part of the effort.

EDIT: corrected typos.

------
prog
The way it worked for me was that I was familiar (but not good) with common
lisp. So, to get me going, using CLTL[1] as reference, I watched the videos
first. Its about 20-24 hours worth of watching. Following this I started
reading the book and implementing the exercises and the projects in the
chapters (register machine, logic programming etc.) in Common Lisp. That
required me to understand the concepts well enough to port the scheme stuff to
common lisp. This way I ended up learning Common Lisp with a decent grasp of
Scheme.

Note that common lisp comes with a lot of stuff built in, but to do the above
I stuck to a minimal subset.

Following this, it was fun to read OnLisp[2].

[1] <http://www.ida.liu.se/imported/cltl/cltl2.html>

[2] <http://www.paulgraham.com/onlisp.html>

------
NeilCJames
The video lectures and problem sets from the UC Berkeley course (CS 61A)
taught by Harvey are very good (and freely available), although you will need
to use Berkeley Scheme to get the most out of it. Two months is ambitious, but
you can get a lot out of it in that time even if you don't finish.

~~~
blaix
Do you know how they compare to the original lectures by the authors? Or the
MIT OCW lectures? I've been meaning to dive into SICP and trying to decide if
I want to use a video supplement, and if so, which.

~~~
MarkBook
One of the good things about the MIT videos is that they don't have the amount
of "administrative stuff" which the Berkeley lectures have (ie stuff about
where this and that lecture will be next week etc etc). So the berkeley
lectures could do with editing that out. OTOH I think Brian Harvey is a very
good lecturer as are abelson and sussman. Sound quality on one or two of the
MIT lectures is poor in parts. If you have time might not be the worst idea to
watch both sets. Edition 1 of the book was current for the MIT videos whilst
edition 2 is current for the berkeley series.

~~~
thesethings
Definitely agree about the administrative stuff! Stanford videos have that,
too. (At least the ones I've seen.)

------
yewweitan
A tome like SICP takes time to get through it, and I think it's more because
of the way our brain functions more than anything else.

My strategy when working through the book was to slowly chip away at it,
sometimes non-sequentially, and let the ideas slowly stick. When I say, non-
sequentially, I mean to say that I would look at all the chapters, think about
my current knowledge base, and then try to attack as many chapters at once.

Many will disagree with this style of learning, and the initial confusion
lasts longer than I'd like, but eventually, all the thoughts just suddenly
click.

That said, SiCP was a totally different beast, where the knowledge had to be
accumulated and used throughout the book.

I think the most efficient way, would be to read each chapter multiple times
first, trying to get key ideas (not everything) to stick.

Then proceed on to the problems, but set a time limit for each problem.
Seriously, this book is so huge that one will never get all the problems done
(i haven't, but that's part of the plan). Go search for some answers to easier
questions, tackle those of roughly the same level of difficulty, then move on
to more difficult questions, never obsessing over the fact that you couldn't
solve a problem.

Because many of the ideas are one step removed from "everyday programmer",
investing heavily (you be the judge) in the problems alone won't be worth it.

The best thing that I did however, was to "leave some questions in the tank"
and re-read chapters at fixed intervals (say on every Monday), and attempt
problems that I previously needed assistance to solve.

Oftentimes, I realise that I managed to solve it far more efficiently and with
much cleaner code (and am constantly surprised by the difference in code
quality compared side by side). Rewriting code in a different language also
helps (eg: I'm doing Project Euler in python and Common Lisp)

Finally, I think you'll enjoy the journey much more if you pace yourself and
give it at least a year to work it's magic.

------
asdflkj
I would actually advise against the MIT lectures. The authors are much better
recorded than live, as it were, and the only videos I could find are of very
bad visual quality. The book is written so clearly that it requires no further
explanation. But, hey, try them--maybe you'll like them.

Don't skip exercises. All the meat is in the exercises. I think there's a
bunch at the end of Chapter 2 that make you write a lot of verbose code, to
teach you stuff that you probably already understand if you've done OOP. The
ideas explained in that section have since got more than their fair share of
popularity in the mainstream. Anyway--I skipped those. But many others I
thought I'd skip, only to come back to them later and wish I'd done them the
first time.

~~~
flipp
The MIT lectures are super old - from the 80's I think. Berkeley's version of
SICP has lectures that are much more up to date.

------
Herald_MJ
There's a reading group starting up on the University of Reddit
(<http://reddit.com/r/universityofreddit>) - the idea is you each go away and
read a chapter, then come together to discuss what each person thought, and
any problems they had.

I think this is a great way to motivate readers and tackle leaps of
understanding.

The course website is here:
[http://www.reddit.com/r/UniversityofReddit/comments/cktdq/cl...](http://www.reddit.com/r/UniversityofReddit/comments/cktdq/class_sicp_reading_group/)

------
pavelludiq
My advice? Take your time, do the exercises, re-read the stuff you didn't
quite get, learning is not a speed race. Its a hard book.

------
abecedarius
Here's how I went about it. First, I read Abelson & Sussman's super-condensed
SICP article, <http://dspace.mit.edu/handle/1721.1/6064>

Then I ordered the book, and during the month it took to arrive (back in the
80s), worked out the themes from the article in programs of my own. When the
book came in, it was extremely instructive to compare with how I'd tried to
flesh out their ideas -- for example, I'd come up with a scheme to express
dataflow pipelines by hooking up coroutines in continuation-passing style,
inspired by their CPS-coded pattern-matcher; then the lazy streams in the book
were a revelation -- a beautiful solution to the same problem, as a data
abstraction instead of a pattern of control. (And then it was interesting to
see how you could refactor the different solutions into each other.)

I'm not going to tell you to go about it the same way, but there is a
principle there: struggling with a problem yourself before seeing how the
masters do it, you're much better prepped to learn from them (and eventually
you'll find yourself getting somewhere they didn't). Feynman emphasized this
point.

Anyway, book in hand, I worked straight through doing most of the exercises
and also related problems that'd occur to me along the way -- anything that
piqued my interest. Again, going off on your own tangents is not to be
scorned. The concepts or sections to pay particular attention to are the ones
that interest you, yourself.

I spent 2-3 months, I guess, taking up all my hacking time. It was totally
worth it, though nowadays there's _far_ more competition in easily-available
worthwhile programming stuff to study. I've heard of some online study groups
for SICP -- don't know if they're active.

~~~
Magneus
This group is JUST starting right now. We're on week one:

<http://universityofreddit.com/v2/class.php?id=57>

------
oscardelben
It took me several months to go through it, and I skipped the exercises in the
last chapter (and some others). Giving yourself a timeframe is not a good idea
in this case, as you would probably spend around one year if you do all the
exercises.

------
seancron
Wow, thanks everyone for the responses. It looks like the general consensus is
that while reading the book is important, also do the exercises, in different
languages if possible, as that's where you'll really start to understand the
concepts.

I'll have to take a look at the Berkeley videos to see how they compare to the
MIT videos. I am however going to use them more as a supplement to help me
understand sections I'm having trouble with, rather than going through them
systematically.

As far as the timeframe of two months, two months is not a deadline to finish
and completely comprehend the book. I understand that can take years. Two
months is actually how much completely free time where I can concentrate on it
before I have before I head back to college where one of my courses is using
SICP as the textbook for the semester. I won't, however, be able to devote my
full concentration to SICP as I would like to during the school year because
I'll have other work that I need to do.Wow, thanks everyone for the responses.
It looks like the general consensus is that while reading the book is
important, also do the exercises, in different languages if possible, as
that's where you'll really start to understand the concepts.

Thanks for your help everyone!

------
d0m
I read it for a first time in a couple of weeks by skimming over the exercises
and sections I didn't want to read.

Then, some months after that, I read it a second time but I did the exercise
and read every section.

In SICP, the exercice aren't there to "only make sure you've understood".
There are actually a lot of new content in the exercises.. I don't
particularly like that because if you can't answer an exercise, well, there is
no solution :p (Of course, you can browse the web, ask people, etc.)

Or sometime, it asks, eva-lua-tor thinks that, L. Hacker things that, who's
right? So, you answer.. but how can you know you've got the right answer?

Anyway, this is a great book. In my opinion, the chapter based on the
evaluator is the most important and the one that has the most impact on my day
to day life.

------
gcv
As others said: do the exercises. In response to your question about which
sections to pay special attention to: the metacircular evaluator. As a
slightly burned-out hacker, I often think of how much fun that was when I must
motivate myself to write another line of code.

------
imp
There's people working through the class on my learning website, Curious Reef:

[http://curiousreef.com/class/structure-and-interpretation-
of...](http://curiousreef.com/class/structure-and-interpretation-of-comp/)

There's already a lot of work available that others have posted which is handy
if you get stuck or want to see other ways of solving the problem.

------
pgbovine
do the exercises not only in Scheme, but also in your own favorite programming
language. this will help you see differences in programming languages and also
allow you to understand which concepts are language-independent and which ones
are just an artifact of the particular implementation language

------
keefe
I'm not a huge fan of LISP (sacrilege to this board...) and read this long
after being a pro dev, so I read for general concepts and supplemented
elsewhere.

------
kunjaan
Watch Berkeley's lectures if you are starting out. They are superb.

------
mkramlich
how do you get the most out of [computer book]?

