As we close in on the celebration of the Gregorian calendar's new year, I find myself in a rather reflective mood. It's an annual thing, always happens to me about this time every year. I look back and ask myself questions about the year just past. Did I give enough to the church, did I go to church enough, am I going to burn in hell for eating too many Reese's Peanut Butter Cups this year? Was I kind to animals, did I recycle enough, should I have yelled at my pointy-haired boss more this year?
Adding to my annual rite of introspection is this book that just landed on my desk, Engineering a Compiler. It has raised one more question for me to contemplate (instead of doing real work)—in this Internet age, does a well-rounded CS degree still require a compiler class?
The worthless compiler course
Now I should preface this whole discussion by saying I don't even have a CS degree. My degree is in something completely useless—electrical engineering from my beloved Texas A&M. I did take a lot of CS classes along the way, though unfortunately never a compiler class. But I seem to recall the CS geeks at A&M running around with Aho's dragon book (so-called because the cover has a dragon pictured on it).
I can't say for certain, but so many people were carrying that book that I think it was a required course back then, although the current listing on A&M's site says there's no compiler class required nowadays for CS majors. Some of my colleagues here at CNET tell me that a compiler course was required for their CS degrees, though it doesn't seem to have been a universal requirement like, say, a data structures or a survey of languages class.
Back when I was in college, compilers mattered. I won't reveal exactly how old I am but suffice it to say that I did a number of my college term papers on old Tandy TRS-80 Model III, before A&M upgraded the computer lab to a bunch of Apple Mac SE's.
In such an age, when dinosaurs roamed the earth, the study of compilers was a real and vital field that warranted a required course. There were dozens of competing hardware architectures, and at least as many companies hawking compilers to help build apps for all that hardware—plenty of need and desire for compiler skills.
Today there's but a handful of companies actively working on commercial compilers, and it seems like the real interesting place to be is on the front-end side. Stuff like IDEs, such as IntelliJ and Eclipse, are where the big productivity gains are coming from in this business. And class libraries, like the ones in .NET and Java, make it easier to do database and network programming. Not the compiler—which tries to optimize and squeeze every last ounce of performance from the hardware. Compilers don't seem to matter that much anymore; it's the IDEs and libraries that matter most.
Long live the compiler (course)
But here's the rub—I actually think studying compilers is in fact still relevant today. The reason I regret not having taken a compiler class in college is that building a Web site is so much about scripting, and having some understanding of compilers is extremely useful in that kind of environment.
For example, I spent much of my life here at CNET writing templates in TCL for our old Web publishing system. I am convinced that if I had understood key compiler concepts better I would have been a better (and faster) scripter. I would have learned things like parsing or even the ability to reason about what kinds of operations might be expensive to perform, how to think about how to reorder my code to make it more efficient—the kinds of things I would have learned in a good compiler class.
So even though I'd never actually want to write a compiler myself, knowing about compiler concepts would have made me a better programmer. It's one of those gaps that I regret, which is why I think I may actually try to struggle through a few chapters from this Engineering a Compiler book during the holidays, in between all the holiday activities like eating. And shopping. And listening to "Santa Got Run Over By a Reindeer" for the billionth time. And watching endless college bowl games while cursing the BCS. The really important stuff.