Live data from Hacker News

Why MIT Switched from Scheme to Python (2009)

wisdomandwonder.com

21–30 of 102 posts

Re: Why MIT Switched from Scheme to Python (2009)

#21

Earlier quoted context omitted.

While I think that most CS people should learn assembly and computer internals basics, it would be an absolute disaster to start students off in assembly as CS 101. Python is a fairly decent language for starting people off: * It doesn't have a lot of boilerplate, so no magic "I'll teach you what this means in three weeks" steps * Output for debugging is fairly easy, since print accepts a lot of stuff without needing…

But many students come in with years of programming in a language like Python, Java, or C++. My friends and I built video games when we were in high school so we were comfortable in all three of those languages. Scheme levels the playing field. I have never encountered a student who entered university with years of functional programming experience and I was a TA for an introductory CS course. I think moving back to…

If students have years of programming experience, why are they being made to take programming 101?

Re: Why MIT Switched from Scheme to Python (2009)

#22

We used scheme in my programming languages course (which was one of my last course before graduation). at first I hated it, but then once I got it, it was fun! functional programming forces you to think in a way that is much more conducive to understanding programming on a deeper level and thinking creatively to problem solve. Imperative programming, while easier, is more of a blunt instrument. Efficient, but blunt.

Functional programming is an attempt to pretend that Von Neumann machines are abstract, mystical mathematical engines, rather than a bunch of registers that read in values from an electronic grid, mutate them, and write out new values back to the grid.

Every higher abstraction could be described as an attempt to pretend that the lower abstraction is less complicated and error-prone than it actually is.

Re: Why MIT Switched from Scheme to Python (2009)

#23

Earlier quoted context omitted.

But many students come in with years of programming in a language like Python, Java, or C++. My friends and I built video games when we were in high school so we were comfortable in all three of those languages. Scheme levels the playing field. I have never encountered a student who entered university with years of functional programming experience and I was a TA for an introductory CS course. I think moving back to…

If students have years of programming experience, why are they being made to take programming 101?

Because it is a required subject in your curriculum? You don't get to pass people just because they say they know something.

Re: Why MIT Switched from Scheme to Python (2009)

#24
post #22

Earlier quoted context omitted.

Functional programming is an attempt to pretend that Von Neumann machines are abstract, mystical mathematical engines, rather than a bunch of registers that read in values from an electronic grid, mutate them, and write out new values back to the grid.

Every higher abstraction could be described as an attempt to pretend that the lower abstraction is less complicated and error-prone than it actually is.

I know - I'm being facetious, but really, if you want to really understand how most modern computers actually work, there's probably no better way than to learn C. It's high level enough and provides enough structure so that you don't need to actually blurt out a bunch of assembly instructions, but low-level enough so that your code mostly more or less corresponds to what the underlying Von Neumann hardware is actually doing.

Re: Why MIT Switched from Scheme to Python (2009)

#25

Earlier quoted context omitted.

If students have years of programming experience, why are they being made to take programming 101?

Because it is a required subject in your curriculum? You don't get to pass people just because they say they know something.

My university did. COS101 was an optional class for complete novices but if you weren't already at least exposed to programming your advisor would sign you up for it. COS125 was the first for-realsies class (taught in Scheme, as it happens).

Re: Why MIT Switched from Scheme to Python (2009)

#26

Earlier quoted context omitted.

If students have years of programming experience, why are they being made to take programming 101?

Because it is a required subject in your curriculum? You don't get to pass people just because they say they know something.

If a student claims to know what the class would teach, you don't have to take their word for it: you can talk to them, or you can give them a test.

(I skipped the first two intro CS classes in college after talking to the professors and figuring out the right place to start given my background.)

Re: Why MIT Switched from Scheme to Python (2009)

#27
post #2

I think there's a tension between two imperatives in teaching new programmers: 1) Learning must be applied learning. Give people problems to solve and they will come to you for data structures and algorithms, O notation, etc. If they don't, they should do something else 2) A lot of what's out there in programming languages are cargo cults, and newbies need to be prepared for this. For instance, virtual function inher…

While I think that most CS people should learn assembly and computer internals basics, it would be an absolute disaster to start students off in assembly as CS 101. Python is a fairly decent language for starting people off: * It doesn't have a lot of boilerplate, so no magic "I'll teach you what this means in three weeks" steps * Output for debugging is fairly easy, since print accepts a lot of stuff without needing…

It really depends on the type of school. We started programming on University with a simplified assembly, but it made a lot of sense since it was electrical engineering school and we've learned about hardware in parallel, so we could follow what physically happens when the code is executed. I don't remember that anyone had a huge problems with following it. For many people around me with good math skills, but no previous programming experience (and little interest in it) it was much harder when we next moved to C and data-structures and algorithms, where you need to think in an abstract way and solve more complex problems.

Re: Why MIT Switched from Scheme to Python (2009)

#28
One of the key things about SICP in Scheme was that the language used so few intrinsic keywords and structures (I think it was something like 7 intrinsic keywords that could be used for just about everything you needed to do) that you could move on from learning about the language really quickly.

It kept the focus on the underlying principles (every programming language is a set of primitives, a means of combination and a means of abstraction; recursion; interpreters; etc) that were powerful enough to let you pick up any other language without getting bogged down in the details. An opinionated language like Python seems like the wrong choice to teach fundamental structure (it WAS Structure and Interpretation of Computer Programs), but if they aren't approaching it from that angle and are looking more at application development then that's probably ok.

You can pick up enough of any language or framework from the manual, and google/stackoverflow/o'reilly will give you fine points/quirks, but that fundamental base that allows you to look at ANY program in ANY language and be able to reduce it to first principles is (IMO) a necessary component of any computer scientist's toolkit and the best insurance against the continuous rise of packaged software that is continuously burning the short grass in most software development.

I remember reading somewhere that focusing on application development is like training blacksmiths: you end up with people skilled at specific techniques but extremely vulnerable to "industrial" software that replicates the techniques and eliminates the need for custom development.

There are not that many blacksmiths left, and the truth is in 50 years there won't be that many application developers left either.

Re: Why MIT Switched from Scheme to Python (2009)

#29
post #2

I think there's a tension between two imperatives in teaching new programmers: 1) Learning must be applied learning. Give people problems to solve and they will come to you for data structures and algorithms, O notation, etc. If they don't, they should do something else 2) A lot of what's out there in programming languages are cargo cults, and newbies need to be prepared for this. For instance, virtual function inher…

I'm not sure new programmers need to worry about how virtual function inheritance is implemented via the viable. Are there even standards for that? Or is that an implementation detail which seems popular across multiple compilers?

There's time for them to learn the details, but just learning that the functionality exists and knowing how to use it is a good start.

Re: Why MIT Switched from Scheme to Python (2009)

#30

Earlier quoted context omitted.

But many students come in with years of programming in a language like Python, Java, or C++. My friends and I built video games when we were in high school so we were comfortable in all three of those languages. Scheme levels the playing field. I have never encountered a student who entered university with years of functional programming experience and I was a TA for an introductory CS course. I think moving back to…

If students have years of programming experience, why are they being made to take programming 101?

Because they probably don't know as much as they think they know regarding algorithms, Big-O, etc. There are exceptions, of course.
Post reply on HN