So, when Robert started talking about his April Fools joke post, I immediately thought of the classic essay “Real Programmers Don’t Use Pascal”. It was a take off of a book that was a seven day wonder at the time, entitled “Real Men Don’t Eat Quiche”, which was a funny-once sort of book.
Parts of the “Real Programmers” article didn’t age well- most of the languages discussed (Pascal, Fortran, Cobol, Assembler) are, by and large, irrelevant and unknown to most professional programmers today. Most programmers today don’t know flow-charts, and don’t hang out at beaches doing anything, because most beaches don’t have wireless.
I would, however, argue that the Real Programmer is alive and well- indeed, he (and it is almost always a he) is even more prevalent today than he was in 83. Aspects of being a real programmer have changed, but the core attitude and nature of the Real Programmer remains. Indeed, in many ways the modern Real Programmer is worse than the original. The original breed still remains, mainly doing C++ these days. Meanwhile, a new breed of Real Programmer has arisen, and found a home in languages like Ruby. Some of the aspects changed, but the attitude DNA remains the same.
By the way, the date as I write this is April 3rd, and I’m being deadly serious.
So what are the defining attributes of a Real Programmer?
First, and foremost, Real Programmers are about the testosterone. If your average Cobol/Java drone thinks programming should be (needlessly) dull and boring, your average Real Programmer thinks programming should be (needlessly) difficult and dangerous. The purpose of programming, to the Real Programmer, is to prove how clever and/or manly they are.
Now, there is a little bit of Real Programmer in all programmers- you can’t get good at programmer without getting a kick out of solving a hard problem just to solve a hard problem. But for most of us, we grow out of that being our primary motivation- and that’s where the Real Programmer is different. The Real Programmer is the classic “thirteen going on thirty” programmer. If there are two ways to solve a problem- the hard, difficult, and dangerous way, and the simple, easy, and safe way, the Real Programmer will choose the former. After all, what good is a solution if you can’t brag about it?
This is the core attitude of Real Programmers, from which all other attitudes can be derived. It this attitude, more so than anything, which distinguishes a Real Programmer. It is possible to be coding primarily in Assembler, Fortran, and C++ and not be a Real Programmer- and it is equally possible to know no other language than PHP or Basic and be a Real Programmer. The difference isn’t in the tools or languages used, but rather in the attitude taken.
As an example of the “derived” attitudes, Real Programmers don’t maintain code- there are no bragging rights in maintaining code. Only in new code do bragging rights hide. This includes rewriting code- but only if the new version of the code is somehow better (or at least was written faster) than the old version. This is how the Real Programmer fixes bugs- they throw out the old code and rewrite it, only now the code isn’t old and crufty and broken (new and crufty and broken, maybe…).
Real Programmers don’t make mistakes. Or, at least, don’t admit that they make mistakes. To admit to making a mistake is to admit to being something less than God’s gift to programming, which undermines the primary motivation. Only wimps and incompetents make mistakes. Trying to sell a new technology (such as static typing) on the grounds that it catches many mistakes the programmer makes is just an affront to the manhood of the Real Programmer- and thus will inevitably be dismissed.
The one exception to this is when, by accepting that you might, theoretically, have the potential to one day make some sort of minor error, you get to brag about what you did to avoid that (extremely unlikely) eventuality. This is where Unit Tests come in. See, the great thing about unit tests is that they’re code, generally new code. And when you change some piece of the “core” code, you get to rewrite (from scratch) a whole bunch of unit tests!. And then you get to brag about how many unit tests you have, and have written recently. It’s all about the bragging rights, remember.
Since Real Programmers don’t make mistakes, anything done by the language to prevent mistakes is pointless, and simply serves to thwart the intentions of the Real Programmer- the uppity computer thinks it better than him, see? How is the Real Programmer supposed to display his cleverness with the damned compiler henpecking him at every point? If you write, and constantly rewrite, a whole huge bunch of unit tests, and then brag about your unit test suite, but still don’t like static typing, you may be a Real Programmer (with apologies to Jeff Foxworthy).
This is a concept that, when taken to it’s logical conclusion, drives you to program in assembler. Not all Real Programmers take this logic to the extreme- this is the primary difference between the “Old Guard” Real Programmers, and the “New Wave” Real Programmers. The New Wave of real programmers don’t mind not having pointer arithmetic, or not having manual memory management, two things the Old Guard can’t imagine living without. But that’s just because the New Wave has grown up with languages where that was just standard. Try to sell a Real Programmer a new programming style or language feature, based on trading a small amount of power (mainly the ability to screw up) in order to gain a large amount of protection from mistakes will simply be met with hostility.
Real Programmers don’t document, because you can’t brag about documenting. You wrote a real nice introduction to how the order flow system works? Hah! I rewrote the whole billing system. From scratch. With one hand tied behind my back. I almost didn’t make it out of the server room alive!
Real programmers don’t trust that fancy book-learning stuff. This is one way where the New Wave of Real Programmers is even worse than the Old Guard. The Old Guard at least new basic data structures and algorithms, and could do things like sort an array (though they did have a tendency to write super-tuned hand-optimized assembly language implementations of bubble sort). The New Wave is not capable even of that. Their knowledge of algorithms and data structures is limited to the API of the Vector/List/Array class of their favorite language(s), including the call to the sort() routine.
I will say this sort of ignorance is (or has become) very common place among programmers. In interviews, my favorite first question is “write a routine to sort a linked list- any algorithm is fine- bubble sort, merge sort, whatever.” This shows me two things, that a. you can in fact write code, and b. you have some knowledge of basic data structures and algorithms. One of these days I hope to be involved in an interview where I need to come up with a second question that isn’t designed just to make the interviewee feel somewhat better after completely blowing the first question.
Ignorance may be common, but the Real Programmer takes it to another level. Now only are the ignorant of the basics, they wear their ignorance as a badge of pride. Not only do they now know anything, you are suspect if you demonstrate any theoretical knowledge, or opine that such knowledge might be useful. Once again, the issue comes down to bragging rights- which of these two scenarios gives one the most bragging rights: struggling with this complex, thorny problem for months (barely making it out of the machine room alive), or recognizing that the problem is a partial differential equation, and simply looking up the solution? Bingo.
And so on.
There is one last topic I want to touch on before signing off, because I know it’ll come up in the comments. I have fairly recently opined that programming shouldn’t be boring. This can be taken, basically correctly, as a rant against the “Cobol/Java Drones”. But this does not mean that I was encouraging people to be Real Programmers.
The opposite of the Drone isn’t the Real Programmer, in fact the two breeds of programmers have a lot in common- an ignorance of theory, not thinking about what they are doing and how they are doing it, an emphasis on code even at the cost of maintainability, resisting change, and so on. A Drone is basically just a testosterone-deficient Real Programmer. Neither one really thinks.
And if you’re about to write a flame (in the comments below, or on the comments section of reddit or digg, or on your own blog) all about how wrong I am, how you are in fact God’s gift to programming, and if I knew anything at all I wouldn’t be espousing such stupid questions, perhaps you should stop and think…
Related posts:
Pingback: links for 2009-04-08 « pabloidz
Pingback: del.icio.us bookmarks for April 6th, 2009 through April 20th, 2009 < Subject Code
Pingback: On Interview Questions and Sort Routines