TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How can I get the most out of SICP?

53 点作者 seancron将近 15 年前
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.

18 条评论

tsally将近 15 年前
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.<p>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.<p>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: <a href="http://www.ccs.neu.edu/scheme/pubs/jfp2004-fffk.pdf" rel="nofollow">http://www.ccs.neu.edu/scheme/pubs/jfp2004-fffk.pdf</a>.<p>Good luck. :)
评论 #1485500 未加载
RiderOfGiraffes将近 15 年前
You won't get through it "properly" in two months. It really is mind-changing, and that takes time. You <i>must</i> 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.<p>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.<p>EDIT: corrected typos.
prog将近 15 年前
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.<p>Note that common lisp comes with a lot of stuff built in, but to do the above I stuck to a minimal subset.<p>Following this, it was fun to read OnLisp[2].<p>[1] <a href="http://www.ida.liu.se/imported/cltl/cltl2.html" rel="nofollow">http://www.ida.liu.se/imported/cltl/cltl2.html</a><p>[2] <a href="http://www.paulgraham.com/onlisp.html" rel="nofollow">http://www.paulgraham.com/onlisp.html</a>
NeilCJames将近 15 年前
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.
评论 #1485447 未加载
yewweitan将近 15 年前
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.<p>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.<p>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.<p>That said, SiCP was a totally different beast, where the knowledge had to be accumulated and used throughout the book.<p>I think the most efficient way, would be to read each chapter multiple times first, trying to get key ideas (not everything) to stick.<p>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.<p>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.<p>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.<p>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)<p>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将近 15 年前
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.<p>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.
评论 #1485424 未加载
评论 #1485727 未加载
Herald_MJ将近 15 年前
There's a reading group starting up on the University of Reddit (<a href="http://reddit.com/r/universityofreddit" rel="nofollow">http://reddit.com/r/universityofreddit</a>) - 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.<p>I think this is a great way to motivate readers and tackle leaps of understanding.<p>The course website is here: <a href="http://www.reddit.com/r/UniversityofReddit/comments/cktdq/class_sicp_reading_group/" rel="nofollow">http://www.reddit.com/r/UniversityofReddit/comments/cktdq/cl...</a>
pavelludiq将近 15 年前
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.
oscardelben将近 15 年前
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.
abecedarius将近 15 年前
Here's how I went about it. First, I read Abelson &#38; Sussman's super-condensed SICP article, <a href="http://dspace.mit.edu/handle/1721.1/6064" rel="nofollow">http://dspace.mit.edu/handle/1721.1/6064</a><p>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.)<p>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.<p>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.<p>I spent 2-3 months, I guess, taking up all my hacking time. It was totally worth it, though nowadays there's <i>far</i> 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.
评论 #1488822 未加载
seancron将近 15 年前
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.<p>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.<p>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.<p>Thanks for your help everyone!
d0m将近 15 年前
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.<p>Then, some months after that, I read it a second time but I did the exercise and read every section.<p>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.)<p>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?<p>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将近 15 年前
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将近 15 年前
There's people working through the class on my learning website, Curious Reef:<p><a href="http://curiousreef.com/class/structure-and-interpretation-of-comp/" rel="nofollow">http://curiousreef.com/class/structure-and-interpretation-of...</a><p>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将近 15 年前
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将近 15 年前
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将近 15 年前
Watch Berkeley's lectures if you are starting out. They are superb.
mkramlich将近 15 年前
how do you get the most out of [computer book]?