I’ve touched on this topic before, but I’m curious about whether great programmers are born (ie, their brains are hardwired for programming) or made (anyone can learn). Today, I read a research paper called ‘The camel has two humps’ (PDF), by Saeed Dehnadi and Richard Bornat at Middlesex University. The paper’s a few years old now and is labelled as a draft with a working title, but I can’t find any later version. The data in it does appear to be complete, though, and it’s well worth a read.
The researchers set students simple questions about programming to try to work out what kind of mental model they used when shown unfamiliar programming problems. The conclusion of the research is that the good programmers turned out to be those who had a consistent mental model and were able to ascribe consistent meaning to the code they saw. Those who used inconsistent mental models found it much harder to learn to program. The difference is marked: 52% of course participants failed, but out of those with a consistent mental model, only 22% failed. The study was conducted among groups of students on the same introductory programming courses, so it’s reasonable to assume that a key factor for success is whether or not the students were able to think in a programming-friendly way, and maintain consistent mental models.
The paper identifies three main semantic hurdles that trip up new programmers: assignment and sequence, recursion and iteration, and concurrency. Of course, few programmers reach the concurrency hurdle, but it’s surprising how many are tripped up by the concept of assignment. The paper suggests that teachers have long accepted that there will always be students who just can’t understand programming, no matter how they are taught.
What do you think? Can anyone learn to program, or do you need a particular aptitude?