Over on Simon’s site, I ran across a link to a 2001 article where Joel Spolsky takes us Back to Basics in an essay about how high-level programming languages can lead us down the path to poor performance.
Today I want to think about CPUs. A little bit of silicon moving bytes around. Pretend you are a beginning programmer. Tear away all that knowledge you’ve built up about programming, software, management, and get back to the lowest level Von Neumann fundamental stuff. Wipe J2EE out of your mind for a moment. Think Bytes.
I also had to agree with this bit near the end:
These are all things that require you to think about bytes, and they affect the big top-level decisions we make in all kinds of architecture and strategy. This is why my view of teaching is that first year CS students need to start at the basics, using C and building their way up from the CPU. I am actually physically disgusted that so many computer science programs think that Java is a good introductory language, because it’s “easy” and you don’t get confused with all that boring string/malloc stuff but you can learn cool OOP stuff which will make your big programs ever so modular. This is a pedagogical disaster waiting to happen.
A couple of years ago, my wife was working towards her master’s, and needed to take some introductory programming classes. When I found out that they were using Java for these classes, I was dumbfounded. Java is a horrible language for teaching beginning-level programming! Even though it resembles C in syntax, it adds additional layers of abstraction (classes, objects) that are going to be hard to understand without a previous grounding in the fundamental elements of computer programming: data structures and algorithms.
I’ve had formal coursework in Pascal, Fortran, COBOL, and 8086 assembly. I’ve taught myself BASIC, C, Perl, 6809 assembly, and a smattering of other languages, some mainstream, others obscure/specialty, some that I’ve used extensively, and others that I’ve just tinkered with. But whether your programming language of choice is procedural, functional, or OOP, software design still boils down to data structures and algorithms. So it’s best to start with a programming language that exposes those concepts in a simple, accessible manner. Joel suggests C, but I think Pascal is a really good choice, too. For one thing, it was designed from the get-go as a teaching language (side-note: There were cross-platform P-code interpreters long before there was a Java Virtual Machine). Once you get the basics under your belt, then you can move on to higher levels of abstraction.
Or in some cases, move on to lower levels, because I wouldn’t suggest assembly language for a beginner, either. 🙂
And as I commented on Joel’s site, this is not to imply that I’m anti-Java. Far from it. Java is a great language for developing applications. It’s just not a great first language for beginning programmers.