Why MIT switched from Scheme to Python

Costanza asked Sussman why MIT had switched away from Scheme for their introductory programming course, 6.001. This was a gem. He said that the reason that happened was because engineering in 1980 was not what it was in the mid-90s or in 2000. In 1980, good programmers spent a lot of time thinking, and then produced spare code that they thought should work. Code ran close to the metal, even Scheme — it was understandable all the way down. Like a resistor, where you could read the bands and know the power rating and the tolerance and the resistance and V=IR and that’s all there was to know. 6.001 had been conceived to teach engineers how to take small parts that they understood entirely and use simple techniques to compose them into larger things that do what you want.

But programming now isn’t so much like that, said Sussman. Nowadays you muck around with incomprehensible or nonexistent man pages for software you don’t know who wrote. You have to do basic science on your libraries to see how they work, trying out different inputs and seeing how the code reacts. This is a fundamentally different job, and it needed a different course.

So the good thing about the new 6.001 was that it was robot-centered — you had to program a little robot to move around. And robots are not like resistors, behaving according to ideal functions. Wheels slip, the environment changes, etc — you have to build in robustness to the system, in a different way than the one SICP discusses.

And why Python, then? Well, said Sussman, it probably just had a library already implemented for the robotics interface, that was all.

(via wingolog)

Web Hosting
 

