I have always been under the impression that most of the population doesn't have whatever it is that makes us able to be effective programmers. Even among programmers there is something that distinguishes the really good from the really average. What is it in the brain that is so different?
Some time ago I read an article where someone postulated that programmers and people with autism have similar brain features (though not exactly the same of course). Some type of mental differences in how the brain processes information that is not found in most of the population. Although the typical stereotype of a geeky nerd who never showers, stays up 3 days in a row to code, and has no social skills comes to people's minds, I really don't find any consistent outward signs in all the programmers I have known over my career. Most have been fairly normal people who are nonetheless possess the ability to write an debug code. Some did exhibit the stereotypical traits but in most cases you wouldn't know they were programmers by how they acted.
Something however does distinguish the programmer from the non-programmer, and the good one from the average. A set of mental skills and talents, a creative outlook, ability to concentrate deeply, and an intense need to slay problematic dragons. You can find many of these traits in other professions, but programming above all is a dense combination of mental abilities that (rarely) require an advanced education.
Almost all other professions take a long time to learn the basics before you move beyond them. Becoming a doctor takes 7 years or more. In many professions such as architecture and chemistry you need advanced degrees and long practice before anyone allows you to do any original work. Yet I have know people who barely graduated high school be able to write complex software. I never had any formal programming education and taught myself; although I did start working on a masters in chemistry I basically flunked out and got a programming job by pure luck.
People either are able to program or not. Education can help prepare you better and give you better tools to start with, but if your mental capabilities are those required to program then you won't be able to do it. Pure intelligence doesn't matter. One of the worst pieces of code I ever saw (a 29,000 line C program in one file with a 14,000 line event loop) was written by a guy with a PhD in some science field. He just didn't get how you structured and debugged a program despite working on it for 18 months.
One time I had a guy I work with come to my office every day for months and explain what he needed to do (in boring detail) and finally ask me what he how to proceed. I basically helped him write his entire project; he simply didn't want to admit he didn't know how. Oddly enough he later went to work at NASA as an engineer.
I have had people work on my projects who didn't have a clue and I would basically write most of their code for them (this happened a lot during the dot-com era). One guy I worked with was one of the first people I knew who got a java certification, yet he simply had no concept of how to build an application. Knowing syntax doesn't make you a programmer.
Programming requires the ability to concentrate on purely abstract concepts using an arcane set of languages and tools, and to create something from nothing that makes a computer do something useful. You need to be able to imagine a solution to an imprecisely defined problem that you can't see or touch. When you do create this something you often have to fix problems in it with very little or even misleading information.
I remember back in my Deltagraph days getting one line bug reports like "I opened some file and it crashed" with no further details or examples. Solving this type of bug requires an immense understanding of the application and its pathways plus the ability to imagine what possible set of circumstances could lead to a user reporting this. Sometimes it seems like you are solving a murder with no body, no evidence, no perp and not a clue where it happened. Yet everyday we face similar challenges that nonetheless have to be dealt with.
It's funny that I don't feel all that bright, lots of things seem way over my head. I made a "D" in comparative anatomy in college because I simply couldn't remember all those stupid blood vessels, yet I think nothing of working with a dozen different technologies on a huge project. Again, it's not knowing syntax (I purposefully forget it) since I remember where to look it up, but the much more vague ability of integrating the whole project in my head. I still remember how I approached virtually every project I have ever worked on but can't remember a method I used last week in some common java class.
Programmers are not geniuses, but there are genius programmers who can be orders of magnitude more productive than the rest of us. I remember that one guy wrote the original 68K emulator at Apple in PowerPC assembly language in a single weekend. Amazing.
For most non-programmer people programming a computer seems like magic, and somehow they think that as a programmer you must be smarter than other people. It's very difficult to explain to them what it is that makes us programmers function. Usually I tell people "I tell computers what to do and sometimes they do it". That's about as far as you go before their eyes glaze over and they fall asleep on you.
So the next time you write some code, imagine that you are one of a small (and at least in the US, getting smaller) group of mildly autistic savants who think of things that aren't there and build things that don't really exist, all while downing Jolt Cola (which I miss) and dreaming of the day when the program actually works the first time.

