Live data from Hacker News

SICP is Under Attack

vedantk.tumblr.com

141–150 of 207 posts

Re: SICP is Under Attack

#141

Earlier quoted context omitted.

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.

I don't know :(. I copy pasted the link, but it doesn't seem like it worked in the post.

Re: SICP is Under Attack

#142
post #138

Earlier quoted context omitted.

A topic earlier showed that 26 of the ACM Turing Award winners had degrees in mathematics The field of computer science didn't exist when they went to college. They invented it, hence the awards.

This is really the root of the problem. Computer science/programming is immature as a profession. There are not clear, broadly accepted rules for what roles exist and what requirements there are for one to fill the role. Looking at building houses (just the construction side, not the mechanical systems), we have: - Architect - Structural Engineer - Architectural Technologist - Carpenter plus construction employees no…

I am horrified by the idea of a body moving at government-speed dictating the norms I have to follow when my competitors move at internet-speed.

Disclaimer: I am a professional engineer trained to design and build computers rather than program them.

Re: SICP is Under Attack

#143

> 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

Nice! Also your solution makes it easy to move on to a logarithmic time solution: going from (a,b,c) to (b,c,3a+2b+c) is a linear transformation which can be expressed as a 3x3 matrix, therefore iterating it n times is equivalent to raising that matrix to the nth power, which can be done in log(n) time using square and multiply [1]. Disregard programming, study math! In fact the exact same reasoning can be used to de…

You've made my day. This is one of the tricks to I often forget about again but just smile upon reencountering.

Step 1: Transform to the eigenbasis of your operator. Step 2: Enjoy the beaty.

Re: SICP is Under Attack

#144
post #102

Earlier quoted context omitted.

The point of Scheme isn't to provide you with a given feature like memoization, its to provide you with the tools so you can do it yourself. SICP covers memoization at the end chapter 3.3.3 ( http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html... ): (define (memoize f) (let ((table (make-table))) (lambda (x) (let ((previously-computed-result (lookup x table))) (or previously-computed-result (let ((result (f…

And SICP quits at this point? What if "previously-computed-result" is false, because f computes boolean values? This is just an 80% solution, which works for "fib".

The implementation of tables that he uses isn't actually reasonable for most use. If actually implementing memoization, one would probably use SFRI-44 style maps, which come with a 'contains-key' function that solves this problem.

Re: SICP is Under Attack

#145
post #102

Earlier quoted context omitted.

The point of Scheme isn't to provide you with a given feature like memoization, its to provide you with the tools so you can do it yourself. SICP covers memoization at the end chapter 3.3.3 ( http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-22.html... ): (define (memoize f) (let ((table (make-table))) (lambda (x) (let ((previously-computed-result (lookup x table))) (or previously-computed-result (let ((result (f…

The same could be said of any Turing-complete language (though I'll admit Scheme's macro system gives it a leg up when it comes to implementing new features.) But given that Scheme's syntax encourages thinking in terms of mathematical recursion, it seems silly that (a) I can't write something so simple as the Fibonacci function by using its traditional mathematical recursive definition, and that (b) SICP encourages t…

The difference between Scheme and any "Turing complete language", is the philosophy behind it, which is one of minimalism. That's why memoization isn't implemented for you.

Scheme was also designed to encourage implementing non-recursive control structures, as well as programming with side effects. Scheme isn't supposed to be totally pure. If you encounter a problem that requires mutation, you're supposed to try to abstract away from the mutation, if possible, and it gives you the tools to do that. (first class functions, macros, continuations, etc. are all very effective tools for abstraction, once you learn them.)

I recommend that you use SICP to learn Scheme, as it will make more sense when you actually know how to use it. It's an incredibly elegant and beautiful language, and it's certainly still relevant.

P.S. If you're thinking of those problems in terms of iteration and mutation, you're probably doing it wrong :). Think more functionally.

Re: SICP is Under Attack

#146
post #74

There is a rather breathless presumption that underlies many of the comments to this article, and it is this: that the only way to learn anything thoroughly is to learn it from the inside out: to start from first principles and gradually pile up complexity and abstraction. There is something very compelling about this approach, probably because it purports to model the mind after nature. Just like complex phenomena i…

We learn mathematics from the most basic principles and upwards. I don't think there is a way that you could start with higher level concepts and figure out the theory later. It would be incredibly confusing.

Programming is quite different of course. It's not terribly difficult to write a simple program to keep a database of your puzzle collection or build a website to share your puppy photos. One could start from such humble beginnings and build ever-more clever programs and have a steady career doing so. Computers are just machines after all.

But I don't think that's what computer science is really about. IMO it's the study of the nature of computation. Given it's theoretical nature it only makes sense to me that one would start with small foundational concepts and work their way up the ladder as one does in mathematics.

Re: SICP is Under Attack

#147

This is one of a very very small number of programming-related articles I've ever been glad to read. Programming should be taught as an approach to problem-solving and structured logical thinking, not as an approach to a particular language. If you can understand the core concepts of programming, the individual languages begin to matter a lot less. Python is great. Java is great. C++ is great. But they are just tools…

"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."

If you come out of a curriculum where all you learn is how to string together APIs and libraries, it's pretty much guaranteed you will end up with a job doing that, because that's all you will be qualified for.

If you want a job where you are pushing the envelope of what's possible with computers, you're going to be much having taken SICP.

Re: SICP is Under Attack

#148
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…

"but Python supports proper closures"

Is this a recent development? Without proper lexical scoping, don't you have to do weird stuff like creating an array if you want to update a value inside a "closure"?

Re: SICP is Under Attack

#149

I think that starting with Python is a fine choice. Please keep in mind that it's just the introductory course-- these students are going to be battered with CS theory later on. We are graduating around 20% fewer students in CS than we were in 2004. We need to find a way to make CS more accessible. I'm not saying that we should make the whole degree easier, but I think that having an easier & more practical first cou…

Yeah, I started CS in '01.

Most of the guys were there to make a fast buck.

Re: SICP is Under Attack

#150
post #54
post #12

Practical programming should not be the point of early computer science curricula.

It should be if you want more people than CS majors to take it.

Intro to CS is intro to CS.

Intro to programming is something different.

And there is a difference between the two, and the courses should not be conflated.

Post reply on HN