Live data from Hacker News

Why MIT Switched from Scheme to Python (2009)

wisdomandwonder.com

31–40 of 102 posts

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

#31
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.

The point isn't to learn it as if it's something you'll have to recreate--it's to understand that "advanced" language features are built on top of the "fundamental" structural model and are not magic. You need some understanding of how programming languages are built in order to keep languages and libraries honest. Otherwise learning about type/object systems becomes learning all the pitfalls and incidental complexities caused by the design as if they're benefits and not costs.

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

#32
Berkeley EECS is MIT-lite and its 61A used SICP/Scheme. They even wanted us to use emacs (which for me, so wasn't gonna happen). So pretty much everything in this article applies to Berkeley EECS as well. They've also shifted from SICP/Scheme to Composing Programs/Python.

http://cs61a.org/articles/about.html

The last time I used Scheme was in 61A. I like Scheme; it was elegant. I probably would have continued to use it but Instructional Computing had a bastardized variation. I'm pretty sure that students of 61A will continue to use Python since they're using Python 3.

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

#33
I liked Sussman's answer. There is a huge difference in learning things deeply from the bottom up vs. 'get stuff done' approaches using lots of black box libraries, etc.

I have been using Ruby, Java, Scala, Python, and Haskell mostly for years now. But just recently I started working on the 4th edition of my old Common Lisp book and some preparatory work on a new Scheme book. I have been enjoying the Lisp-way of bottom up interactive development a lot.

Both general approaches have value. When doing machine learning it is great to have the universe of useful libraries for Python but for green field work that is more algorithmic, doing bottom up development in languages like Scheme or Haskell is also great.

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

#34

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?

When you say "programming 101" you might not be talking about the MIT courses being discussed here.

6.001 was a course in functional programming, based on the book Structure and Interpretation of Computer Programs.

6.01 (the replacement course that uses Python) is a project-based course involving robots and stuff.

Neither of these courses depend on any specific knowledge, but they would be very difficult courses if you've never programmed before. (Most people coming into MIT course 6 have programmed before.)

The "you don't know how to program, here's how to program" course has taken various forms over the years. When I was there it was 1.00, a Java course for engineers. Later it was 6.00, an optional intro to Python, based on "How To Think Like A Computer Scientist".

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

#35

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.

I was using "deep" as in the artistic sense which is analogous to "abstract." You're right that imperative languages model the HW better, I just think there's something to be said for understanding programming from artistic side as well as the understanding the metal.

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

#36
At UBC CS a few years ago they made a switch in the opposite direction, from Java to Racket for their intro course. I think this was a very good decision because it allowed them to spend less time teaching syntax (which in racket is very simple) and more time focusing on fundamental topics such as graphs, recursion, functional programming, and test driven development. Compared to the equivalent intro programming course that was taught to engineers in C I think students in CS learned a lot more than the engineers whos most complicated curriculum involved arrays and procedure calls. What's interesting is that I believe the inspiration for teaching functional programming as an introduction came from MIT.

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

#37

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…

> 50 years there won't be that many application developers left either.

I like your comment, but the crystal ball statement in the last sentence is a bit too much.

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

#38
post #22

Earlier quoted context omitted.

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 actual…

I'm not convinced c without assembly is much better than Pascal or even Rust. Sure, you might not need a full assembly course (write a real, multi-user, bare-metal os in assembler using most of x86 16,32 and 64bit syntax) - but a C course mixed with assembly I think makes a lot of sense if the goal is to learn a bit about how computers get work done.

I mean, one should be able to look at the assembler output of hello.c and have an idea of what's going on. Without that level of understanding, I'm not convinced using C over many other languages gain you much. It's still a lot simpler than eg. c++, though.

I'm thinking something like: http://pacman128.github.io/pcasm/ but rewritten from the ground up for x86_64.

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

#39

At UBC CS a few years ago they made a switch in the opposite direction, from Java to Racket for their intro course. I think this was a very good decision because it allowed them to spend less time teaching syntax (which in racket is very simple) and more time focusing on fundamental topics such as graphs, recursion, functional programming, and test driven development. Compared to the equivalent intro programming cour…

The sheer amount of nonsensical boilerplate required in any Java program, even trivial ones, makes it a terrible language for teaching Computer Science.

Think about trying to teach the meaning of "public class Foo { public static void main(String[] args) { ... }}" to a complete novice. Class-based design, inheritance, visibility, return types, arrays, etc. all right off the bat. It's too much.

Scheme and Python both are much better choices for this alone.

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

#40

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…

[deleted]
Post reply on HN