Fair warning: I’m writing about this question with my “ordinary guy” hat, not my “psychology writer” hat. Over at Macrumors they’re talking about whether just anyone can program a computer, or if it takes a special kind of mind to do it. The first poster has struggled his whole life with programming, and still doesn’t believe himself to be successful at it. He just can’t “get it.”
I’ve dabbled in programming over the years, all the way back to the days when I developed a primitive drawing program for my Commodore 64. I figured out a way to move a tiny dot around the screen with the cursor arrows, and then draw a line to it when the user pressed the “enter” key. It was a simple program, fairly easy to write, and glacially slow. It took hours to draw a recognizable picture of anything, and I typically got bored after making a triangle or two. On the one hand, if I hadn’t had some aptitude, I wouldn’t have ever written the program, but I don’t think this shows I’ve “got what it takes” to be a programmer. A real programmer would have kept coming back to that program, improving it. If I was a real programmer, I would have added a feature to change colors, or to draw different shapes, or to save the drawings I created.
Some of the responses to the initial question on MacRumors were clearly written by programmers. They’re easy to spot, because they go something like this: “sure, anyone can program, all they have to do is break the problem down into five simple steps. Once you master those, the rest is easy.” Or “C++++ is easy once you realize that every argument (except integral functions) must be enclosed with curly brackets, and don’t forget to write inequalities using the tilde and the double-backslash key.” The non-programmers write “No, no way. It’s got to be in the blood.”
I’d like to believe that if I absolutely needed to, I could learn to program a computer well (I’m talking serious programming, not dabbling in HTML or CSS). After all, I love computers. I love the Internet, and I love the power computers give me to do things like write, or edit photos, or make books. What I absolutely hate is when computers stop working (see my Aaaaaaaaaagh post from last week). If I was born to be a computer programmer, these moments when computers stop working correctly would be the good times: after all, they offer a chance to solve a problem, and that’s what any good programmer loves.
So am I saying that programming ability is innate? I don’t think so. But if you’re not particularly good at it, or if you don’t particularly like it, then why try to make a career out of it? Let someone else pull their hair out trying to figure out why their latest app keeps returning a “divided by zero” error.
Innate? Well, I think that depends on what you mean by “innate.” I think coding requires a logical approach, if not a logical mind. It requires that a problem be broken down into a series of steps, and those steps have to be followed in order. It’s either a useful lesson in solving problems in other areas, or it’s the result of an ability to approach problem solving logically. I’m not sure which comes first, and I’m not sure that everyone can do it. I am sure that a whole lot of people who write code shouldn’t be doing it. I am not a programmer, but, as a scientist, I have to write code. I make darn sure I comment, because I have enough trouble remembering why I did what I did two years ago even with the comments; I would be lost without them.
The commenting thing is an interesting one, because (again speaking with my ordinary guy hat) programmers tend to be “anti-writing.” So, ironically, the most die-hard programmers are the least likely to want to comment. They have to force themselves to, because they know it’s “good coding.” Or they’ll take an even more die-hard attitude and suggest that “good code doesn’t need comments.”
Re: use of “innate.” Remember, I’m writing as an ordinary guy here. There sure seem to be some people who really love all aspects of programming. There are others who do it because they have to, and still others who wish they could do it. The category I understand least is the last one. Maybe the existence of this last category is argument enough to suggest that coding ability is innate.