JGiles 04/04/2007 04:21
Sometimes they do work the first time. I'm always surprised.
Ricky Clarkson 04/04/2007 06:13
It takes a while to realise that your head can't simultaneously think about 20,000 lines of code, and therefore that you need some structure. That's ok, if you start programming at a very young age. By the time you're employable, you'll be employable. If you start programming later in life, it's harder to admit your own mistakes.
So give that kid a compiler instead of a PlayStation next Christmas.
codist 04/04/2007 10:56
Interesting article on the same subject: The Camel Has Two Humps (pdf).
Jordan T. Cox 04/04/2007 10:59
Jolt Cola, THE soft-drink of the elite hacker.
joe 04/04/2007 17:27
IQ, how clever you're able to be, and being able to see 10 statements ahead.
..oh, and you gotta love this crap, too ;)
Jason 04/04/2007 18:04
Great article, a bit ironic it was written by a Java programmer however.
Cameron Esfahani 04/04/2007 21:21
Uh, the 68K emulator wasn't written in one weekend...
Don't get me wrong, Gary is a genius, but he didn't write it in a single weekend.
jan 04/05/2007 01:13
they have a name for it, it's called talent. You can learn all the soccer rules, study all the technics, but you'll never be Ronaldinho. :)
codist 04/05/2007 10:01
@Cameron, thought I heard this from a reliable source back then, I guess not.
04/05/2007 10:33
As a programmer, I don't understand this whole concept that I see among programmers, in which they think they are somehow special because they write code. What is the deal with programmers thinking they are "rock stars" at their company? No, you're not. Neither am I. You're one of millions of people who can speak a programming language. Even stranger is a programmer making fun of someone who programs in another language (the Java comment). Why? Is it like an English speaker making fun of a Spanish speaker? I don't get it. Write in machine code (actually don't, I still won't be impressed). Who is a famous programmer? Name one. Oh that guy? Yeah, only famous to us programmers. Get over it. We're nerds with delusions that we're special and "normal" people just can't see it.
Mike 04/06/2007 23:04
Great post. One interesting thing I've noticed over the years (and something I've explained to several non-programmers) is that there is rarely a single line, or section of code in an application that can't be explained in a minute or two, even to a non-programmer. Yet, many applications as a whole are beyond the comprehension of the most capable humans.
Just this afternoon I was explaining to someone how Google works (Googlebot spiders the page, pages go into a queue, the indexer does some textual analysis and runs the PageRank algorithm, etc, etc. all the way through to the cache on the other end). Once I was done they commented on how complex the system was. They had understood every component when it was described in isolation, but imagining how all of that went together to make Google was beyond their comprehension.
I've heard this described as the difference between something that is complex and something that is complicated. A complicated problem is inherently difficult to comprehend. It's an intricate and hard to understand discrete unit. A complex problem simply has a lot of parts. Each component in a complex problem might be simple to understand, but put them all together and you've got a mess. Programs are complex, they are not typically complicated.
One last thought re: your comment on the stereotypical computer geek. In my experience the best computer professionals (programmers, sys-admins, whatever) are the ones who are the most "normal." I think the archetypal geek is attracted to computers because it's a solitary activity and because it's a cultural norm, but in my experience these tend to be the know-it-alls who really know nothing. In reality, people who are anti-social and can't communicate with non-techy people are often anti-social and can't communicate with techy people either.
zakimirza 04/08/2007 06:40
Great article. and great comment by mike on the stereotypical geek! ive seen a few and have had bad experiences with many evil-geniouses (hackers/crackers/etc).
Programs sometime do work the first go. If someone asks me what makes you so passionate about programming is maybe this very point. I like to code. i like to take the plunge and live on the edge. I like to convert my idea to code and when i compile it ..and it works, thats the feeling you cant reallly express. "Yess!" ... lol. And then when people come up to you with their code and your like "gosh...eww!" and then you start modifying it.... knowing what you are doing and then compile it and it works the way it should, thats the feeling!
I dont really accept the fact that either you can* program or you cant. ive seen a lot of students at universities who are great at everything. its just that they do give it time and mind and so it works. i also dont go with people's idea of "it just works". It works cuz its right. it works coz the creator knew what he wants to do and how. Lacking how to express your idea in a program is something that can be learnt, provided you have the enthusiasm to learn that.
great article again. ive linked back to it from my blog. :)
A Man 04/08/2007 12:58
I agree with the nameless commenter that this whole trend of programmers singing their own praises and pretending to be this special "class" of people is kinda creepy and starting to get old a bit.
Some people understand wood more than others, some people take to cooking better than the others. Most "programmers" are not in it for coding or hacking, they're in it to make money and have a job.
Most programming jobs are dreary, non-descript, dead-end maintain-some-otheridiotsavant's-code kind of jobs. Maybe this is a compensation mechanism for programmer types to kind of put a little lipstick on the the pig which is the existance of a programmer in this soul-less world of programming.
What I also find interesting is that Women are conspicously absent from this whole enterprise called "programming". This is an interesting fact when one considers that within the human species, it is the woman which has better command of language and linguistical concepts. Women, by virtue of their physical fragility have to be better social programmers than men.
Perhaps women have decided to leave the boys to play with their penis-surrogates -- all the stupid and un-necessary - and counterproductive - complexity -- ie their languages. Simply because the whole enterprise seems retarded and foolish to them. Men use complexity in their tools to cudgel each other with to win pointless arguments over which fiction-of-the-day (XP or TDD? huh? huh?) is better.
No wonder women don't bother with this silly business anymore. It is sad that more women are not taking part in computing in general, and it has something to do with the silly manner in which men go on and on about useless stuff like this. Even though the very first programmer was a woman (Ada Lovelace) and one of the most widely used languages (COBOL) was invented by a woman (Grace Hopper) who probably just got sick and tired of all these masochistic stunts being played by her male coworkers who walked around like little cockerels thinking "real men program by connecting wires from one panel to another panel"
Didn't mean to go off on a rant here, but please, programming is drudgery and instead of accepting that you have a problem stop going all Oprah on us and start telling us how great this mind numbing exercise called programming is.
In this day and age, simple things should be simple and hard algorithmic problems should be surmountable by people of ordinary intelligence. Why the heck are we still writing silly things like interface code and optimized loops?? the fact is that men have gotten back to the ogrish business of connecting wires between different panels like they used to in the ENIAC days, except that they do it in a text file and give it happy sounding names like Xtreme programming or Joy of this or some other silly business like that.
Most programming problems these days shouldn't be more than connecting well defined blackboxes together. with some logic/flow control inserted minimally. A program shouldn't be more than pseudocode (AT MOST). Anything more than that is just silly business of people who just can't seem to get out of the rut of torturing themselves and calling themselves "savants" to boot.
Bob 04/08/2007 19:13
// This is just a stub; flesh it out before v3.1.
void CareerChoice(bool analretentive, bool enjoyproblem_solving)
{
if (anal_retentive)
{
if (enjoyproblemsolving)
{ programmer(); }
else
{ accountant(); }
}
else
{ teacher(); }
}
kent 04/09/2007 09:21
I agree that it isn't a matter of intelligence, I have worked with people smarter than me who are at best mediocre programmers. And we aren't unique, I know people who can do with wood or finance what I do with code. I tell my students about something I think set programmers ( and nerds in other fields as well, I think) apart. It's the ability to handle large amounts of frustration. I've spent all day trying to fix some bug, trying variations on the code, looking things up, stepping through the debugger. Then I find that it was some simple mistake I made. Rather than throwing a hammer through the monitor, I just move on to the next problem and try not to make the same mistake again. I suspect the same characteristic is what makes good wood workers or financial experts. It's hard and frustrating but the rush when it works makes it worthwhile. Not everybody can deal with the delayed gratification. Throw in the endless amounts of seeming trivia and odd terminology and a lot of people head off for something easier. I'm trying to learn something about options trading to better understand what the company I work for is doing and I'm facing some of that pile of weird terms and strange ideas that face people when the start to learn to program.
**kent
Stephen 04/23/2007 17:39
Fred Brooks said that some programmers are at least seven times more productive than others. I know quite a few of these. Most are not the stereotypical slobs - those are the rare exception. Not all are totally addicted to it. Almost none of the really good ones are in it just for the money - at the very least, there's something else they could be doing. Some of these people are women. Women are underrepresented in science and engineering schools, and worse, many are discouraged from proceeding. Women who are good at this seem to be about as rare as men, but from a smaller pool. In my opinion, it isn't a language thing. It certainly isn't visualization - since many of these best people don't think visually. The really good ones sometimes aren't smart enough to know that they're really good! We're starting to run out of guesses here, which is why nailing it down is so hard. I've been at this since reading Fred's Mythical Man Month, which was in the early Triassic, i think. Fred, by the way, didn't know, and made no guesses. He didn't even suggest a way for people to recognize candidates. Perhaps he thought that was obvious. It isn't. But he did make noises about how to use them most effectively - which has been completely ignored in the industry, as near as i can tell. That, despite the 7x performance carrot.
My best guess is that you need this uncommon skill: which i call "trailing". For those who went to Boy Scouts, "Tracking" is the art of following clues left by someone or something else. "Trailing" is the art of leaving clues so that you can be followed. Note - the goal is that the person tracking you actually finds you. Trailing is not very common. Many extremely smart people can't do it. I find it astonishingly frustrating. Many people who you'd describe as empathetic can't do it. But when you write a program, you need to be able to guess what the computer is going to do with it. If you guess wrong, the program doesn't work. If you're really good at it, you don't need debugging skills, at least for your own code. And often not even for others code. If you're really good at it, you can look at the symptoms, and design a program that someone you know might have written that acts that way - look at the real code, "and this spot here is a bug".
By the way, i use the word "guess", or i could use the word "predict", but it doesn't cover what i mean. Think "predict", only more so. The computer won't just behave like so under "these conditions", but rather, the computer will do what i want in every possible case - not just the probable ones.
And it doesn't seem to be the same as being able to emulate the computer in your head. Single stepping a program takes longer than an instant, and gives you the answers to another set of questions altogether.
I'm not at all convinced that the skill can be taught (I've not seen any evidence that it can). The attempts i've seen could all be characterized as someone saying "this is what I want you to do", and then testing to see if you can do it. It's really sad. Because you get students who either can do it already - in which case they didn't need your course, or students who can't, in which case there was no benefit for them to take your course.
So, someone described to me how the Apollo terminal driver was designed. I figured out the kind of person who would do it that way, what program (s)he would write, and in just seconds said, "then i bet it won't handle space, 'x' space, 'control-y', tab, backspace and put the cursor in the right spot." And it didn't. I'd just gotten comfortable with how the Berkeley Unix tty driver worked, and damned if doesn't do it right every time. It's designed to do it right. And the easy way to do that is to work out where you should be from the start of the line every time you need to know, using the same code that actually does it.
And, then, there's attention to detail, and a bunch of other things that i think can be easily learned. And not all the really good programmers know all this stuff. That's where Fred's idea for how to help them along comes in. He had people with math or language skills doing those sorts of things around the edges.
Now, going on to work for NASA as an engineer is sales. I've met some of those. It is unfortunate, but being a really good programmer does not require sales skills. However, getting through an interview does. For example, long ago, I got one of my really-really-really good programmer buddies an interview. Some time later, i asked my boss what he thought. He said that he wasn't what he'd hoped for, and turned him down. I replied that this was a monumental mistake, and left it at that. A few weeks later, my friend was on the job, and he turned out to be the 2nd longest termed employee - outliving the president and company. Yes, the really longest termed employee has real sales skills, outliving the company by two years (no - that wouldn't be me).
Trailing. Maybe there's a gene for it.