15 ms·
Why SICP Matters
- zwieback 13y agoI studied ME and my only computer course was Fortran but over the years 70% of my work has become programming. For me SICP was a great introduction to CS. Up to then I had the typical practitioner's view that computing is all engineering and no science but SICP changed my view.
- webreac 13y agoWhen I was student, my school has decided to stop using Ada as teaching language. They were hesitating between CAML Light and Scheme. They asked me my feeling because I was one of the rare student to know well both of them. I like both of them, but I choose CAML Light. Scheme has a lot of parenthesis that makes it look very old fashion. Scheme type system was also outdated. Programming in CAML Light was more fun for me, the syntax was simple and pleasant. The currification was cleaner in CAML Light. 20 years latter, CAML Light does not exist anymore, but I still think that my choice was right. My school has choosen CAML Light.
- seanmcdirmid 13y agoWas the school in France? These don't seem like very good reasons to choose one over the other; the choice probably came down to culture.
- endgame 13y agoCan you elaborate? Is your school still using CAML Light, or have they moved on to some other language (O'Caml?)? How effective was it as a teaching language?
- webreac 13y agoAccording to their site, they have switched to python followed by java the second year. As it was after I finished, I have almost no feedback.
- bru 13y agoHi, >CAML Light does not exist anymore French classes prépa[1] have been using it in the CS course until this year (I have heard it would be dropped in favour of Python next September). So even though there hasn't been any development for the past 10 years[2] it still exists! And then there is OCaml which is still lively. Even though a CS graduate may say that S-expressions are the simplest syntax possible - not that he's wrong - I'm happy I discovered functional programming through OCaml, whose syntax feels way more natural (to me at least). 1: http://en.wikipedia.org/wiki/Classe_pr%C3%A9paratoire_aux_grandes_%C3%A9coles http://en.wikipedia.org/wiki/Classe_pr%C3%A9paratoire_aux_gr... 2: at least according to http://caml.inria.fr/caml-light/release.fr.html http://caml.inria.fr/caml-light/release.fr.html
- calinet6 13y ago"Scheme has a lot of parenthesis that makes it look very old fashion." Might I argue that this is a huge advantage? No one knows scheme, and it's very obscure, and looks nothing like other programming languages. This means that you can teach concepts using it and pre-judgements about the language don't get in the way. Then, I suppose the same could be said of CAML and its obscurity.
- webreac 13y agoWhich one is obscure ? define factorial (lambda (n) (if (= n 0) 1 (* n (factorial (- n 1)))))) let rec fact = function | 0 -> 1 | n -> n * fact (n - 1);; There is a little more syntax to learn in caml, but the suppression of 90% of the parenthesis makes the code far easier to read.
- gnosis 13y agoWith syntax hilighting and proper indenting, the Scheme code is pretty easy to read: http://img1.imagilive.com/0413/scheme-fact.png http://img1.imagilive.com/0413/scheme-fact.png You could even simplify it a little by getting rid of the lambda: http://img1.imagilive.com/0413/scheme-fact2.png http://img1.imagilive.com/0413/scheme-fact2.png In any case, I find toy examples like this less than convincing. In real-world programs, issues of style, design, and documentation usually trump most anything else, as far as clarity is concerned. Also, I personally find the penchant for one-letter variable names in the OCaml/SML/Haskell world to be very confusing and obfuscating. The Scheme way is to be more verbose and explicit. For me, that results in much greater clarity -- especially when looking at unfamiliar code or code that you've stepped away from for a few months. Of course, there also such a thing as being too verbose and explicit. But for me, Scheme is in the sweet spot between verbosity and terseness.
- davexunit 13y agoI find the lisp easier to read.
- eru 13y agoE.g. Haskell has enough syntactic sugar for some an even simpler version factorial n = product [1..n]
- gcv 13y agoDynamic typing is outdated?!
- DigitalTurk 13y agoI'm a big fan of Clojure but I think this is true. I expect that in this decade we'll start seeing a shift to programming languages with so-called algebraic type systems. Java, Python, Ruby, and Clojure will seem outdated just like C++ seems outdated now (not that it doesn't have its uses).
- gcv 13y agoC++11 is not outdated. Except for backwards-compatibility artifacts like header files, it's actually quite modern and pleasant to use. If performance is a consideration, then, put bluntly, it's the only high-level language available.
- adonm0k 13y agohopefully rust will fill this void, pun not indented
- eru 13y agoYes, since at least 80s or so. Languages based on Hindley-Milner type system (https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner) are static and nice to work with. E.g. OCaml or Haskell. I have some professional experience in rewriting Python and Ruby programmes in Haskell. I make the same amount of stupid mistakes in Python as in Haskell. But whereas Python blows up at runtime / test time, in Haskell it's the compiler yelling at me. The nice thing: that's much faster to detect, and also saves me writing about half the tests. Don't get me wrong, dynamic typing beats inane static typing like C's or Java's. But good static typing beats dynamic typing.
- gnosis 13y agoI have experience with OCaml, and I don't find its static typing to be nice to work with at all. I like the final result of safety, and how whole classes of bugs are excluded once I get my OCaml program to compile. But the process of getting my program to compile in the first place is pretty painful and not fun. Then again, writing endless unit tests in a dynamically typed language like Scheme is not much fun either. But I don't have to write the unit tests until I've written some functional portion of my program (or even the whole thing) and am satisfied with its design and how it works. Then I could add unit tests or even rewrite it in a safe language like OCaml, if I wanted to. As I said elsewhere in this thread, for fast prototyping and sheer pleasure of programming, I find Scheme very hard to beat.
- gnosis 13y agoI went from SML, Caml Light, and OCaml to Common Lisp, and then to Scheme. I prefer Scheme by far to any other language I've ever used (which includes a whole bunch of languages not listed above). For me, Scheme is much more fun to program in than OCaml, etc. With OCaml I found myself constantly wrestling with the compiler to get my program to compile, and had problems decyphring its obscure error messages, which seemed to require taking university-level courses on type theory in order to be understandable. With Scheme, my programs mostly "just work", and I can program the way I think. Some people have problems with Scheme's parenthesis, but I personally quickly learned to love them because they make scope explicit and obvious. Through long and bitter experience, I've learned to value explicitness and clarity in programs above almost everything else. Scheme is great for that. True, Scheme might not be as safe as OCaml and friends, but for ease of programming, speed of development, and sheer pleasure, I find it very hard to beat.
- tikhonj 13y agoThe most useful didactic feature I've found in ML-like languages--Haskell for me, but they're all somewhat similar--was pattern matching. Honestly, pattern matching is what really got me to understand recursion. It also makes the language feel much more declarative than using `if` and `cond` statements.
- gnosis 13y agoIt's possible to do pattern matching in Scheme, though it's not standardized (AFAIK). Here are some approaches: https://curiousprogrammer.wordpress.com/2006/12/08/pattern-matching-in-scheme/ https://curiousprogrammer.wordpress.com/2006/12/08/pattern-m... http://www.javaist.com/blog/2008/11/12/pattern-matching-in-scheme/ http://www.javaist.com/blog/2008/11/12/pattern-matching-in-s... http://wiki.call-cc.org/eggref/3/pmatch http://wiki.call-cc.org/eggref/3/pmatch http://wiki.call-cc.org/man/3/Pattern%20matching.html http://wiki.call-cc.org/man/3/Pattern%20matching.html http://www.ccs.neu.edu/home/samth/match-ifl-full.pdf http://www.ccs.neu.edu/home/samth/match-ifl-full.pdf http://download.plt-scheme.org/doc/203/html/mzlib/mzlib-Z-H-19.html#%_chap_19 http://download.plt-scheme.org/doc/203/html/mzlib/mzlib-Z-H-...
- yanatan16 13y agoI didn't discover SICP until after I had graduated from a good CS school. Its clear and away the best programming book I've ever read, even for an experienced developer.
- minikomi 13y agoI think thats the great thing about SICP and its younger, more spritely cousin The Little Schemer - they're both really good to read.
- merqumab 13y agoWhich would you recommend to read first?
- minikomi 13y agoThe little Schemer Don't worry if the last few parts don't make too much sense.. I went back and forth between the two quite a lot
- jimhefferon 13y agoPersonally, SICP. I found that the format of LS got old fast.
- tcdowney 13y agoNot to mention the patronizing "Now go make yourself a baba ghanoush pita!" and "This space reserved for jelly stains." Maybe the humor was just lost on me...
- mrspeaker 13y agoYep... I was coder for many years before I discovered it. I'm mad at my university for not forcing it on me!
- calinet6 13y ago
- sepeth 13y agoSICP videos are also great. The first part of the Lecture 1A, talks about "computer science". From the first moment, we learn that computer science is also not really much about computers. "...when some field is just getting started and you don't really understand it very well, it's very easy to confuse the essence of what you're doing with the tools that you use..." "...Well, similarly, I think in the future people will look back and say, yes, those primitives in the 20th century were fiddling around with these gadgets called computers, but really what they were doing is starting to learn how to formalize intuitions about process, how to do things, starting to develop a way to talk precisely about how-to knowledge..."
- minikomi 13y agoGerald Sussman is a fantastic, enthusiastic teacher. It takes a little getting used to watching him write all that code on a blackboard but the videos are a great compliment to the book.
- calinet6 13y ago"...when some field is just getting started and you don't really understand it very well, it's very easy to confuse the essence of what you're doing with the tools that you use..." So true of so many fields, namely photography. Can't tell you how much camera gear I bought before I finally sold it all and started taking photographs. As it is with computers. Languages mean nothing, it's the concepts that matter.
- Spooky23 13y agoI wish my school had used this book. The first year of CS at my school was futzing around with operators and basic data structures. No tie-in to the big picture.
- protez 13y agoBut an average student might need the exposure to other "common" paradigms from C, Python, or Java, before getting introduced to SICP, to "fully appreciate" the power of functional language.
- jfb 13y agoPedagogically speaking, I think this is backwards. SICP isn't a course in functional programming; it's a course in programming. And the use of Scheme is critical, because it doesn't waste time on nonsense like classes and structs and other ephemera -- you just jump right into the conversation with the computer.
- mng2 13y agoWhen I went to Berkeley, those with no programming experience were encouraged to take CS 3 (Simply Scheme) before taking CS 61A (SICP).
- jfb 13y agoAt Chicago in 1990, there were two intro classes; if you wanted to study CS (a math major at the time), you took 115/116, which were basically 6.001.
- iTrollFreely 13y agoit's not a course in programming. it's about problem solving and critical thinking. programming is just the means to achieve it.
- james1071 13y agoagree-that is what is so good about SICP.
- taeric 13y agoI have to confess I just discovered you can order a relatively cheap copy (well, compared to Amazon) of SICP direct from MIT. I have only skimmed so far, but combined with the lectures I have to say that I really wish that had been my introduction to programming. Maybe it is just because of where I'm at, but it really feels like in the first 3 lectures some of the more elusive topics of programming are at least touched. Sure, you will need to seek out more, but it is not as hidden behind "but for this language, you have to do this" kind of crap.
- edem 13y agoYou can also read the online version which is free!
- cmaher 13y agoAt the website: http://mitpress.mit.edu/sicp/full-text/book/book.html http://mitpress.mit.edu/sicp/full-text/book/book.html Or as a pdf: https://github.com/sarabander/sicp-pdf https://github.com/sarabander/sicp-pdf
- kruhft 13y agoAnd info: http://www.neilvandyke.org/sicp-texi/ http://www.neilvandyke.org/sicp-texi/
- brudgers 13y agoLink to the book at MIT Press [ Paperback | $49.00 | £33.95 ] http://mitpress.mit.edu/books/structure-and-interpretation-computer-programs http://mitpress.mit.edu/books/structure-and-interpretation-c...
- tobinfricke 13y ago> I have only skimmed so far For the mind-blowing effect to occur, you must actually do the exercises. (-:
- 13y ago
- stiff 13y agoUniversities are communities of people from very different sub-disciplines, with every person considering their own sub-discipline or course the most important one, and as a result the curriculum is diluted and hurried to please the greatest amount of people. It might have its benefits, but if training great computer scientists is really the goal, I think it is a bit of a pity you cannot go to a place where you could just do a mix of SICP, algorithms and mathematics for full three years, spending much more time with a single instructor on a single broad topic.
- eru 13y agoActually, you can do something really close. The trick is to study mathematics and specialize from there, e.g. in algorithms or mathematical optimization.
- calinet6 13y agoExcellent article. I'm immensely glad and lucky to have had Brian Harvey as a professor, and this echoes exactly what he taught us and the general teaching at Berkeley: that the concepts of programming and computer science were of paramount importance, and that you should understand them in the abstract. To this day, this is why I value a good theoretical CS education, why I value university education, and why I continue to look back on and use my supposedly theoretical and impractical CS education with great respect. This is so true: "learning another programming language isn't a big deal; it's a chore for a weekend. I tell my students, 'the language in which you'll spend most of your working life hasn't been invented yet, so we can't teach it to you. Instead we have to give you the skills you need to learn new languages as they appear.'" Can you imagine how valuable it was to be told that from the start? He's right about scheme too: part of the value of using Scheme or Lisp is its inherent crazy unfamiliarity to the great majority of students. The first thing when you see all those parentheses and weird paradigms is "woah, this is unlike anything I've seen before." And that's perfect. You don't get lost in things you think you already know—you learn concepts fresh and the language, because it's so weird and wild and totally abstract and you can't imagine using it for any real project—is as malleable and temporary as modeling clay. You get to make things with it that teach you about art, and how to look at things, how to see infinity—not about the properties of the materials in your hands. For this reason among others, it's profoundly disappointing to me that Berkeley has switched their introductory language to Python. As great as it is, it's no Scheme, if only for the fact that its popularity and usefulness as a language detracts from the underlying concepts. I have to think Brian Harvey fought this change, had he not retired and lost some influence. "Every five years or so, someone on the faculty suggests that our first course should use language X instead; each time, I say "when someone writes the best computer science book in the world using language X, that'll be fine.'" SICP was, in retrospect, a masterpiece of education. Someone sat down and thought about exactly these concepts and how best to elucidate them without getting in the way of the connections being made. The new trend toward applications-focused education feels to me like the wrong direction, and I don't think I would get as good an education today as I did learning abstract concepts theoretical computer science taught as the most important part. Sure, it's fun and attractive to think about applying what you learn to the revolution at hand quickly, making mobile apps and designing robots and putting everything together into useful applications, but you can learn all that stuff after a couple semesters of awesome CS core theory anyway. And while you might get frustrated for those 2 years as an 18-year-old hotshot upstart startup-minded student, in 10 years you'll look back on it and think, "wow, that really was the most important part."
- denzil_correa 13y agoSlightly off-topic : You can download the epub version of SICP from here. https://github.com/ieure/sicp https://github.com/ieure/sicp
- zoz 13y agoI took Brian Harvey's SICP course, what I didn't realize until I read this article is that I was in the first class he taught in 1987. I remember helping a friend in the course. We stared at five lines of code while I tried to explain it, he had a really hard time with it (some type of recursion I assume). I still hold the lesson from that tutor session. Write code to be easily read by the average joe. Python, Ruby, etc are great because they are easier to read by more people. Languages are about people not machines. p.s. I am still writing code today, and loving it.
- ramkalari 13y agoI was working through the coursera functional programming course on scala which is modeled on SICP. While the content is really good, it suffers from the same problems pointed out by Dr Harvey. Getting used to scala syntax takes time while Scheme was a breeze.
- zenbowman 13y agoYeah, Scala is the new C++ - immensely powerful but there's ten different ways to do everything. I like the language, but I'm simultaneously disgusted by it.
- happy_dino 13y agoTrying to have a small language sometimes results in allowing (or having to allow it in the sense of not outlawing it) multiple ways to do the same thing, especially as the expressiveness increases. As an example, I don't think Python's “there's only one way to do it”-approach would have a chance of surviving if the language was as expressive as Scala. In the end, as long as Scala stays simpler than Java 8 and vastly simpler than F#, C# and C++, it's good enough for me.
- ericssmith 13y ago"there's ten different ways to do everything" I believe this observation is a bit misleading. Indeed, Scala does offer some alternatives, but these are helpful in the transition from other languages with less powerful type systems. Idiomatic Scala is not really a hodge-podge of choices.
- chrismaeda 13y agoSICP is a masterpiece. I took the old MIT 6.001 in Spring 1986 where we burned through the entire book in about 14 sleepless weeks. Sussman was the lecturer and Rod Brooks was my recitation instructor. I was like 19 years old at the time and it was the most intellectually beautiful thing I had ever experienced. I ended up acing the course and went on to get a PhD in CS. I've never read a better book on programming.
- icambron 13y agoI wish that had been my experience with it. I did well in the class, but I didn't learn nearly as much as I should have. To be clear, that was entirely my fault, not the class's; I was lazy and got away with a lot of shortcuts. And even when I learned real stuff, I shrugged it off as "not actually how you build programs in the real world; can't I have for loop?" (so, sooo dumb). After years in the industry and a slow, organic rediscovery of all the great concepts I should have taken to heart as a college freshman, I cracked open SICP and said, "holy shit, this is what I was being taught?" 6.001 really was incredible, had I only been smart enough to see it. Eat your veggies, kids.
- craigching 13y ago"In my experience, relatively few students appreciate how much they're learning in my course while they're in it." That quote describes me to a T. The University of Minnesota taught a sophomore class on OO using SICP. At the time, C++ was hot (this was about 1991 or 1992) and I distinctly remember someone raising their hand and asking "Why are we learning this language that we will never use again? Why isn't an OO class taught in C++?" And I remember thinking to myself "Who cares what language it's in? I'm kind of excited about learning another language." And I truly was. It wasn't until much later, after being in industry for a decade (currently starting my third decade now ;) )that I recall thinking to myself "You know, that book had a tremendous impact on how I write software and program in general, I need to pick that up again, what was it?" And I re-found it and am on my third reading of it as I write this, mostly just to refresh the ideas in my mind (since I mostly work in Java and JavaScript these days), but I have never truly finished the whole book. The class took us through chapter 3 and then sort of a mixed bag of topics from later in the book, so I've never truly read the whole book, but certainly enough of it to help me. I didn't realize it was a famous book at the time, it was just our text book. I still didn't realize it was a famous book when I re-bought it a decade later. And now I know why it is a famous book, it is that good. And though the third re-read is very familiar, I still enjoy it and find it profound.
- thisrod 13y agoI'm intrigued that anyone would teach OOP using a language other than Smalltalk. As well as giving you the bits you need to build objects, it puts them together in a dispatch system and class library, fully thought out and tastefully designed, then gives you the tools to take it apart, study how it works, think about why parts of it are clumsy, and consider the consequences of fixing them. Perhaps graphical workstations were too expensive for universities in 1992?
- marshray 13y agoI don't recall there being an open source graphical Smalltalk in 1992.
- eru 13y agoI am revisiting SICP at the moment, because a friend uses it to learn programming. But I have to say, I am not nearly as impressed with the book as I used to be. Wadler's critique "Why calculating is better than scheming" (http://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.pdf http://www.cs.kent.ac.uk/people/staff/dat/miranda/wadler87.p...) fully applies, and the book can be rather confused and ad-hoc in some places, e.g. section 1.3. A stronger focus on data structures would have been useful, instead of ad hoc recursion schemes, like version of `accumulate', `sum' and `product' they make you write in the exercises in that section, which are essentially unfoldr and foldr rolled into one---and would be better written as a composition of those functions. `How to design programmes' (http://www.htdp.org/ http://www.htdp.org/) leaves a better impression as a beginners' book for me. If you can already programme then "Programming Languages: Application and Interpretation" (http://cs.brown.edu/courses/cs173/2012/book/ http://cs.brown.edu/courses/cs173/2012/book/) is a great follow-up.
- spitfire 13y agoIf you're critiquing the book in such a lucid manner, it sounds like you got good value from it.
- eru 13y agoI don't deny that. I liked it quite a lot when I read it in my teens, and learned a lot. But revisiting the book in detail has brushed off some of the nostalgia. It is a product of its times.
- calibraxis 13y agoFor those turned off by its mathiness, one of the coauthors explained, "There’s a tremendous amount [of math] in this 6.001 book. That’s partly because we were writing it for MIT. You want to talk about higher-order procedures, so the obvious thing you can do is you can express the idea of an integral. So that’s an obstacle for lots of places. Remember, at MIT the context we were writing in is every person who took the course had just had a semester of calculus." http://www.codequarterly.com/2011/hal-abelson/ http://www.codequarterly.com/2011/hal-abelson/
- jallmann 13y agoThat is really a wonderful interview. Thanks for sharing.
- calibraxis 13y agoYou're welcome. You might also enjoy Rich Hickey's interview, as I did. http://www.codequarterly.com/2011/rich-hickey/ http://www.codequarterly.com/2011/rich-hickey/ "And, once there [writing only code that matters], you are able to achieve a very high degree of focus, such as you would when playing Go, or playing a musical instrument, or meditating. And then, as with those activities, there can be a feeling of elation that accompanies that mental state of focus."
- cturner 13y agoThanks. The mathiness has been an obstacle for me. It's not that I'm incapable of groking the ideas, just that when I sit down to play with a language I haven't yet mastered I don't also want to be learning tangential concepts. Still, I love it, and keep coming back to it. It's so readable, and scheme changed my brain.
- zenbowman 13y agoI started an SICP study group at work, where a few of us get together and watch the MIT video lectures given by Abelson and Sussman. People were a little skeptical at first, given that they consider themselves top-of-the-line l33t hackers and this is an introductory course, but after the 3rd lecture, nobody questioned the value of it. It's a timeless course.
- tsurantino 13y agoHi everyone, is there a kind of video/guided tutorial through Scheme and SICP? I have tried picking the book up on my own but have had a hard time retaining the information.
- arcs 13y agoThe course webcasts of CS61A from berkeley for various semesters are online: The ones prior to 2010~2011 used scheme, and it tracks SICP fairly closely. http://webcast.berkeley.edu/playlist#c,s,Fall_2010,EC6D76F0C99A731667 http://webcast.berkeley.edu/playlist#c,s,Fall_2010,EC6D76F0C...
- drivers99 13y agoThere is a video of the lectures from SICP, which was produced for HP. http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/ http://ocw.mit.edu/courses/electrical-engineering-and-comput...
- qu4z-2 13y agoI'd like to add that the material covered is just hard to learn, and fairly mind-bending if you're used to traditional (procedural/OO) programming. Take it slowly, don't be discouraged if it takes you hours to get something concept, and DO THE EXERCISES.
- kristianp 13y agoHere's the previous thread for this article, from 5 months ago: https://news.ycombinator.com/item?id=4784827 https://news.ycombinator.com/item?id=4784827