TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

SICP taught in Python 3 - UC Berkeley online

107 pointsby 73ChargerFanover 13 years ago
Structure and Interpretation of Computer Programs has been taught at UC Berkeley for 30 years using Scheme.<p>This semester Prof. Hilfinger is teaching it in Python 3. It isn't a formal online course, but it looks like everything is available including lectures, slides, book &#38; homework.

11 comments

postfuturistover 13 years ago
I like Python, but how do they plan on teaching recursion with a language that doesn't optimize tail recursion?<p>Oh, I see, just give them trivially small data sets: <a href="http://www-inst.eecs.berkeley.edu/~cs61a/sp12/labs/lab8/lab8.py" rel="nofollow">http://www-inst.eecs.berkeley.edu/~cs61a/sp12/labs/lab8/lab8...</a>
评论 #3491442 未加载
评论 #3492845 未加载
评论 #3491514 未加载
评论 #3491263 未加载
评论 #3491418 未加载
tikhonjover 13 years ago
A better alternative (also from Berkeley): <a href="http://inst.eecs.berkeley.edu/~cs61as" rel="nofollow">http://inst.eecs.berkeley.edu/~cs61as</a>.<p>It's the self-paced, Scheme-based version of the course. The website is currently for last semester; I have some friends working on it and they promise the next iteration (should be up soon) is going to be really awesome. I believe them.<p>Also, since it's a self-paced course, it's probably a much better option if you want to work along on your own in your free time. I think some other institutions might be using the materials from this class as well, but am not sure about that.<p>Here are the rather insightful thoughts about using Scheme vs Python for this course from its old professor (who was really awesome): <a href="http://www.cs.berkeley.edu/~bh/proglang.html" rel="nofollow">http://www.cs.berkeley.edu/~bh/proglang.html</a>
评论 #3491682 未加载
jgonover 13 years ago
Gah, stuff like this just tends to make me upset. SICP is probably still, bar none, the best text I have ever read. In any subject. Now, I'm biased towards computing and I'm sure that there are amazing texts in every field, but I would put this up against any book you can find.<p>The book touches so many fields in computing and does it in a profound, deep, yet entertaining way. Part of its ability to do so is its use of scheme, a language that doesn't give you a whole lot in conventional terms, but which also puts very few restrictions on your ability to build those things up, so you can get an understanding of them as you create them. Polymorphic method dispatch can seem magical if it has always "just worked" for you in Java, but when the text discusses a system for implementing this (several systems in fact) suddenly it all clicks, and the magic you use every day is a little bit more comprehensible.<p>And so I feel like attempts to teach SICP but in whatever the more practical language of the day is are misguided, and ultimately a little bit of a cop-out. Before you read the next few sentences let me preface them by saying that I have respect for everyone involved with these decisions even if I don't agree with them, and I don't want to come off as supposing malicious motives on their part.<p>But the overwhelming feeling I get from reading about these initiatives is that people have looked at SICP and said "Wow that is really a great book, shame about how it uses this fringe language. I know, I'll use language-x which is much more practical, and if there are areas in the text that language-x can't really handle, I'll limit the size of the recursion, or not use higher-order functions as much, etc, etc". And that misses the point. If you want to use language-x then you should probably step back and write a text using language-x that is just as amazing as SICP, and that really utilizes the strength of language-x in the same way SICP utilizes the strengths of scheme. But of course that is really, really hard work and so no one does it. Instead we get initiatives like this that dispense with the magic of using scheme and tail-recursion and lambda, and shoe-horn it into lisp, while also constraining Python to a weird lispy style doing basic things like defining your own functional binary search on a list, which is entirely against the whole reason you use python which is BATTERIES INCLUDED.<p>And thus you end up with a lazy compromise that doesn't really do justice to either the tremendous original material, or the strengths of a current language. I really think that before you decide to use SICP but with a "modern" language you should ask yourself why you are using SICP and not the amazing course material you have put together yourself to really leverage the strengths of language-x in a way that also teaches computer science. And if your answer is "Because that would be a lot of hard work, and I can just have students do list recursion in python, on small lists, and without doing too much higher-order stuff" then I submit you should abandon your plan and head back to the drawing board, with better goals, and higher standards.
评论 #3491603 未加载
algorithmsover 13 years ago
What are the main disadvantages of using python for SICP?
评论 #3491578 未加载
thezilchover 13 years ago
I wonder how much the TAs had influence on the Labs, or the Instructor is trying really hard to relate with today's students.<p>From Lab 4 [0]: Exercise 2: Data Herp Derping<p>The same lab -- possibly others -- has mixed whitespace usage (ex. str_rat method), which may be worrisome for introducing students to languages that hinge upon proper whitespace. The examples will work, as expected, but beginners may be confused by usage of or burdened by not understanding the implications of using 4 spaces here, 6 spaces there, etc.<p>[0] <a href="http://www-inst.eecs.berkeley.edu/~cs61a/sp12/labs/lab4/lab4.html" rel="nofollow">http://www-inst.eecs.berkeley.edu/~cs61a/sp12/labs/lab4/lab4...</a>
kbraderoover 13 years ago
scheme/lisp was choose by Sussman and Abelson because it does not get in the way to explain SICP.<p>Python can be a problem and get in the way; scheme was beautiful because it's so simple that all that rest to understand is the really big ideas described in SICP.
almacmillanover 13 years ago
There are 61A videos on ITunes U but it's hard to tell if they are from the Python version of the course? Anyone know if there are videos of the lectures kicking about from past years of the Python version?
willygover 13 years ago
Can someone give me a hint for Q3 in hw1? <a href="http://inst.eecs.berkeley.edu/~cs61a/sp12/hw/hw1.html" rel="nofollow">http://inst.eecs.berkeley.edu/~cs61a/sp12/hw/hw1.html</a>
mturilinover 13 years ago
Why not iTunes U?
评论 #3491566 未加载
kenthorvathover 13 years ago
Finally!
babarockover 13 years ago
A little off topic, but reading from week one include a Unix/Emacs tutorial. I wish they would stop defining "cat" as a command to "displays the content of specified files". This trend in the "Unix teaching" community is leading to a lot of terrible practice (Useless use of Cat) in the industry.<p>I die a little every time I see $ cat file | grep word
评论 #3492257 未加载