6 ms·
Why MIT now uses python instead of scheme for its undergraduate CS program
- zaidf 17y agoI often wonder how it'd be if AP Computer Science was based in python. I took AP Comp Sci in high school with C++. I aced the exam. Yet I cannot program crap in it and always felt limited. I did feel like I'd "graduated" in some ways after being able to say "yes I can do C++" at least for couple months after the class ended. On the other hand if I learned python, I could do sooo many useful things a lot earlier in my programming career. May be someone can elaborate more on why C++/Java is better than pyton for AP Comp Sci. I'd like to think it provides a better intro even if it's a pain in the ass. Am I right? On the other hand, I do think it discourages lots of people that are on the edge. I had friends who were genuinely trying to learn C++ and programming in class but had to really struggle. They left with the impression that doing simple stuff is a very difficult. In that respect, C++/Java communicate a very wrong sense of what is possible with little effort through python etc. I know if I my first programming experience was in C++/Java I'd run away in no time. It doesn't strike me as a coincidence that some of the best programmers started with BASIC. Yet we try to dump C++/Java into high schoolers who have not typed a line of code before.
- bootload 17y ago"... May be someone can elaborate more on why C++/Java is better than pyton for AP Comp Sci ..." "c" rather than cpp because it's "lingua franca of programmers" ~ http://www.joelonsoftware.com/articles/CollegeAdvice.html http://www.joelonsoftware.com/articles/CollegeAdvice.html
- sgoraya 17y agoC++ was the language taught at my university - I was indifferent at the time because it was what they taught and I started writing practice apps in C++ the summer before I started school. As soon as I went to work for a game developer (my first industry job), everything was C and my thinking about programming languages evolved much more than when I was at Uni. I was left thinking why C++? The year after I left school, the department switched to Java. I guess they know best!
- Darmani 17y agoAP teaches what a plurality of colleges teach. Ten years ago, most colleges taught C/C++, and so did AP; when the balance switched to Java, AP switched as well. I heard earlier today that CMU will be switching its three basic programming courses from Java and C to Python within a few years (and changing its mid-level algorithms course from Java to ML). With CMU and MIT both teaching Python, you can bet a cascade of lower-tier CS departments will follow, and then AP will as well.
- swolchok 17y agoUMich's new Informatics major (AFAICT, it's like Java-school CS) is doing Python for the intro programming course, and grad students in the School of Information also do Python. http://www.pythonlearn.com http://www.pythonlearn.com and http://www.si502.com/ http://www.si502.com/ respectively. Don't know whether these are good courses; in some sense I think it must be hard to have a bad introductory programming course.
- roder 17y agoI love python, so I think this is fantastic for the language and the community. I was taught Java at school... I hated it even then. However, the higher level languages abstract away the core of computer science. ANSI-C is what should be taught IMHO, so all the smoke and mirrors are removed and THEN you can appreciate the higher level langs and their lovely (sometimes) abstractions.
- skolor 17y agoMaybe, but only if it was taught in sequence with a high level course. From my experience, you need both. While it is incredibly useful to learn about the low level stuff, you want be able to hold on to students as easily if it takes you a week to teach them how to do "Hello, World." Just going off how my knowledge has gone, I would say a sequence of High Level OO language->Low level language-> High Level Language-> Functional Language, although that is more of a college level course sequence, not for high school courses.
- roder 17y agoYou need a curriculum, no doubt, I'm with you 100%. I think it's especially important to teach different paradigms. I've noticed for myself, that functional languages "gel" better for me than do object oriented languages. That doesn't seem to be the norm afaik, but I wish I would have been exposed to functional languages earlier in life.
- jamesbritt 17y ago"However, the higher level languages abstract away the core of computer science." OK, but what is "the core of computer science"? Is it CPUs based on the von Neumann architecture, or is it symbolic manipulation?
- roder 17y agoHeh, that's a good question. I was thinking in the context of von Neumann arch, but it's a good argument that it's symbolic manipulation. In that case, any language will do... but the best programmers I know almost intrinsically know the von Neumann architecture and they're C programmers too :)
- dnaquin 17y agoi didn't appreciate it to it's fullest at the time, but when i reread SICP and it seemed like a review, i was grateful for that semester. even though i program python on a daily basis now, this is saddening.
- mustpax 17y agoI absolutely agree. Python is a wonderful language that made me rediscover how fun programming can be. Still, SICP was transformational experience for me. And it wasn't transformational because it was a kind and gentle intro to CS. On the contrary, it was a slap in the face of my silly imperative programming habits. It made me pause and reconsider my preconceptions about computation and computers. In this sense, Python's biggest strength (expressiveness and ease of use) is also its biggest weakness. It will let you get away with having a bland and linear understanding of computation. A good intro program should make you acutely aware of how little you know, and still yearn for more.
- jerf 17y ago"A good intro program should make you acutely aware of how little you know, and still yearn for more." I agree completely. A good intro program should also be enough to give you enough tools to do something useful and meaningful, even if you can't compete with someone who goes through the full course. One heck of a balancing act to pull off, there. Python still has my personal "best balance" vote.
- deleted 17y ago[deleted]
- dca 17y agoSeriously, come on, its called Hacker News, not Hacker Archives. I know its not completely unheard of for the site, but it just seems like this one has been posted a few times now. Where was that search function again so I can look it up? But anyway, when this was news, I seem to remember someone mentioning that Gerald Sussman made a few comments on it. I think he said it's still used for many classes, including some of his more advanced classes, and that when asked why he thought they chose it over Scheme for SICP he said probably because of libraries, especially to control the robots they were using in the class.
- speek 17y agoNortheastern University (right across the river) uses Scheme/How To Design Programs for the intro CS course then uses Java/How To Design Classes for the second CS course. We've got one of the best (I think) CS programs in the country: http://www.ccs.neu.edu/undergraduate/data/ug2009/CSBS2009_Specimen.htm http://www.ccs.neu.edu/undergraduate/data/ug2009/CSBS2009_Sp... FP Scheme -> FP Java -> Java with mutations -> other languages is a great way to build on people's intrinsic knowledge of programming.
- baguasquirrel 17y agoWhen you look back at school, do wish you'd done things you couldn't do now? Or just more of what you're doing now? Python? You can learn that over the weekend while you're working an internship. You can learn to engineer real world systems by taking up said internship, or taking part in the school's RoboSoccer team (If you win much at all, you're going to have a giant codebase. When I was at CMU, we had over 200mb of C++ code which was a lot to look at if you were a student). I'm not a fan of teaching "real-world" systems stuff because it's nonetheless easy to learn incrementally. If it weren't easy to learn incrementally, it wouldn't have become such a mainstream real world tool/system now would it? It depresses me to say this as engineer but it's true. Real world systems are a pain in the ass, they take a lot of time, patience and experience to manage, but are they mentally challenging in a way like Lisp? Not so much. Lisp is one of those things with a giant, intimidating barrier to entry-- the sort of things they need to teach in school.
- bkovitz 17y agoPoint well taken: School is a time to learn things that the practical world won't pressure you to learn, and you will learn the practical stuff once you're hired. But. I have seen so many college graduates, who've spent four years taking classes and passing exams, who still can't program. Programming is a craft. You learn it mostly by writing real code. If you lack the craft knowledge, the deep, theoretical insights are just words.
- baguasquirrel 17y agoHaving people practice programming in school is well-intentioned, but does it work? I went to CMU, which has a reputation for programming rigor. Just a month ago, a former classmate asked me if adding two doubles would preserve the fractional component. Now keep in mind that this was someone who had to learn how the IEEE double is actually implemented (i.e. how they represent it in 64 bits), who had once implemented his own network stack --in C. I was surprised because most people I knew who didn't like programming had quit doing it years ago. See, you don't make good programmers by teaching them python in intro any more than you make good programmers by teaching them how to write their own network stack.
- Derferman 17y agoI am currently an undergrad at Berkeley. I really like the current structure of our computer science program. We start in Scheme for Intro to CS, move to Java for data structures, and finish with C and MIPS for machine structures. After that, the upper division courses are either C++/Java/Python.
- swolchok 17y agoI'll be surprised if you tell me that the end result isn't usually undergraduates who can produce mediocre, unidiomatic code in any of 6 languages. (I've no personal experience with Berkeley grads, just general cynicism.)
- Rabidmonkey1 17y agoMIT has posted the course and video lectures online, in case anyone was interested: http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2008/CourseHome/index.htm http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Compute...
- bbest86 17y agoIs it just me or is the python being taught not very good? See for example this lecture: http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2008/LectureVideos/detail/embed16.htm http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Compute.... The prof starts off by saying that internal class variables should not be accessed directly through the instance, and rather through attribute accessors. The example code with the lecture posted above is littered with what I would I call messy python. Messy attribute setters and getters, catching KeyErrors instead of using .get() on a dictionary, etc. If you're going to teach using python should you not teach pythonic practices as well? Or is it just about the CS? Otherwise there will be a bunch of MIT grads who will have to relearn python if they ever intend to use it in industry which seems to be the goal. The majority of the comments here seem to be in favour of teaching python because python is fun. Teaching python like java seems to me to take the fun out of it. If academia chooses a language to teach with should they use the common practices of that language, or does it not really matter? *edit for formatting... I'm new here
- ianbishop 17y agoI think there is two problems with this: The first is that SICP is one of the most influential, well-written and essential textbooks written for computer science. This is especially true now, as most undergraduate students do not know what functional programming is or what it is good for. The second is that I think the major appeal most people have to python is that it feels very 'natural' to program in, after years of slugging it out in the other languages. But going with the best-case scenario is dishonest and not always best way to approach teaching. As an aside, when Lisp was introduced in my first year introduction course, it was described as slow, old and unused. There was no mention of modern Lisp dialects or any other functional language for that matter.