There is an interesting (if old) post on Proper Fixation about Why Programming isn’t for Everyone. In a nutshell:
The main reason is that development leads to maintenance, and maintenance leads to suffering.
Programming isn’t for everyone because it is not fun to maintain what was fun to program.
Aaaannnd … of course this is right, but it isn’t specific to programming. Commitment to anything means doing lots of drudge work. There are few, if any, professions – even artisinal professions like programming – that don’t have this kind of barrier. It’s like how Eddie Van Halen got to be Eddie Van Halen by staying in his room and practicing for 8 hours on end while his brother went out and partied. According to legend, anyway – but you know, something like the legend has to be true, because talent and interest alone won’t carry you. Learning a riff on the guitar is fun for everyone. Repeating it until it sounds awesome is even fun for everyone. Putting in the time it takes to do that flawlessly on stage every time is the part that’s “not for everyone.” Just like maintenance with programming.
A more meaningful answer to the question would try to get at what it is about some people that allows them to hold their interest in programming even through mundane maintenance tasks. Or through hours of scales and arppegios on the guitar. Et cetera.
My personal stab: programming isn’t for everyone because not everyone is a problem solver. I’ve noticed a stark difference in the reaction of my programmer and non-programer friends when errors and bugs crop up. My friends who program only because their job requires it (since I’m nominally still an academic, I have lots of such friends – they program for research purposes) get instantly and counterproductively exasperated when bugs crop up. The idea that a misplaced semicolon somewhere is holding up their research drives them nuts. Other friends who enjoy programming over and above having to do it for work respond with a kind of zen detachment. It’s more like “hmm, wonder why that didn’t work? Let’s open it up and see!” I’m not sure I have the right word for this trait, but “tinkerer” comes close. It’s the same sort of thing that drives hobbyist mechanics. There was a guy next door growing up who had an old Austin Healey that he was endlessly working on in his garage. A casual observer would think that he bought the thing in extremely poor repair hoping to fix it up and get a nice status symbol on the cheap. But after you knew him for a while, it became abundantly clear that he really just liked messing with it. Austin Healey was the perfect brand NOT so much because “classic cars” are good status symbols, but because “classic cars” are impossible to completely repair. There would always be something wrong with the thing, and that’s just how he liked it.
If I’m honest with myself, there are only two things about maintaining a program that are annoying to me: time pressure and opportunity cost. As for the first, it isn’t so much the having to go in and upgrade things, or the tracking down and fixing of bugs, that’s irritating. It’s having to do this sort of stuff on a schedule – and that because maintenance schedules tend to be a lot less forgiving that development schedules. More often than not, maintenance is something that got put off until the last minute, and now you’re in serious danger of losing customers if it doesn’t get done soon. Some people probably really get off on that, but most of “us” don’t, I think. We like to bask in the glow of our successes, and maintaining on a schedule doesn’t scratch that itch. As for the second, we resent maintenance not because it’s uninteresting, but because there are other, more interesting programming tasks we could be working on. Maintenance, in other words, is just like regular programming, but with dampened reward and enhanced pain functions.
So, I guess my point is that fingering “maintenance” as the thing that separates real programmers from people who would like to be good at programming is right, but misleading. Really, whether or not you’re willing/able to maintain programs you’ve written is a proxy for whether you enjoy the process of programming in the first place. If you enjoy programming in general, then you also enjoy maintenance, it’s just that you enjoy it a little bit less than writing code from scratch. If you don’t enjoy programming – which is to say, you enjoy the results of programming but not the process itself – then you double don’t enjoy maintenance. Just like my neighbor doesn’t mind the fact that his Austin Healey was a money pit because he kinda just likes tinkering with it. Just like Eddie Van Halen is where he is because he likes playing the guitar enough that he actually enjoys practicing scales and arppegios too.
What it comes down to is whether you really enjoy looking at this thing that’s ruthlessly logical and trying to figure out what details you’ve overlooked. Most people don’t. Most people don’t like logic puzzles – for the same reason that most people don’t like math. Most people don’t like operationalizing things, and they sure as HELL don’t like things they can’t fudge. Those of us who do like operationalizing things and who do like logic puzzles and who do like things they can’t argue with or fudge also like programming.
And in that sense, I think the answer in this post is dead wrong. If programming languages worked in such a way that you could just talk to the computer and tell it what you wanted – like on Star Trek – then programming would be something for everyone – but it would also be something that’s quite different from what we currently call programming. It would be “programming” only in the broadest possible sense of the term – in the sense of giving something instructions and having it carry those instructions out. It be a category that included drill sergents and dog owners and any number of other things we don’t typically associate with programming today. If the question you’re asking is “would ‘programming’ be for everyone if ‘programming’ meant something really different from what it means now?” then you’re not asking a very interesting question. The interesting question is what it is about programming that makes it unpalatable to people now? I don’t have a very clear answer – but I think if you said “whatever makes them hate math and engineering,” it would be good enough.