Live data from Hacker News

CS61A: The Structure and Interpretation of Computer Programs

inst.eecs.berkeley.edu

31–39 of 39 posts

Re: CS61A: The Structure and Interpretation of Computer Programs

#31
Funny story: I took Scheme around 1995 for my first college programming class at UIUC, and nobody told me that we could split our code up into separate lines of execution. So I turned in all of my assignments for the semester as a multi-page function composed of higher-order methods executed in one shot. My teacher must have stared at some of them dumfounded, because they all worked. Although remembering back, I don't think I was the only student doing that!

In the end, it helped me see that all programming is basically a spreadsheet and analogous to the STDIN/STDOUT stream processing of Unix executables. All of the stuff we think of as programming, like objects and classes, is basically hand waving to make problems/solutions supposedly fit in the human mind.

Re: CS61A: The Structure and Interpretation of Computer Programs

#32

Earlier quoted context omitted.

There are three books involved, two of them are Python. The original SICP, the CS61A Python version of SICP (top poster in this thread linked to it, no longer in use), and the current version of the text (also Python) that I linked. (The title of the submission seems to have changed, earlier it mentioned both Scheme and Python.)

The link you provided links to a series of pages about (mostly) Python, some SQL and a touch of scheme. Interestingly, it doesn't talk about using scheme as a programming language as much as using python to create interpreters which interpret a small subset of scheme. I think most people would look at that corpus and say "that's a Python text."

It’s the current version of the textbook for the current version of the submitted course (CS61A). I don’t understand the point you are trying to make. It was an appropriate addition to the discussion.

Re: CS61A: The Structure and Interpretation of Computer Programs

#33
SICP is one of my favorite books on programming. Along with GEB and Levy's Hackers.

When I want to give a young person a headstart "sneak preview" taster into "our" culture -- or what I think our culture should be, on the intellectual plane, as an ideal, then I'm confident that these in particular can be stimulating little gems.

OK, fine fine: also HHGG as the 4th of my top 3. The first book (in its series) especially but the entire 5+ books of its increasingly misnamed trilogy.

And... Neuromancer. And Snow Crash. And Cryptonomicon. And...

Re: CS61A: The Structure and Interpretation of Computer Programs

#34
post #12

Earlier quoted context omitted.

In general, I would suggest that conversions to non-LISP languages (and that includes things like Ruby because people say "Ruby is my favorite LISP") makes pedagogical goals of teaching the theory difficult. When I took my intro class in college, it was taught in Pascal. I had already been programming pascal (as taught by a chemist) in high school for a year or so. The first assignment which was Hello World I didn't…

Oh, newbies can learn Common Lisp badly and have to unlearn. Like, oh, use this let thing rather than introducing variables with setq inside your function, and speaking of which, for proper globals use defvar .

Are you saying let is bad? Why? Or am I reading you wrong?

I only use elisp though, and not common lisp or clojure

Re: CS61A: The Structure and Interpretation of Computer Programs

#35
post #18

For those interested in the original Scheme, here's that playlist of SICP lectures by the authors. I read and worked through the second edition book, but found these videos later. They added lots of value and emphasis beyond the written material. https://www.youtube.com/playlist?list=PLE18841CABEA24090

From 1986 - wow!

Re: CS61A: The Structure and Interpretation of Computer Programs

#36
post #4

Are there "conversions" for other languages as well? I know it's almost required reading for any software developer worth their salt, but I have several failed starts with the original version and have sworn to never have to read Lisp code. I get the gist. I get that Lisp elegantly represents the close tie between data and programs in a way that procedural programs never will, which is probably why it is chosen for t…

or you could just use m-expressions. just an idea. you know. use the tools provided by the language.

Nobody actually uses M-expressions. Mathematica and Wolfram use something quite close, but Lisps are almost universally written in S-expressions.

There are some alternative syntaxes like Sweet expression[1] (t-expression), but they've not found any widespread use.

[1]:https://srfi.schemers.org/srfi-110/srfi-110.html

Re: CS61A: The Structure and Interpretation of Computer Programs

#37

Funny story: I took Scheme around 1995 for my first college programming class at UIUC, and nobody told me that we could split our code up into separate lines of execution. So I turned in all of my assignments for the semester as a multi-page function composed of higher-order methods executed in one shot. My teacher must have stared at some of them dumfounded, because they all worked. Although remembering back, I don'…

>In the end, it helped me see that all programming is basically a spreadsheet and analogous to the STDIN/STDOUT stream processing of Unix executables. All of the stuff we think of as programming, like objects and classes, is basically hand waving to make problems/solutions supposedly fit in the human mind.

Holy shit Zack, I thought you didn't pay attention at Bayside???

Mind-blowing thought for my mind at this place and this time. Something that I intuited at some point but never made concrete by putting it into words. Thanks for sharing!

Re: CS61A: The Structure and Interpretation of Computer Programs

#38

Earlier quoted context omitted.

But you are OK looking at this?: } } } } }

"...if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program."

"If somebody starts talking about stuff like lines count, function sizes, nested ifs depth and tries to define optimal values, then be very careful about their advices" - me, &currentYear

Re: CS61A: The Structure and Interpretation of Computer Programs

#39

Earlier quoted context omitted.

"...if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program."

"If somebody starts talking about stuff like lines count, function sizes, nested ifs depth and tries to define optimal values, then be very careful about their advices" - me, &currentYear

Regardless of what you think of this particular maxim, one could do worse than cargo-culting Linus.

Code org itself is IMO fairly trivial. I just do whatever I think happens to look good. But trends will emerge even when you're just coding to taste. Thumbing through my code I find very few instances of either `} } } } }` or `)))))` (disclaimer - I don't use lisp).

Post reply on HN