|
|
|
|
|
by strlen
5862 days ago
|
|
> As for your sequencing recommendation, I think it's better to learn foundational CS with something like SICP/6.001 and then reifying it with C (this CMU course looks damned good: http://www.cs.cmu.edu/~213/index.html). I think it's easier to make your mental tool box bigger if you can do it this way. Thanks for pointing out SICP/learning a non-imperative language. It's very important to learn a functional programming language and Scheme is the best choice because a) it's the language SICP (one of the best computer science books) uses b) it's "pure-enough" (you still have set! if you need it, but tail call elimination is a part of the language specification) as a functional language and doesn't introduce too many other (important, but unrelated) ideas (unlike Haskell or ML which have strict typing and unlike Scala or F# which have OO). I would, however, disagree with you that it should be the first language: it should be taught before "blub damage" takes place (e.g., before students think only in terms of OO) but it's good to be familiar with programming and data structure to some extent (it helps to understand cons cells as pairs of pointers). C is a great language to precede Scheme: it doesn't force the OO paradigm and teaches students to differentiate between the value of the object and the address of the object (thinking in terms of multiple levels of indirection). The reason I argue against teaching SICP to complete newbies is because otherwise students tend to think of functional programming as some sort of an academic exercise and not as an approach to solve the problem. I am basing this on actual observations of students that I know at UC Berkeley and at my own school (where a Haskell based course served the same role). Unfortunately in general I find that students don't appreciate the value they get out of a non-"Blub school" ("why am I messing with pointers and recursion instead of writing GUI apps") until much later in their career ("oh, I know how to reduce the state to take advantage of all the cores!"). (1) I use "Blub school" rather than Spolsky's "Java school", as teaching C#, Python or Ruby as sole languages would have the same effect (it's trivial to learn all of these languages once you already know C and Scheme, it's an uphill battle do the reverse). |
|
This was an entirely political exercise (the command to entirely purge Scheme from the base undergraduate curriculum), now that I think about it an example of not letting a crisis go to waste, for the department panicked over the enrollment crash and SICP was replaced with flashy robots for students to play with.
Anyway, the old official philosophy was that functional programming should be learned before imperative (serious OO wasn't even taught, that got added to 6.001 but not SICP later when the OO mania took a firm enough hold); in spring 1983 6.001 Sussman stated with a variation or subset of this famous quote by Dijkstra:
"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
You do have a good point about sequencing. Many have noted that the people who learn and appreciate functional programming best are those who have been thoroughly scared by imperative programming experiences. I for instance took 6.001 exactly 7 years after my start with punched card IBM 1130 FORTRAN "IV" (only numeric IF statements) and by then a lot more imperative programming including a fair amount of C, and I sort of got it. I get it a lot more now that I've gotten many more scars (back then I sensed there was something really big here, now I feel it in my bones).
I can well believe what I've heard from others as well as you that many less experienced programmers don't get it when they do SICP early in their programming careers. On the other hand, there's a lot more to SICP than functional programming ... and there's pretty much no way to give students enough scars in 4 years of undergraduate programming so that a late functional programming course will be certain to "take". So for those who aren't autodidacts I'm not sure what to recommend....