Why Did M.I.T. Switch from Scheme to Python?

news and informationbusiness,health,entertainment,technology automotive,business,crime,health,life,politics,science,technology,travel

I’ve been seeing mail and blog postings, particularly from people in the Lisp community, why MIT has switched from using Scheme to Python in the freshman core curriculum for the department of Electrical Engineering and Computer Science.

At the International Lisp Conference, Prof. Gerry Sussman gave a short impromptu talk explaining the new freshman curriculum.  Just to get a second opinion, I later called Prof. Jacob White, one of the designers of the curriculum and lecturers for the core courses.  (Digression: Jacob and I have been close friends since I was six years old!)  He confirmed Gerry’s description.

Asking why they changed languages is, in some sense, the wrong question.

The freshman software engineering course, since 1985, has been based on the book Structure and Interpretation of Computer Programs (known as SICP), which uses Scheme.  The course is now nearly thirty years old.  Engineering has changed quite a lot in thirty years.  Since 1995, Gerry and his co-author Prof. Hal Abelson have advocated changing the freshman curriculum radically, not basing it on SICP.

In 1980, computer engineering was based on starting with clearly-defined things (primitives or small programs) and using them to build larger things that ended up being clearly-defined.  Composition of these fragments was the name of the game.

However, nowadays, a real engineer is given a big software library, with a 300-page manual that’s full of errors.  He’s also given a robot, whose exact behavior is extremely hard to characterize (what happens when a wheel slips?). The engineer must learn to perform scientific experiments to find out how the software and hardware actually work, at least enough to accomplish the job at hand.  Gerry pointed out that we may not like it this way (“because we’re old fogies”), but that’s the way it is, and M.I.T. has to take that into account.

The new approach also has the big advantage that it combines computer science with electrical engineering, whereas the old one taught them as entirely separate disciplines.  This way, students see how they interrelate.  Also, as Jacob points out, some of the same macro-principles apply to both software and hardware, and the students see this illustrated.  There is extensive lab work, making robots and mobile applications.

It just so happens that the robotics substrate software that comes with the system they’re using is programmed in Python.  Similarly, the mobile software environment is based on Python.  (Or, at least, the original plan was to use such a substrate, although it may have changed for various business reasons.)

Changing programming languages was absolutely not a goal of the curriculum change.  It was merely the result of the consequences of various decisions.  We can always discuss how it came to be that the robots and mobile devices are using Python instead of some other language, but that’s not the question being addressed here.  M.I.T. has nothing against Scheme. (And, of course, M.I.T. does teach classic software engineering, later in the curriculum.)

(Here’s another take on this topic.)

Reblog this post [with Zemanta]

