Learning Computer Science: Where does Java Belong?
In light of the article presented in the Journal of Defense Software Engineering, and the responses it has generated, I just couldn't resist throwing my 2 cents in, particularly as I'm killing time between job interviews.
If you haven't been following this debate, let me recap. Some Ada experts are saying that the growing monoculture of Java in college curricula is damaging the quality of CS education. It's producing software engineers who do not know how to engineer.
"Students found it hard to write programs that did not have a graphic interface, had no feeling for the relationship between the source program and what the hardware would actually do, and (most damaging) did not understand the semantics of pointers at all, which made the use of C in systems programming very challenging."
I think Java is a wonderful language for teaching computer science. However, they're not entirely wrong, either.
I bring the perspective of one who's been through such a curriculum. Washington University was one of the first schools to jump on the Java bandwagon, thanks to the efforts of some wonderful professors. I took the first iteration of CS 101 taught in that language, back in 1997. Previously, CS 101 was taught in Scheme, and CS 102 was taught in C++.
The change in these courses were extremely popular. We were able to build more substantial software in our first semester than students had in previous semesters. In our first semester, we were already learning the rudiments of good object oriented design. In our second semester, we were learning the rudiments of good concurrent programming.
However, the next year I took a Design Patterns class that was taught in C++. I was completely unprepared. I spent half the semester catching up to the kids who knew what pointers were, and how to do linking and write a makefile. I didn't learn the Design Patterns until I took Advanced Design Patterns a year later.
The general attitude of most professors at the time was that students needed to get off their butts and learn the languages themselves. The professors were teaching computer science, not programming. <crotchety-old-guy>In my day, if we needed to use a different language, we bought a book and learned it in a week!</crotchety-old-guy>
Well, that may be fine if you learned Ada and are expected to pick up Pascal, but taking a student who's only been taught Java, and expecting them to go off and pick up C++ before class is going to cause problems. They're not going to have the first clue how to run a linker, what a pointer is, or what the point of a header file is supposed to be.
This is exactly what the authors of the Journal article mean when they say:
...we have regretted the introduction of Java as a first language of
instruction for most computer science majors. We have seen how this
choice has weakened the formation of our students, as reflected in
their performance in systems and architecture courses.
WashU's student ACM chapter saw these problems, and put together their own curriculum for a lab-based class that taught these and other concepts behind good coding techniques. We even chose a textbook. We figured, if they would teach this class, that would free up the higher level systems and architecture classes to teach what they want, instead of the rush to the bottom that was occurring at the time.
Well, at the time, no one wanted to teach it. However, I've heard they since introduced it, and students are finally learning how to code and debug before taking systems and architecture classes.
So, does all this mean that WashU made the wrong move? I don't think so. Java is not bad for education. Bad curricula is bad for education. They made some mistakes in the implementation, and then they fixed them.
The Journal's critique had 3 major themes:
1. Mathematics requirements in CS programs are shrinking.
Okay, if they're talking about discrete mathematics, numerical methods, and automata theory, this is clearly a bad trend. However, WashU used to have engineering requirements in mathematics that just didn't make sense. I don't need Laplace transforms to do CS. I only need them if I'm going to work for Wolfram.
2. The development of programming skills in several languages is giving
way to cookbook approaches using large libraries and special-purpose
The fact that such packages are available for Java does not mean Java is bad for education. My instructor for Algorithms and Data Structures allowed us to use C++
or Java, so long as we weren't just calling java.util.Hashtable to
write our hash table. Nothing wrong with that.
3. The resulting set of skills is insufficient for todayâ€™s software
industry (in particular for safety and security purposes) and,
unfortunately, matches well what the outsourcing industry can offer. We
are training easily replaceable professionals.
This one is best read with the source in mind. These guys are Ada experts in the Defense industry. Formal methods and provability are very important, but they are not core classes that everybody should take. They are invaluable if you're going to work in defense or safety applications, but probably not if you're going to work on, say, speech recognition. For that, we need students who took courses in machine learning. The field is now big enough for multiple specializations.
By all means, teach classes in other languages. Students should be forced to take at least one class in a functional language. However, for CS 101, Java is an excellent choice.
I also took a course in assembly, and even a course in VHDL. Talk about bare metal -- C is for wimps :)