94 thoughts on “Why MIT switched from Scheme to Python”

  1. Having actually taken, and aced, the now departed 6.001, I can say something meaningful about the course. It wasn’t about scheme, it was about what you could do with it.

    The more advanced software engineering course, 6.034 used something called CLU. I doubt anybody’s ever heard of it, but who cares. Computer science courses should teach fundamentals, and they probably should vary the language every few years if only to emphasize that it is primarily the approach to solving problems that really matters.

    Of course, that does NOT mean I want to go back to F77. But I could if I had to.

    Nobody ever accused MIT of producing bad programmers, even if they used languages that were not commercially prevalent. It’s a real shame that “.001” is gone.

  2. Actually, what I wrote isn’t strictly true. There was this whole debate about the “MIT approach” vs. the “NJ approach”, but those who know this also know there are merits to both.

  3. BTW, even when they taught 6.001, there were still courses available in Fortran and C. It is an error to say that C is not taught at MIT. I believe it was part of the Civil Engineering Dept at the time.

    I’m not going to look it up. I’m too lazy :-)

  4. This debate is silly. It is the “should we offer Latin since it is a dead language” debate. Fact of the matter is that you can learn about programming using any language. It’s the teaching and problem solving that’s important.

  5. Ubu Walker: I don’t think you understand what MIT is trying to accomplish with its EECS majors or the time constraints in a university course (13 weeks of instruction in a semester for MIT).

    In those contexts the choice of a language is very important. If you want to teach some functional programming you’d best not choose something like Java.

    You don’t want to spend a lot of time teaching syntax and solving syntax problems, so languages like Scheme and Python are good.

  6. I was saddened at first, as a Lisp hacker. But even in “my day”, most students complained about using Scheme the whole time. Only a fraction “got it”.

    Anyway, the 6.001 crew will be inspirational in Python. I doubt the students will lose much. The ones that get Lisp will still learn it. Many will be inspired to do so by the course.

    It is too bad to not be able to use SICP, as that was a truly great book. But times change.

  7. Well, students complained about every other course as well. I’m not sure where you get the idea that only a few people got it. The drop rate would have been a great deal higher were that true. Yet by the time of the eighth lab or so, most people were still in the course and attending lectures and recitations, so I would dispute the claim that \most people didn’t get it\ based on simple survival analysis.

  8. @Ubu: I disagree about “any language”. The language can get in the way – and I doubt machine code is a good language for this.

    A functional language has the most fundamentally rich concepts, and is appropriate at somewhere like MIT.

    Python is better than some, but it obscures some fundamental concerns. (And both obscure some fundamental concerns by being dynamically typed – concepts have important static structure in the real world.)

  9. Michael, sorry, I didn’t mean that students didn’t get 6.001, they did. I mean most students didn’t get the Lisp bug. But the purpose of the course isn’t to give us the Lisp bug, but to teach us programming, which most students got.

  10. Talk about a time lag – picking up a conversation seven months later. I still think that most got it – even the lisp side.

    Changing sides for a second, I think there were two places where people “got off the bus”. The first was at the mention of lambda. A fair # of People really were confused about how to properly employ anonymous functions.
    But based on % of people asking at recitation sections, maybe only 25% had this issue, and they had sorted it out.

    A larger number left (in spirit) during the metacircular evaluator assignment. Why take the time to write lisp in lisp? We already have it!

    It was a fairly long assignment that came at a time when all the other courses were getting tough as well.

    All said though, I still think dropping Scheme was a loss and a mistake. I really felt it served our goals well to think about programming rather than syntax. And the syntax was simple – it was just functions, and we “understand” functions well from our math classes.

  11. “Times” don’t change. People make decisions. there aren’t bad “times”, just bad cultures or bad institutions, or bad groupthink.

    “Times” didn’t change; we as a society decided to abandon an approach to programming where scheme/lisp would have excelled.

    I don’t like blaming “times” because it is a very bad figure of speech; it lets us blame circumstance instead of investigating the causes of group decision making.

  12. Ridiculous.

    Reading this, you’d think that scheme was a prerequisite to good programming. Come off it.

    The world is full of examples of excellent software, written by excellent programmers, with a myriad of backgrounds, many who’ve never written a line of scheme.

    Changing from scheme to python will make little or no difference to the outcomes of this course. The talented will be just as taltented regardless of the playground.

  13. If talent were the only issue, I’d have no problem with what jobbly is saying. First of all, Python came along well after scheme and absorbed some of its good ideas. So, it would not be surprising that we can obtain the same results.

    However, it is not simply identification of programming talent that is the objectives of this course. Scheme met the needs of a computer course well because one could get to the computer science ideas quickly without being mired down in programming details.

    It’s not simply a matter of “getting the job done” or “identifying talent”. A first year computer science course needs to meet the intellectual needs of the class, too. In other words, it needs to have a certain amount of elegance too.

    Now, I have not seen python so I cannot comment if this is elegant, but I reject your notion that all languages are equivalent for a first year computer science course. They could still do it in Fortran, and your logic would hold just fine. But they don’t, and for a good reason.

  14. Scheme was my first programming language in my Intro to CompSci class at the U. of Chicago in 1993. I was a second year undergrad at the time, and I had 0 experience with programming prior to that, and had learned to use email and Word a few months before. Our text was Abelson and Sussman.

    Needless to say…despite being pretty mathematically inclined, it kicked my ass. And the use of Scheme as the learning medium/tool did not help matters.

    The class was tough enough, the problem sets grueling and in some cases mind blowingly hard, but Scheme with its’ bare bones interface and joke level debugging did not help matters. I often spent more time being a good code technician than actually trying to solve the core problems being posed (8 queens problem anyone?)

  15. Python is an excellent teaching language. The interactive prompt is a nice tool for the students to use for experimentation and for me to demonstrate programming constructs in class.

    Python teaches good formatting habits. When my students use a free-format language and I tell them to observe good formatting conventions, they are trained to expect good formatting and they just do it.

    Python’s syntax is simple. It allows my students to focus on semantics instead of syntax.

    Python offers the additional benefit that is it a powerful tool and an excellent general-purpose programming language.

    I applaud MIT’s decision. We have been using Python since 2004 at NCSSM. It is interesting to see lots of others climbing aboard.

  16. We began using Python as a first programming language at the North Carolina School of Science and Mathematics in 2004. Our first course is a course in procedural programming, which uses Python objects as smart data types. Here are some benefits we have seen

    1. Python’s grammar is simple. Hello world is

    print “Hello, World”

    or

    print (“Hello, World”)

    in Python 3. The students are not left bewildered by traffic jams of arcane keyworks.

    Python’s whitespace delimitation causes beginners to develop good formatting habits that last.

    There are not great piles of parentheses to wade through

    There are powerful libraries that do hosts of useful stuff.

    It supports the functional, imperative and OO paradigms but forces none of them on you. We like it a great deal.

  17. All introductory languages are intuitive at the start and have their nice features. It’s how easily you put the elements together that determines the true sense of a language.

    Syntactic sugar is sweet but fattening. I worry about non-issues like how to space things or matching parentheses. That’s my text editor’s job.

    I think succumbing to popular fads was a bad idea. I think a great deal of the assignments were made easier because we could start by solving problems without having to spend time on the syntax of the language. That said, Python was probably the best choice, given the regrettable decision to leave Scheme.

  18. I don’t agree. Coming with heavy assembly, C, C++ background Scheme was a train crash for me. I think Scheme is a beautiful tiny language with 1 page language spec, yet powerful enough to do even OOP. If you teach it right it is the best language you can teach to an average Joe and makes him a “very good” programmer in any language he might encounter in the future. Within a few weeks your average Joe starts developing his own algorithms within 2 months he shuffles objects around, in 6 months starts writing his own compiler. This is way faster learning curve than C/C++. Yet once you master it you become a very good programmer, the rest is just about learning the sytax rules of any language they propose you. I still do C/C++ for living (mostly on realtime) but even now for mocking up a small algorithm I use Scheme. Python inherits a lot from Scheme except “the consistent” but a bit hard-on-the-eyes syntax of Scheme.
    Consistency is important for a starter because with his one page spec knowledge he can decode any expression he might encounter, without diving deep in to the thick language manual (e.g. ANSI C spec and any later C/C++ specs). One good thing on Python’s account perhaps is that it has lots of open source support libraries so for anything which requires interaction with the “real world” (including GUI, Web, custom hardware) is easier. I think I would teach Scheme first to teach about programming, then switch to Python (which is relatively easy), for real world then C/C++/Java is just something you pickup when you need it.

  19. MIT’s switch from Scheme/Lisp to Python was a surprising move, agreed, but it and the discussion above demonstrates that computer science and the programming languages that implement them (and are of course themselves manifestations of the latest in CS, or at least attempt to be) are a alive and well, and, half a century on, are growing rather than slowing their pace towards maturity. So let professionals and amateurs alike rejoice and enjoy working or dabbling in the field, in spite of the mess. In fact, challenges and opportunities arise from the mess. Or would anyone rather be an expert designer of steam locomotives or build analog electronic circuits around pentodes? The physics of steam and vacuum tubes and the engineering disciplines of of their machines and circuits are well settled, no surprises there. In other words, all maturity and no mess.

  20. So many people in their ivory towers looking down on the world in idealistic bliss, drowning in the depth of their pool of ego. None have ever strayed near the real world with it’s deadlines and profit margins. Oh no. They make their own toys to play with.

  21. The other thing people forget about 6.001 is that it’s a course for engineers, taught by engineers. They simply used the best tool for the job. Now, 20 odd years later, new tools have been made and they are better than the old tools. It’s called progress!

  22. And now ‘industry’ is moving towards functional programming, which is exactly what you learn in SICP. You can also write apps in Racket/Scheme and deploy directly to Yandex cloud. 6.001 is still the best intro to comp science

  23. Thanks for the auspicious writeup. It in reality
    was once a enjoyment account it. Glance complex to more introduced agreeable from you!

    By the way, how can we communicate?

  24. SICP is back at MIT in the form of 6.037 which teaches a “condensed” version. http://web.mit.edu/alexmv/6.037/

    You can actually develop professional programs in Scheme using Lambda Native. You write out the guts in Scheme then can automatically port to iOS, Blackberry, Android, OSX, Windows, BSD, Linux ect. Write one program, export many times.

    More and more industry languages are becoming Lisp like, such as Julia. I think in the end all of us will just be using some kind of optimized Lisp.

    I’m glad Knuth didn’t take MIXAL/MMIX out of The Art of Programming books. He uses the same defense claiming what would be the point of including the low level flavor of the day when he’d have to go back and constantly rewrite his books to update the language. He also once had to learn a half dozen different low level languages to build compilers back in the 60s/70s so if he can be fluent in a number of different languages any computer scientist can. You learn the fundamentals in one, then just pickup a “learn Python (or Assembler)” book and translate what you know already in a weekend, learning new syntax and libraries.

  25. To start, python has 0 value for CS. For intro to programming python/java/csharp/etc. are all equally horrific but can do the job.

    However, there are two languages every CS must have at least rudimentary knowledge of: schema/lisp and c/c++.

    Lisp was just few weeks as part of intro to AI. Wonder how my thinking&approach about programming could have been different granted I was introduced to scheme instead of C first !!!

  26. My 10 year old wants to learn Programming. Scheme or Python – which is it?
    Simple English please.

Leave a Reply

Your email address will not be published. Required fields are marked *