Skip navigation.

Low-level is higher now

Low-level is higher now

programming

For old fogies who think there's no progress in software, this advice from Joel Spolsky to college students:

Learn C before graduating

C. Notice I didn't say C++. Although C is becoming increasingly rare, it is still the lingua franca of working programmers. It is the language they use to communicate with one another, and, more importantly, it is much closer to the machine than "modern" languages that you'll be taught in college like ML, Java, Python, whatever trendy junk they teach these days. You need to spend at least a semester getting close to the machine or you'll never be able to create efficient code in higher level languages.

I agree wholeheartedly with that advice. However, I can't help but be amused that in 1981 (when I got my BS), that advice could be - and was - expressed in these terms:

Learn an assembly language before graduating

Assembly. Although assembly is becoming increasingly rare, it is still the lingua franca of working programmers. It is the language they use to communicate with one another, and, more importantly, it is much closer to the machine than "modern" languages that you'll be taught in college like Pascal, C, whatever trendy junk they teach these days. You need to spend at least a semester getting close to the machine or you'll never be able to create efficient code in higher level languages.

It sounds hard to believe people said that of C, which has been called "portable assembly language", but people did argue (rightly, I think) that people who only knew C did not really understand the costs of things like function calls and passing structures as arguments (as opposed to pointers to structures). Thus, they wrote inefficient C code. I remember serious and heated arguments on USENET about whether C compilers could possibly get good enough to allow C to be used for serious applications like operating systems. (Though I do think the assembly defenders were definitely losing by then.)

Nowadays, I wouldn't recommend just learning C, I'd recommend learning the C-coded virtual machine of some higher-level language (Ruby, Python, Lisp, Smalltalk). Learning how closures/blocks/lambdas really work is the modern equivalent of understanding function calls. Ditto garbage collection and passing structs. Not only will you learn about efficiency, you'll learn what these features really do - so you'll more readily recognize situations where they apply, and you'll make fewer puzzling mistakes.

Then the next important thing to master is when not to pay attention to what you know about efficiency.