6 ms·
This issue is a fundamental one that everybody teaching programming or computer science must answer. Is it better to teach CS from the ground up or top down? T
by lincolnq 17y ago
This issue is a fundamental one that everybody teaching programming or computer science must answer. Is it better to teach CS from the ground up or top down?
The ground up approach is something like SICP, with fundamentals in lambda calculus or Turing machines. Students learn rules such as how a Lisp evaluates an expression and write programs which apply the rules. It's not necessary that this be taught using Lisp, but it seems to be popular, because it greatly reduces distractions when understanding and writing actual programs. In any case, the ground-up approach generally teaches first a system of rules, and only once the rules are understood does it move on to programs.
The top-down approach, on the other hand, starts with programs. Often the students are given a partially written program and are asked to improve it. The curriculum doesn't focus on rules because they all have exceptions. It's much more like engineering and less like mathematics. As the article says, 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's better? Some schools (such as my alma mater, Brown) have two intro classes, one for each method of teaching. I chose the rules-based bottom-up approach when I was an undergrad, and it was very good, and I was convinced it was the better way to go.
But I'm losing my conviction, partially because MIT is changing it and they must know what they're doing (heh), and partially because I'm coming to the understanding that everybody uses libraries and this is not going to change. The top-down approach doesn't really provide any sense that there should be libraries, that code should be organized, that you can write to an interface and document your code. People can learn these sorts of things later, though.
- nopinsight 17y agoDid you mean "The bottom-up approach doesn't really provide any sense that there should be libraries, ..."?
- lincolnq 17y agoyes, oops.
- twopoint718 17y agoI've never heard this characterized so well. There was a <something> that I had always been trying to put my finger on when I'd read these sorts of articles and the top-down/bottom-up description is right on the mark. My own feeling is something like this. Before Newton there was Kepler. Now Kepler was no dummy and he used the exacting measurements of Tycho Brahe to arrive at a very accurate model of planetary motion. He found that planets traveled in ellipses not circles, and he knew that they swept out equal areas in equal times (among other things). In short, he had a very firm "top-down" grasp on what planets did. Then along came Newton, a "bottom-up" thinker if there ever was one (calculus was invented in what was perhaps the most supreme feat of yak shaving ever http://catb.org/jargon/html/Y/yak-shaving.html http://catb.org/jargon/html/Y/yak-shaving.html ). He found that there was an underlying and unifying idea, gravity, that explained why the planets behave as they do. So to cap off my analogy, I've found that if I've worked in a sufficiently bottom-up way on something then sometimes what seems complex or intricate collapses down into some small and elegant solution that I wouldn't have seen if I were coming from the other direction (or at least it would be much more difficult).
- lincolnq 17y agoGreat analogy. I guess the answer is "people should be able to apply both ways of thinking". So how do you impart both in a curriculum? I have observed that for great hackers, it doesn't matter what method they are taught -- they'll learn both and apply them appropriately. This was probably true for Newton. It's certainly true for one of my best friends, an excellent hacker, who is as much a bottom-up thinker as anyone could ask for and yet he took the top-down class. He was going to learn how to think about problems in the optimal way no matter how, or what, anyone taught him. I'm not sure what this means for how the intro course should be taught. Certainly it seems to suggest you won't be ruining anyone with great potential by teaching them the wrong stuff. So maybe MIT has realized that it doesn't matter for the best students, and they've been doing the same thing for 30 years and it's time for a change. What the hell. See how it works, and then maybe change back or learn something new. They're going to have to run this experiment for a long time, though, in order to figure out whether it's actually better. I'm quite interested to watch.
- silentOpen 17y agoUnfortunately, when MIT moved from 6.001 in Scheme to 6.01 in Python, they also changed later courses to Python because now students wouldn't have Scheme experience. This results in: 6.005 ("software engineering") in Java 6.006 (intro to algorithms) in Python 6.034 (intro to AI) in Python 6.035 (compilers) in Java (6.005 was 6.170 which used Java and 6.035 has always used Java afaik so this list isn't all the new curriculum's fault... but it does give a good overview of MIT's undergrad CS decline) Frankly, this is unacceptable. I'm not sure I would hire an MIT CS grad that did the new curriculum. It is absolutely absurd that MIT (which purports to have one of the best CS programs in the world) is teaching Java and Python in their undergrad CS curriculum even in places where Java and Python are not the best suited (compilers!? algorithms!? AI!?). For instance, one 6.005 pset is to build a Sudoku solver... in Java. Every MIT undergrad should have the ability to learn a new programming language. 6-3 students (CS majors) should especially be able to do this. MIT is getting watered down. Students don't learn other programming paradigms and they learn to accept the bloat and poor design decisions of the required languages. Where once students would build a text adventure and a metacircular evaluator in Scheme for 6.001, they now build what amount to Lego Mindstorms kits. Seriously?
- spamizbad 17y agoQuite frankly I'd rather be working with robots than building text adventure games (been there, done that: when I was 13). And while building a meta-circular evaluator is interesting, I don't see how it can be considered a central tenet of introductory computer science. Also, both Python and Java have implementations that are meta-circular (PyPy, Jikes RVM, and Squawk), so it's not like you're shutting the door on these concepts to beginner students by bootstrapping them with conceptually-limited languages.
- amalcon 17y agoThe program I was in didn't even try to do things like this. Web course? Use perl. OS course? Use C. Soft Eng? Use Java (people demanded at least one Java course). If you can't learn the appropriate language within the first week of the course, you probably should have a different major. Naturally some people were very upset about this, but it definitely made for a better program all in all.