29 Responses to “Why Did M.I.T. Switch from Scheme to Python?”

  1. Ben Hyde Says:

    Let me start by saying that for the last 30 years, about three four times a year, I’ve wished I could have come into comp. sci. by the SICP door.

    The above is as good a story as any, but I think the it leaves unsaid some stuff. The obvious one is the s-exprs have yet to win in the marketplace of ideas and commerce and that alone creates a vector force against the course. But more interesting, to me, is that the course presumed something about computer science that isn’t true, and wasn’t true at the time.

    SICP reflected an aspiration to place computer science closer to the pure sciences, i.e. math. You write: “However, nowadays … engineer must learn to perform scientific experiments to find out how the software and hardware actually work” is true, but for the one word “nowadays.’ That has always been the case. CS is also an engineering discipline, and a branch of natural science. This is why it’s alpha-citizens are hackers, not mathematicians.

    Even in 1965 (a decade before SICP), when I came into the field CS was already all the above, science, engineering, natural science. Most of the most interesting things I learned over the years came from toying with, taking apart, and putting back together systems like Simula, Forth, Focal, L*, Multic, Macsyma, the time sharing system at Dartmoth, etc. etc. When I finally came to meet the folks who self identified as Computer Scientists I was overwhelmingly struck by their blindness. Blind on the one hand to the wealth of examples waiting to be studied. And blind to how codifying the rules of the emerging science was repeatedly undone by the shifting landscape of the technology.

    SICP is a beautiful thing, but among it’s flaws was an intentional and studied blindness to the issues you suggest the new course addresses. So at least for those reasons it’s a good shift.

    But wait, their’s more! What has changed in the last 30+ years is that computer science is now also a social science, and probably a statistical one. Maybe they will fix that in a decade or too :) .

  2. popurls.com // popular today Says:

    popurls.com // popular today…

    story has entered the popular today section on popurls.com…

  3. Joubin Houshyar Says:

    “CS is also an engineering discipline [...]“.

    That’s definitely a lovely thought but its not quite true, is it?

    At least to this Electrical Engineer, who has over the past 20 years earned a ‘vocational degree’ in Computer Science, it is clear to me that until some sort of foundational concepts akin to Matter and Energy are established for CS, it will never attain to the same rigor that underpins physically rooted sciences (such as Physics, and its applications, e.g., engineering).

    (I was happy to note recently that a CS luminary such as Lamport pretty much articulated the same thing.(

  4. Ben Hyde's Fan Says:

    And here is another case of the comment being just as interesting (if not more interesting) than the article itself! I agree with almost everything Ben Hyde has said, and am proud to be a computer scientist for those exact reasons!

  5. Jon Says:

    Plus, er, Scheme never really worked. I mean, yeah, it ran, but it was always hopelessly, inexcusably slow and demanding. It’s STILL demanding; it errors out on my Ubuntu box, while all the widely used languages run fine. Once, for a course, I wrote a g-machine interpreter in scheme. But scheme was so hopelessly slow I did 95% of the testing in emacs-lisp. I’m glad MIT’s finally come to their senses and moved to something that, er, works. The new approach sounds promising, too, since that was my first programming job, and it worked for me.

  6. Grant Rettke Says:

    Relevant bits here; interpret as you wish (it certainly wasn’t because of the language):

    http://www.wisdomandwonder.com/link/2110/why-mit-switched-from-scheme-to-python

  7. Dr. Jochen L. Leidner Says:

    With all due respect, the fact that systems are buggy and complicated (not just complex) is due to generations that have NOT had access to SICP. It seems to me the prudent reaction would have been to add a “dealing with complex systems” module to the curriculum, instead of depriving it of the masterpiece that teaches them to do better.

  8. Scott L. Burson Says:

    Hmm. First, I think computer science and electrical engineering ARE different disciplines. 30 years after taking 6.003, I have yet to use a z-transform for anything, period. Sure, there are situations in which you need to know both disciplines, but that doesn’t mean they’re the same thing. In retrospect, I would have been much better served if the algorithms course had been required instead — I didn’t take it, and realized only after graduating how valuable it would have been. (The 6.002 material was of more general interest; I wouldn’t replace that course, though I personally haven’t used that much of it.)

    I don’t care that much about the change from Scheme to Python. But this bugs me:

    “In 1980, computer engineering was based on starting with clearly-defined things (primitives or small programs) and using them to build larger things that ended up being clearly-defined. Composition of these fragments was the name of the game.”

    It’s still very much the name of the game if you’re doing systems programming: operating systems, compilers, libraries. I suppose this kind of programming is a smaller fraction of the entire scope of software development activity these days, but it is by no means dead — and if you can’t do it, I certainly don’t want you in my group.

    That said, I think the students with an aptitude for the mathematics of programming will find a way to pick it up, if given a modicum of encouragement. I hope there is still an SICP class, even if it’s not required.

  9. Sergey Solyanik Says:

    This is silly. Are you producing scientists or engineers? If former, there is no better introduction to the world of CS than LISP. If later, why not just teach them how to copy and paste Java code? Because that’s what 90% of software developers do these days…

  10. don’t you evah » Blog Archive » MIT 6.001 and the new curriculum Says:

    [...] A recent post about the death of 6.001 caught my attention earlier today, and I’ve been stuck composing this blog post in my head for awhile. [...]

  11. Pasky’s Log Says:

    [...] just read that MIT software engineering curriculum switches from Scheme to Python. The story raises an interesting point – the curriculum changed since they realized that as the [...]

  12. Brian Sniffen Says:

    It is true that few real-world engineering programmers meet an experience like 6.001. How much more important, then, that they have this view of the stars before industry clouds their eyes. For many, that one brief view of the Heavens has inspired a career.

  13. B. Factor Says:

    I took 6.001 in the Spring 1982 and it was taught using SCIP. So your statement “The freshman software engineering course, since 1985, has been based on the book Structure and Interpretation of Computer Programs (known as SICP), which uses Scheme” is misleading at best.

  14. Dan Weinreb Says:

    B. Factor: I got the 1985 date from Wikipedia. The official SICP site http://mitpress.mit.edu/sicp/ says that the copyright date is 1984. Perhaps you were using a “course notes” or preprint version?

  15. Paul Fuqua Says:

    He was. I was a TA for 6.001 in spring and fall 1982 and SICP was a big binder of looseleaf pages.

  16. Sussmaniana « programming musings Says:

    [...] Dan Weinberg in his comment below, Sussman endorses the changes in the new curriculum, though. His post on this issue is worth reading too. Posted in History, Lisp, Scheme. 6 Comments [...]

  17. Loper OS » Blog Archive » The Future of Programming: Ignorance and Superstition? Says:

    [...] Weinreb: “Why did M.I.T. Switch from Scheme to Python?” “Nowadays, a real engineer is given a big software library, with a 300-page manual that’s full of errors.  He’s also given a robot, whose exact behavior is extremely hard to characterize (what happens when a wheel slips?). The engineer must learn to perform scientific experiments to find out how the software and hardware actually work, at least enough to accomplish the job at hand.  Gerry pointed out that we may not like it this way (”because we’re old fogies”), but that’s the way it is, and M.I.T. has to take that into account.” [...]

  18. Aaron Sherman Says:

    It’s rather sad that so many of the responses I’ve seen to this elsewhere (LtU, etc) have continued to focus on the language change and ignored the core point that you made, here. I suppose the other way to look at this is: do you really think that the language of choice will impact the quality of eduction?

    I could see a point being made, here, that if the language of choice were C, then there are too many constructs that would require too long to develop and thus the course would have to miss out on some material, but once you’re talking about a high level language with a minimum of functional and ease-of-use features, the real question is: what is being taught? So that brings us to the truly interesting question: is this one of the courses that MIT will be publishing online?

    Currently , the old course is up:

    http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-001Spring-2005/CourseHome/index.htm

  19. K. Arenn Says:

    Really great post – I’ve been looking for info like this for awhile.

  20. Dan Weinreb’s blog » Blog Archive » The “Worse is Better” idea and the future of Lisp Says:

    [...] names for the articles, in order to attract readers.  Sometimes it backfires.  In my case, I used “Why Did M.I.T. Switch from Scheme to Python?” for an entry whose point was that the switch is not what’s important.  But perhaps since it [...]

  21. Ezekiel Says:

    You can understanding programming to transform data or you can understand programming to control physical devices. MIT seems to have switched from one to the other. Both existed 30 years ago and both exist now. Unfortunately, the revival of functional programming seems to see MIT going the opposite direction. Are we heading into a world where we are surrounded by robots? Or, are we going to build upon our growing mathematical understanding of the world (quantum physics, chemistry, symmetry, chaos, new electronic devices, and pure programming like category theory)? Or, both? I think a focus on controlling physical devices is a narrow range of computing applications. I am concerned that way too many programmers already know nothing about functional programming. I would hate to see that grow worse.

  22. Suzie Says:

    You made some good points there. I did a search on the topic and found most people will agree with your blog.

  23. Dan Weinreb Says:

    @Ezekeil: Don’t forget that this is only the freshman curriculum. They have another three years to learn a lot more about computer science.

    I’ve been reading “Real World Haskell” and I agree that understanding functional programming is somewhere between fascinating and essential knowledge (thanks to my friend Alan Bawden for making it clear to me how valuable it is to learn this). The book is really great and I hope to find time to finish it.

  24. Controversy in the Glass Palace of Nerds « The Cotton Gin Says:

    [...] Why Did M.I.T. Switch from Scheme to Python? [...]

  25. Assorted links « Algorithmic Game Theory Says:

    [...] to use for CS1 is heating up again.  This round seems to be about moving from Java to Python.  MIT’s switch from scheme to python last year is getting [...]

  26. links for 2009-09-30 - paulcarvill.com Says:

    [...] Dan Weinreb’s blog » Blog Archive » Why Did M.I.T. Switch from Scheme to Python? Why Did M.I.T. Switch from Scheme to Python? (tags: python programming development mit) [...]

  27. july Says:

    Is phyton harder to learn than scheme?

  28. RTW Contest Wrap-up « Luke Halliwell’s Weblog Says:

    [...] The interactive question illustrates an awkward truth about programming in general, and perhaps game programming more than most.  In real life, you rarely get to work on problems that are perfectly, mathematically defined; life as a programmer is not like working through a programming textbook.  Problems are vaguely stated, and the APIs you build on are poorly-documented and packed with undefined behaviour.  The difference between our algorithmic and interactive questions illustrates this perfectly.  It reminds me of the way MIT have stopped introducing students to programming with Scheme, and switched to Python-controlled robots – for similar reasons. [...]

  29. Feedback Loops in Software Development – Irrational Exuberance | Agile Development Says:

    [...] you believe MIT’s switch from Scheme to Python is a concession or a catastrophe, I don’t think it is a [...]