education

CS learning problem?

December 29, 2005 23:32:33.006

Joel decries the movement of Java into CS departments - he wavers a fair bit, but seems to think that students should still be working with languages like C (during the first half or so of the post). He gets to the right point at the bottom though:

The most sympathetic interpretation of why CS departments are so enthusiastic to dumb down their classes is that it leaves them more time to teach actual CS concepts, if they don't need to spend two whole lectures unconfusing students about the difference between, say, a Java int and an Integer. Well, if that's the case, 6.001 has the perfect answer for you: Scheme, a teaching language so simple that the entire language can be taught to bright students in about ten minutes; then you can spend the rest of the semester on fixed points.

That's the problem, and I'll say that using C or C++ are even worse. The students get bogged down in irrelevancies instead of learning something useful. That was the thought behind Pascal years ago, and it's why Scheme, or Smalltalk, or Python, or Ruby would be better choices than those dagnasty C based languages.

Meanwhile, Scoble says that MS is having trouble finding enough C and C++ programmers:

Almost every team I interview with my camcorder says they can’t find enough C or C++ programmers to get their stuff done. Some on very exciting teams with hundreds of millions of users. Some that, gasp, actually have budget to hire real programmers.

They could try doing it the old fashioned way - hire smart people and train them. When I went to work for the DoD (Lo, those many years ago now), that's what they did - a lot of the software developers that came out of DoD weren't even CS grads (I wasn't). You get fewer bad ideas that way, and can train people in your shop idioms.

Comments

[Aristotle Pagaltzis] December 30, 2005 7:38:06.305

C and C++ are very different languages, and Joel isn't talking about C++.

By and large, I agree with Joel that understanding C (not C++) and pointers and knowing how to work close to the metal is a valuable skill. The abstract reasoning skills required to understand first-class functions and pointers feel very similar to me, in fact.

I don't write any C these days except occasionally for the challenge. But understanding how things work close to the metal has given me instincts that do aid in writing better code at the application level. Theoretically, I would write C when I need the speed. But that hasn't happened yet; not just because performance is rarely a real concern (which is true), but also because in the few cases where I need the performance, understanding how things work close to the metal has let me peer through the abstractions of the very-high-level language, and I could remove bottlenecks at that level without having to drop down to the metal.

[Joerg] December 30, 2005 11:57:28.787

Well different languages teach different things. At Carlton in late 80's I recall:

  • Pascal was used as the intro to programming course.
  • Smalltalk was used to teach data structures. This worked well for two reasons: 1) no need to worry about heap vs stack, allocation, bad pointer errors etc. 2) it was great to be able to inspect your structures which stepping in the debugger and see the effects of you code. As a Smalltalk centric school Smalltalk was also used in a lot of other places.
  • Assemblly as part of a course on how machines work. We build a game if I recall. There was also a simplified 4 bit assemble used that ran on a simulator.
  • Scheme was used for a theory of computation course.
  • C was used in a robotics and machine vision course.
  • Finally everyone had to take a language survey course which included projects in Fortran, Cobal and one other language I've forgotten.
This kind of mix is the way to go.

[Steve] December 31, 2005 15:18:39.499

I'm with Joerg on this one. I was in Uni in the 80s too; our school didn't have Smalltalk for undergrads, but we had to do a lot of Pascal. Our survey class covered Smalltalk, Ada, FORTAN and Lisp. While we didn't have to program in those languages, we had to understand exactly how the compilers managed variable scoping and memory allocation.

Unfortunately the "Java vocational school" approach falls down on these concepts in a huge way.

I find it interesting that many of the people who really appreciate Smalltalk are the ones who've been through all this stuff and have a good mental picture of what's going on underneath the crufty languages. The rest seem to have learned Smalltalk to start with and there's no uncrufting required :)

Having said all that, I'm sure there are schools out there that mostly teach Java but still manage to get the foundations down. Java's a decent substitute to Pascal after all. If you can turn a blind eye to the committee-induced bureaucratic complexity that the Java "standards" impose on you, it's just a programming language after all. And there are a lot more out there.

BTW, while I agree that C and C++ are vastly different languages, I don't think of C as "close to the metal". BASIC, now that's close to the metal :)

Smalltalk isn't perfect. But it is the most *usable* language I've found. Even the Java and C# stuff released in 2005 is still painful to use. I think Steele is right. We need to keep looking.