Why MIT now uses python instead of scheme for its undergraduate CS program
muckandbrass.com
muckandbrass.com
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.
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.
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.
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.
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.
OK, but what is "the core of computer science"? Is it CPUs based on the von Neumann architecture, or is it symbolic manipulation?
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.
It's useful to understand both the way that the machine works, down the the assembly level, and if possible below, since it lets you write code that fits the way the hardware works well. It's useful to understand the symbolic side, since it lets you reason about algorithms, and write code that fits the way mathematics work.
You can't get away from either.
The main reason is that we loose ~10% of the undergraduate enrolment explaining why hello world is:
public class Main { public static void main(String[] args) { System.out.println("Hello World"); }}
(I just got back from helping a bunch of freshmen try to test a number for primality. It was brutal. And we're using a language without all that "public static void main" stuff, so that's not even an issue.)
This isn't a call to "dumb down" Computer Science - the curriculum should still be challenging, but Java is the wrong kind of challenging. Students are spending more time learning how Java works than learning how to program.
We're losing a lot of students who might otherwise love programming if they could see the beauty of it earlier on. Having students learn using a Lisp would be better (hooray for minimal syntax!), but Python is a nice compromise.
even though i program python on a daily basis now, this is saddening.
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.
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.
We've got one of the best (I think) CS programs in the country: 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.
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.
"c" rather than cpp because it's "lingua franca of programmers" ~ http://www.joelonsoftware.com/articles/CollegeAdvice.html
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!
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.
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
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.