A there is a paper written at the School of Computing at Middlesex University in the UK that addresses the issue of programming aptitude. The authors of this paper (Dehnadi and Bornat) have devised a test that they claim can separate out who may learn to program well and who will not. This fits well with my earlier observation that: "Anyone can program, only some people will learn to program well."
The working title "The camel has two humps" refers to a phenomenon that even I have noticed when teaching programming. One group will do well, and the other will do poorly, each group will have their own bell producing a two humped grade curve. The break through for this paper is creating a test that separates out who is part of which group. You can then reliably plot two independent bell curves based on results.
The differentiating factor between our two populations of programmers? Mental models.
The tests devised by Dehnadi and Bornat determine who is creating mental models and using them. It turns out that it is not nearly so important that the student use a correct mental model as that they know how to create and use a mental model at all. So I have to ask, how does one learn to use mental models? Why do some people use them well and others do not?