Weed them out or teach better?

I don't know how many teachers are reading blogs during the Christmas break (or the winter break between now and New Years) but I hope some of you are reading this one. Joel Spolsky has a very interesting entry called The Perils of JavaSchools. No it is not an anti-Sun and/or anti-java rant. Well not in the sense that I might write one. 🙂 What it is though is an interesting and potentially provocative look at the state of computer science education.

Two things that Joel believes that CS students need more of are recursion and pointers. While you can do recursion in Java it seems like a lot of students don't quite get it in school. Now the Advanced Placement Computer Science curriculum does require recursion I tend to believe that a lot of teachers don't teach it well. Some of that is because many of us didn't learn it very well ourselves. I confess that I was late coming to an understanding and appreciation of recursion. Now pointers I appreciated early in my career but than I was doing a lot of playing around with operating system internals back in the day.

Joel argues for these tools not so much for themselves though. Rather he likes them for the way they help people look at things differently. The mental flexibility and mental ability. I really agree with that notion. Tiny is the number of times I really needed recursion and smaller still the number of times (outside of OS work) where I needed pointers. Still the fact that I understood them served me well in understanding other things like who databases and indexes work.

But I disagree with Joel on the value of "weed out courses." I don't think they are a good idea at all. Well perhaps they can be used to weed out the poor instructors. I happen to think that programming is not so hard if it is taught well. Teaching it well, well ok, that is hard. Joel complains about schools that "fail to train the brains of kids to be adept, agile, and flexible enough to do good software design (and I don't mean OO "design", where you spend countless hours rewriting your code to rejiggle your object hierarchy, or you fret about faux "problems" like has-a vs. is-a). You need training to think of things at multiple levels of abstraction simultaneously, and that kind of thinking is exactly what you need to design great software architecture." I don't think we need to weed out students who can't learn those things because I don't believe there are all that many people who can't learn them. We do need to find better ways to teach those concepts though.

I do believe that you can teach good computer science with C#, Visual Basic, Scheme, and even Java. I also believe that you need to learn a language like C/C++ at some point if you are serious about computer science. But the basic concepts and the critical thinking skills can be taught with almost any language. What is required though is a focus on the concepts and not on the language. That can be difficult, especially in a first programming course. But it is worth the effort.

One last thing. Most of my students reported that they learned new languages, as different as FORTRAN and Java, in college very easily because they understood the concepts. Ask them to create a linked list in a new language and most of them could do so fairly easily. If a student finds that they can’t learn a new programming language quickly you have to wonder if it is because they are not a quick study or did who ever taught them let them down?

Comments (3)

  1. tzagotta says:

    In his usual arrogant style Joel completely misses the point – programming IS EASIER than it used to be. Therefore, programming is more accessable to folks who are maybe not as motivated or not as smart as it used to be. His job as an employer is a little harder, because he can’t assume all CS students meet his high standards, as was apparently the case when he was in college. But I don’t buy that either…

    Also, I never saw data structures as a "weeder class." No, the weeder classes for CS are the very advanced physics and math classes we were subjected to that have zero relevance to software design/implementation/etc. Maybe weeder classes are a necessary reality, to help manage demand for certain degrees; I’m not sure.

  2. anandi says:

    I just took a programming course at UW and they taught it in Java but we did go over recursion in a fair amount of detail. I do think it’s a great way to stretch your mind and think a little differently.

    I learned how to program in Basic starting in second grade, so I don’t even remember learning about FOR loops and IF THEN ELSE, etc. I just know it. I think if we started with this stuff earlier in school, kids would just pick it up. Kind of like learning a foreign language – it’s easier when you’re very young…

  3. It seems to me that recursion is typically not taught as well as it could be, and definitely NOT as well as it should be.

    Like other CS topics (pointers, sorting, inheritance, etc.), recursion is a technique in the experienced programmer’s toolbox. Yes, you can do a great deal of good coding without ever using it, but there are some places where it is essential if not irreplaceable. (If you doubt this, try searching for a single file in a large hard drive without it. Possible, but rather painful!)

    I’ve had discussions over the years with some of the “giants” in the APCS community, however, who actually implied that recursion was an archaic technology that shouldn’t even be covered anymore because of its relative uselessness. (I believe the phrase was, “No serious real-world application would use recursion over iteration.”) I listed for him several applications that I had written (hard drive scanner, a overlapping window GUI, etc.) and asked him to say which was not a serious application.

    Fortunately, I was taught recursion by a brilliant professor in college, thoroughly grasped the concept, applied it repeatedly in industry, and have (I believe) successfully since taught it to several dozen students in recent years. It can be done.

    (And, for the record, I am at least as zealous about pointers! 8^)

Skip to main content