Live data from Hacker News

SICP is Under Attack

vedantk.tumblr.com

111–120 of 207 posts

Re: SICP is Under Attack

#111

> Beautiful. I guess beauty is in the eye of the beholder. A simpler way to analyze this problem is noticing the f(n-3) term implies your function has to memorize up to 3 previous results. Then just use the coefficients from the formula to cycle the next result into memory. Using algebra and generating new coefficients as per the OP's solution is unnecessary. function f(n) if n

Yeah, the rewriting goes a bit far for my taste as well... but it is a valid solution, and a purely functional one at that. Yours is valid as well, but introduces local state (which in this case probably doesn't matter, but it's worth noting nonetheless). You could write it this way in Scheme too, using a "let loop" for example, or even using a more imperative style.

Re: SICP is Under Attack

#112
I'd been programming over 20 years when I read SICP. The book was interesting. It was interesting as an introduction to functional programming. But, in my opinion, a lot of the stuff in it that is held up to be clever or informative is just difficult because the reader is expected to figure out how to to imperative programming in a functional language.

A computer is an imperative device. It is a deterministic state machine. Teaching introductory programming with a functional language is teaching students wrong, i.e. it does them a disservice. This being ycombinator, and given pg's thoughts on the merits of FP, I may not have a popular view. We will just have to agree to disagree.

Once you figure out (i.e. immediately if you have done it before) that computers are imperative, not functional, many of the "truths" or "revelations" in SICP are like "well, duh" or worse, "why the fuck did you make me go to all that effort?"

Re: SICP is Under Attack

#113
post #4

Even MIT abandoned SICP for its introductory course in favor of Python. But I believe it's featured in its second course, no? I don't consider that a mistake. If you're getting rid of it from the curriculum altogether, though, that's a mistake. This article didn't say if that was the case or not. (Also the point of SICP being language agnostic is fairly false. I mean sure you can implement iteration as recursion in o…

> Also the point of SICP being language agnostic is fairly false. I remember reading a bit of Eli Bendersky's SICP blog posts[1], where he started with the premise that he was going to work through SICP using Common Lisp rather than Scheme. I think that lasted through about half of the first chapter before he moved back to Scheme because he found it too hard to handle the differences between the two - I don't remembe…

When I started the project, I preferred CL over Scheme. Later, however, I had some experience with PLT Scheme and really liked the programming environment, so I decided to give it a try. I figured that using both languages will help me understand the differences between them better. It was not some serious limitation of CL, in any case.

Re: SICP is Under Attack

#114
post #26

Earlier quoted context omitted.

SCIP winds up making sure that you understand what is going on by writing Scheme interpreter in Scheme. How would your translation handle that material? Writing a Scheme interpreter in Python would force people to learn all of that Scheme anyways, and it wouldn't feel like such a revelation that you understand what the interpreter is actually doing. Writing a Python interpreter in Python would force people to learn a…

Why not write a python(subset) interpreter in scheme? The point is once you scan,tokenize and parse you get an AST. You already got a language that works on AST. I don't think python's AST is gonna differ a lot from scheme's.

Um, yes, actually they differ a lot. In Scheme (and Lisp in general) the code pretty much is the AST. This is not the case for Python.

Re: SICP is Under Attack

#115
post #2

The obvious solution: rewrite SICP to use Python rather than Scheme. It is CC attribution and non-commercial, so I don't see any legal barrier to outsider revision.

My impression is that a lot of the Python in such a book would be highly non-idiomatic and/or too clever to be considered "good Python practice", which is not a very good idea in a pedagogical setting

Re: SICP is Under Attack

#116
post #78

Whoa, stop. There's a lot of issues in this article. First of all, Berkeley is NOT getting rid of SICP and SICP ideas. This is flat out untrue. I'm a recent instructor for the course, and I've spoken to several TA's about this course. Below is a rough summary of what we've discussed. This should not be construed as the "official line", but take from it what you will. First, Berkeley are not getting rid of SICP. ‎For…

Your link to the ocw course is not working. Google gave me: http://ocw.mit.edu/courses/electrical-engineering-and-comput...

Might be a encoding issue with your link? You have "%E2%80%8" pasted periodically throughout the link.

Re: SICP is Under Attack

#117
I did have SICP when I started undergrad, and I wish, and asked my professor why can't we use "something modern like python". He gave me some reasoning, and I wish I remember what it was. I think part of the problem is that there isn't enough of a "fun" or "excitement" component in SICP for a very many n00bs, which I was then. Python was cool. Perl was cool too. They're not terrible languages, but admittedly boggled down by syntax. Scheme had a "for education purposes rep" (many times propagated by professors themselves). And there was no "easy_install mechanize" or "easy_install pyqt" to start doing cool shit in Scheme (which I don't believe is true, but for whatever reason at that point it wasn't apparent this was even an option to me).

Overall, I had a lot more fun starting off with Python on my own time. I may have taken longer than most to come around and appreciate Scheme, and certainly find myself wishing JavaScript had less syntax. SICP is awesome though. In fact, I sold most of my books after I was done with university including that one. But maybe 3 or 4 years later, I ended up purchasing it again as I wanted to find classic Lisp literature. Only after it got delivered did I realize this was the same book. And this time around I did truly enjoy it. But I wish I remember what reasoning my professor gave for preferring Scheme over Python.

Re: SICP is Under Attack

#118
post #50

Earlier quoted context omitted.

There is a compelling argument that, in the age of nearly limitless computing resources, it doesn't matter anyway. You will in all likelihood be a glue programmer: you'll rely on APIs and libraries, most of which have been written by someone else, and you will simply string them together by applying the functions that most obviously address whatever problem you're trying to solve. Who cares, really, if you're using Q…

I agree that a programmer doesn't need a degree in CS, but to have a CS degree doesn't mean you're a programmer. A topic earlier showed that 26 of the ACM Turing Award winners had degrees in mathematics, and a lot of the theoretical CS is math anyways. If a student in college wants to acquire a CS degree, they should be exposed to fundamental ideas in CS, not just what they'll need to be a professional programmer.

> a lot of the theoretical CS is math anyways

It's a specific field within mathematics, with its own emphases and body of knowledge, much like how podiatry is distinct from general human physiology.

Really, though, all mathematicians specialize once they reach a certain level, for the same reasons all physicians specialize. It's just that you only happen to know the name of one of those specialties.

Re: SICP is Under Attack

#119
post #78

Whoa, stop. There's a lot of issues in this article. First of all, Berkeley is NOT getting rid of SICP and SICP ideas. This is flat out untrue. I'm a recent instructor for the course, and I've spoken to several TA's about this course. Below is a rough summary of what we've discussed. This should not be construed as the "official line", but take from it what you will. First, Berkeley are not getting rid of SICP. ‎For…

Your link to the ocw course is not working. Google gave me: http://ocw.mit.edu/courses/electrical-engineering-and-comput... Might be a encoding issue with your link? You have "%E2%80%8" pasted periodically throughout the link.

Chromium bug ticket: http://code.google.com/p/chromium/issues/detail?id=53579&#38...

How "%E2%80%8" got in your link in the first place would be interesting to know though.

Re: SICP is Under Attack

#120
What I do not understand is that Python is seen as a good language to teach Computer Science. I would have thought that a requirement for such a language is that it is theoretically sound. Python has a broken scope concept. Also, I think that a "there is only one way to do it" philosophy, coupled with the crippling of several constructs, is not a good basis for forming an open mind.
Post reply on HN