
Why MIT now uses python instead of scheme for its undergraduate CS program - bootload
http://muckandbrass.com/web/pages/viewpage.action?pageId=2752716
======
baguasquirrel
When 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
Point 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
Having 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.

------
roder
I _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.

~~~
jamesbritt
"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
Heh, 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 :)

~~~
lanaer
I'm not entirely sure that the craft of programming has a great deal to do
with the core of computer science.

A programmer develops software for the hardware of today, so good programmers
had better be well acquainted with von Neumann’s architecture.

Theoretical computer science doesn’t need that architecture. It also needs
mathematicians more than programmers, I think.

------
dca
Seriously, 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.

~~~
sketerpot
Perhaps a more accurate description would be "Hacker Things That Interest a
Significant Number of Hackers at the Time when they are Posted". But that's a
mouthful.

------
dnaquin
i 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
I 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
"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.

------
speek
Northeastern 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_Sp...](http://www.ccs.neu.edu/undergraduate/data/ug2009/CSBS2009_Specimen.htm)

FP Scheme -> FP Java -> Java with mutations -> other languages is a great way
to build on people's intrinsic knowledge of programming.

------
zaidf
I 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.

~~~
Darmani
AP 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
UMich'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> and
<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.

------
bbest86
Is 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-
Compute...](http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-
Science/6-00Fall-2008/LectureVideos/detail/embed16.htm). 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

------
Rabidmonkey1
MIT has posted the course and video lectures online, in case anyone was
interested: [http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-
Compute...](http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-
Science/6-00Fall-2008/CourseHome/index.htm)

------
Derferman
I 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
I'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.)

~~~
garnet7
Why? What do you see wrong with the Berkeley curriculum?

~~~
swolchok
cema had it right -- undergraduates in general like to optimize away their
education.

~~~
garnet7
Ok. I think you mean that they'll spend their time learning the basics of 6
different languages without getting in-depth in any of them.

------
ianbishop
I 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.

