Have you read your SICP today?
Also known as SiCp
(pronounced "sick pea") or TheWizardBook
Full text online: http://mitpress.mit.edu/sicp/full-text/book/book.html ISBN 0262011530
Set of video lectures are available for download to accompany book
Scan of an older version, closer to the first edition the lectures are based on: ftp://publications.ai.mit.edu/ai-publications/pdf/AITR-735.pdf
The Abelson and Sussman lectures, the first edition of the book, and the AI lab technical report above, all use an old version of SchemeLanguage
where the false value, the empty list, and the symbol "nil" are all the same (like in older lisps and CommonLisp
). The second edition of the book uses a more modern version of SchemeLanguage
where the false value is #f, the empty list is (), and the symbol nil is a normal symbol, like any other, without any default binding or special meaning.
A different set of video lectures are at ArsDigita
's wiki for his own programming textbook, ConceptsTechniquesAndModelsOfComputerProgramming
, has a subsection for showing translated Scheme snippets and solutions to the SICP exercises in a variety of other programming langauges (such as the OzLanguage
used in his textbook).
Peter Norvig, director of research at Google, recommends this book as the best intro to Computer Science. Personally, I found that if you're willing to respect it and invest a lot of effort to understand it, it's a great intro to nearly all aspects of both CS and software development.
I would argue that the biggest problem with SICP is that it only is effective for exceptionally capable teachers, and exceptionally motivated students. Because it is so extremely abstract, most readers would perceive a disconnect between it and the everyday act of programming - even in Scheme. It is a demanding book that its intended audience - first year CS students - rarely are prepared for. I've noticed that the positive reviews (like those of most challenging literature, such as JamesJoyce
) come primarily from those who studied the text on their own, while most of the negative reviews come from those who either taught or were taught with it.
It also suffers from some outdated assumptions - not about computer science, but about the students, and about the goals of programming. The book is intended to be a primer for novice students on advanced academic or engineering career tracks, aimed at teaching the basic theory of computer science. However, in the modern world of ubiquitous desktop computers with flashy graphical interfaces, most students have at least a year of experience in more conventional languages, and often have been programming since their early teens; they are usually familiar with very elaborate and powerful development environments which automate much of the programming process. Most have a very LanguageCentric
or even IdeCentric?
view of programming (which most other books on programming encourage), and thus tend to equate programming with coding in their language of choice - and often have ill-informed prejudices about languages they don't know.
As a result, many come to the text with a lot of existing expectations about what a language and an environment should do. They are often immediately frustrated with the extremely minimal subset language used (and in case such as MIT Scheme, the equally minimalist programming environment), even if the purpose of covering the material from first principles is explained. The tasks given in the book seems simplistic and pointless to many, while at the same time often require a deeper understanding than they have needed in the past to get by. They expect to be able to immediately jump into advanced tasks such as game design without having to worry about the details - those are what libraries are for, after all - and cannot see the point of 'wasting time' understanding these fundamentals, especially when presented in a language which is so alien and whose idioms are in direct contradiction to those they already are familiar with. Finally, most students of programming are looking for practical knowledge, and are used to getting it without much fanfare; the heavily theoretical nature of the book is off-putting to them.
In order to overcome this, the students have to first see the value of the theoretical material, and need the patience to slow down and work through the material step by step, absorbing the nuances; they have to be willing to return to the state of BeginnersMind
so they can grasp this alien viewpoint. However, it also requires a professor who can bridge the gap between theory and practice, and show how this very mannered and pedantic material relates to more conventional programming. The text does not live on it's own; the teacher must breathe life into it. -- JayOsako
Anyone who isn't in a state of BeginnersMind
, isn't ready to learn anyway. One must first learn how to learn, and walking into a classroom with notions about how things should be, is the student's fault, not the book's.
While I agree that this is how it
ought to be, it rarely is the case. While it is not a flaw in the book itself, it would be wise if the authors made some effort to address the issue in later editions. Whether this could be done without losing the essence of the original text is an open question. -- JayOsako
It's hard for freshman CS students to enter the first semester with BeginnersMind
. Remember, four months ago they were seniors; they have to get used to being freshmen again. And as said above, they've probably been coding for several years and think they know something about programming. A new edition of the text would do well to recognize this: "you think you know how to program, and indeed you may. This book teaches deep logic and deep programming. Master this, and you'll be a better programmer in almost any language". -- RobMandeville
[SICP is arguably a better final-year text than a first-year text.]
Quoting from the book:
- In effect, we conjure the spirits of the computer with our spells...
- The programs we use to conjure processes are like a sorcerer's spells. ...
- Thus, like the sorcerer's apprentice, novice programmers must learn to understand and to anticipate the consequences of their conjuring.
The programming equivalent of Tai Chi: it moves slowly, is harder than it seems at first, and most people get fed up with it after a short time, but if you stick to it, it give truly impressive results. -- JayOsako
This is one of the best computer science books ever. It is the introductory CS textbook at MIT, and it is probably too fast-paced to be a good book for most introductory courses, but it is an excellent book for CS graduate students to read to get ready for PhD qualifying exams!
To me, this book was nothing short of a revelation. It made me think of computer programs on a higher plane. The defining moment was their crystallization of the central aspect of computer programming:
- The interpreter, which interprets and runs computer programs, is just another computer program.
This leads to programmers viewing themselves more as special purpose language designers than users of an (already existing) dialect. I found this fascinating. Fortunately, I no longer use C++ at work, I now use CommonLisp
, and try to apply the principles therein daily. -- AlainPicard
Do not read reviews of this book. Read the book. Do the exercises. It will teach you more about the essence of programming than any other book I know. -- ChristianLemburg
Actually, I think it is great fun, and also somewhat educational, to read reviews of SICP. In particular, I recommend going to Amazon and reading the reviews there. There are many very positive reviews like those given here, but there are also are some fascinating *highly* negative reviews from some sad folks who just "don't get it".
Most of the negative reviews may be fun, but I found the comment by someone who claims to have taught a CS class that "virtually every conventional algorithm is NOT implementable in scheme" disturbing. No wonder most serious programmers teach themselves.
"Sicp is the most important printed literature to develop from our species in the 20th century." -- Part of a Review from Amazon.
I bought this book a few months ago based upon the recommendations of SlashDot
and some co-workers. I really enjoyed it. It is rather dense and therefore is not something you can just breeze through, but the material covered really made me think about programming from a completely different angle. It was also my first introduction to any LISP dialect, but don't let that hold you back. It gives you enough introductory material to be able to follow the discussion. Highly recommended. -- GregVaughn
I've been recommending this book to my students for a decade or so. I expect I'll still be recommending it when I retire, which won't be soon. It is not an easy book, but it is a great book. -- RalphJohnson
This book opens a hole in my mind towards thinking about programming. Learning prolog, smalltalk, forth and sml later taught me some other ways of thinking, but unfortunately no books in those languages carry the same spirit as sicp. ThinkingForth
is nice, but somehow not as deep. Perhaps someone can write a book called "Structure and Interpretation of Object Oriented Programming" (sioop) in smalltalk. -- TX
See also: SchemeLanguage Yes, but do not be misled: this is not a book about Scheme; it is a book about the fundamental aspects of computer programs.
(Though it also teaches Scheme)
Just how tied to the SchemeLanguage
is SICP? What do you think is the minimum set of language features you would need to complete the exercises and come up with analogues for (or bypass) example code and concepts in the book?
Less than you might think. You will need to understand Scheme to read the examples. The specific language functions involved, IIRC, are define, lambda, let/letrec (and closures), arithmetic functions, if, car/cdr/cons, set!/set-car!/set-cdr!, and at the very end, the vector functions.
But the book teaches Scheme as it goes along - or rather, it introduces you gently to Scheme, and you'll pick up the details as you go along. Scheme's a tiny language, and unlike CL, functions are very well named. So as long as you don't get thrown into the deep end of lambdas and call/cc (and SICP doesn't do that; lambdas are introduced gently, I don't think it mentions call/cc at all), you can learn it just by reading.
Of course it mentions call/cc, for example, in the section about the AmbSpecialForm (see later).
Most of the book is about building up higher and higher level abstractions from these primitives. So it does discuss map/fold/filter, but it explains how you get this from recursion on lists. There's a section on non-deterministic computing, but instead of just throwing amb, fail, and call/cc at you, it first explains the concept of a "continuation" and then works that in explicitly with the existing framework.
Probably the best way to read the book is to forget everything you know about programming (assuming you don't have prior experience with Lisp), and approach it as if you were a bright MIT freshman exposed to programming for the first time. "Anyone can learn Lisp in a day, but if he'd previously been exposed to C, it'd take 3 days..." If you try to map Scheme concepts onto on imperative framework, you could have a really tough time. It's easier to follow their explication from the beginning and not worry about how it compares to imperative or OO languages. -- JonathanTang
My question is more along the lines of "Which concepts are they trying to teach that require creating a (simplified) Lisp dialect with guaranteed tail call optimization?" I'm working my way through chapter one, rewriting examples and doing exercises in Forth, and wondering when I'll run out of gas (after a complaint that there are no good intro CS texts using Forth; StartingForth
isn't it). So far, I've noticed the distinction between recursive and iterative processes is brought out into the language syntax, and binding isn't an issue since parameters are unnamed.
Actually, SICP only uses a small subset of SchemeLanguage (which is already a very small language to begin with). In order to avoid any system-dependent material of even the most trivial sort, it intentionally does not discuss console or disk I/O (except for a passing uses of the (display) and (error) functions), loading external source code, macros, and the like. It also avoids many standard features of Scheme which were deemed unnecessary for their purposes - the (do) iterator, vectors, characters, strings (except, again for a few passing uses with no explanation). Much of the book is spent re-implementing features that are part of the core language (e.g., rational numbers, (delay) and (force), etc) to demonstrate how they could be built up from the underlying primitives.
While this is admirable, and very valuable, it can also be quite dry and puzzling to a novice, and gives the incorrect impression that Scheme is a hopelessly crippled language where you must ceaselessly reinvent the wheel to do even trivial tasks. It can be particularly frustrating to students who are familiar with more conventional texts which emphasize immediate practical results rather than first principles. For this reason, it is often suggested that SICP be taught either after, or together with, a text on SchemeLanguage such as SimplyScheme or HowToDesignPrograms. -- JayOsako
It is not a book you can just read through. You gain most by reading beside the computer with a Scheme interpreter and running the examples and exercises. -- NatPryce
I had it in an introductory course at university, then forgot about it. Now I'm writing an interpreter, and remembered that SICP had some chapters about that. I found their description of an interpreter brilliant, at exactly the right level of abstraction, both code-wise and text-wise.
One of those books which, on Amazon, gets either very good or very unfavorable user reviews. I am tempted to say that the people who don't like it are the ones who just don't get it
This, of course, is a classic example of the IfYouDontLikeItYouDontUnderstandIt fallacy. While there is always some portion of people who can't or won't learn in some style or who really weren't interested, it's still rather a germane criticism of an educational book to say that one doesn't "get it". I personally thought the book all right, but _very_ abstract and desiring of a "real world" companion volume that leverages the power of an existing scheme platform, such as PLT scheme. No-one gets excited by implementing rationals, but plotting a mandelbrot at least makes pretty pictures.
Hey language designers. You will save us all a lot of trouble if you study this book carefully before you start your next design.
Working on it... ;)
Am working my way through this as of early 2004, as one of a "virtual study group". Each section brings at least one unsettling insight, that throws new light on my prejudices about programming. The pacing of exercises is gentle, with the occasional nasty surprise thrown in to ward off complacency. Highly recommended. -- LaurentBossavit
I see tons of great reviews on this book, and I'm reading it, but I'm very interested in all these "mind expanding insights" everyone seems to have. How about a few people who've finished this share some of what those insights were rather than just teasing us?
[Perhaps if you have been discussing these issues for a while they aren't insights anymore, they are just facts.]
Yes, but what are these facts that you didn't grasp until SICP?
I'm not the OP, but I found the discussion of state in programming enlightening. Among the topics: The way in which the use of state in programs is tied up with time in the real world; the advantages and disadvantages of using state; the concept of using streams as an alternate to local state variables; the problems this runs into when you introduce concurrency. This whole discussion in the book (sections 3.1 and 3.5.5 are what I'm thinking of in particular) is full of important ideas.
Thank you, I'll read that section tonight.
I found the breakdown of programming into primitives, means of combination, and means of abstraction to be useful. While I think it misses a 4th category (means of restriction, like scoping rules, StaticTyping, or private/protected/public), it's a very useful way to think about programming and language design.
I also thought the environment model of computation was wonderfully clear. I had a tough time understanding LexicalClosures before that, because the concept mixes static and dynamic structure. The environment model made it wonderfully clear. -- JonathanTang
I personally found the section on the AmbSpecialForm
mind-blowing. -- StephanHouben
MIT has an online course by the same name at http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/CourseHome/index.htm
An excellent book for those of the lambda calculus bent (SymbolicLogic
). For those of us on TuringMachines
, however, not recommended at all. See ComputerScienceVersionTwo
See also ConceptsTechniquesAndModelsOfComputerProgramming
CategoryBook CategoryOnlineBook CategoryScheme