Take the 2-minute tour ×

An old adage that many programmers stick to is "It takes a certain type of mind to learn programming, and not everyone can do it."

Now I'm sure that we all have our own trove of anecdotal evidence, but has this been studied scientifically?

share|improve this question
Sounds like a good skeptics question. –  hydroparadise Sep 4 '12 at 16:27
Learning how to program is very different from actually being able to be a valuable programmer. Programming is very simple for the most part. Read spec, implement accordingly. Test. Repeat. Yes, everyone can be a programmer. Not everyone can be a valuable programmer. Especially certain tasks require much more thinking and experimentation than others. Such things are best left for people who actually enjoy doing it. An example could be implementing low-level constructs, counting clock cycles, bits and bytes without any modern programmig tools or anything. Not everyone can handle that. –  zxcdw Sep 4 '12 at 16:28
@zxcdw - I'm not really questioning "Not everyone can be a good/valuable programmer". That's a given since "Not everyone can be a good/valuable X" is a universal truth for almost any value of X as a vocation. What I'm questioning is the ability to learn programming and wrap their head around it for the common person. –  System Down Sep 4 '12 at 16:33
The adage is proven true every day on Programmers <sigh> –  Yannis Rizos Sep 4 '12 at 17:11
I think the spirit of this question isn't about quality of programmers, I think it's more about "can everyone be trained to take a problem and outline a logically correct solution in a non-human language", which I sometimes think isn't something everyone can do. The concepts of designing logic to dictate the non-substance based behaviors of a non-human machine are extremely abstract, this level of abstraction requires one to be able to follow a lot of logical indirections mentally because you can't touch the products of each step with your hands. –  Jimmy Hoffa Sep 5 '12 at 3:33
show 14 more comments


10 Answers

up vote 71 down vote accepted

Another study, Investigating the viability of mental models held by novice programmers:

This paper describes an investigation into the viability of mental models used by novice programmers at the end of a first year Java programming course. The qualitative findings identify the range of mental models of value and reference assignment held by the participants. The quantitative analysis reveals that approximately one third of students held non-viable mental models of value assignment and only 17% of students held a viable mental model of reference assignment. Further, in terms of a comparison between the participants' mental models and their performance in in-course assessments and final examination, it was found that students with viable mental models performed significantly better than those with non-viable models. These findings are used to propose a more "constructivist" approach to teaching programming based on the integration of "cognitive conflict" and program visualisation.

Also, see later research from the same authors of the Sheep vs Goats study (which was never actually published, to be clear). Their last and most recent study on this topic from 2009 is Meta-analysis of the effect of consistency on success in early learning of programming (pdf).

A test was designed that apparently examined a student's knowledge of assignment and sequence before a first course in programming but in fact was designed to capture their reasoning strategies. An experiment found two distinct populations of students: one could build and consistently apply a mental model of program execution; the other appeared either unable to build a model or to apply one consistently. The first group performed very much better in their end-of-course examination than the second in terms of success or failure. The test does not very accurately predict levels of performance, but by combining the result of six replications of the experiment, five in UK and one in Australia, we show that consistency does have a strong effect on success in early learning to program -- but background programming experience, on the other hand, has little or no effect.

share|improve this answer
"...first year Java programming course..." <- I found your problem. –  Jon Galloway Sep 25 '12 at 4:34
add comment

Yes, there's a pretty famous paper online designed to more or less determine "Who is cut out to be a programmer."

A cognitive study of early learning of programming - Prof Richard Bornat, Dr. Ray Adams

All teachers of programming find that their results display a 'double hump'. It is as if there are two populations: those who can [program], and those who cannot [program], each with its own independent bell curve.

Almost all research into programming teaching and learning have concentrated on teaching: change the language, change the application area, use an IDE and work on motivation. None of it works, and the double hump persists.

We have a test which picks out the population that can program, before the course begins. We can pick apart the double hump. You probably don't believe this, but you will after you hear the talk. We don't know exactly how/why it works, but we have some good theories.

Here's a blog post by Jeff Atwood that interprets the results and puts some things into context.



share|improve this answer
To be fair - that study proves that 30-60% of a schools intake can't be bothered doing any work. That has been true across all subjects and all time! –  Martin Beckett Sep 4 '12 at 17:39
This is a very interesting paper, and it does support the idea that not everyone is cut out to program. Unfortunately the authors' later work (also on the linked page) shows that their test is less predictive than initially thought. "We cannot claim to be separating the programming goats from the non-programming sheep ... It is unfortunate that the outcome does not live up to the initial promise, but it has not quite closed the door on our explorations." –  AShelly Sep 4 '12 at 17:40
To be clear that first paper from 2006 was only a draft and was never published. So it isn't exactly scientifically reviewed. Maybe better to look at the later studies on the author's page. –  Jeff Atwood Sep 4 '12 at 18:26
I was a Teacher's Assistant in introduction courses for 3 years, and I have to agree that the phenomenon does at least exist, even if it's not so easy to identify them immediately: There are people who are just incapable of learning how to program. One student in particular took the same introduction course 2 or 3 times and still couldn't quite wrap his head around the concept that the lines of code happen in order... –  Izkata Sep 4 '12 at 19:10
Investigating success in an academic course is a weird way to study the phenomenon. First, lectures are probably the least suitable way to teach programming. Second, not everybody learns (well) from lectures. That's too much bias by design for me there. –  Raphael Sep 5 '12 at 12:36
show 1 more comment

Anyone can be a programmer. Consider how easily people grasp spreadsheets. Consider how readily Alan Kay introduces children to programming by means of experiment and exploration in a programmable environment.

People may study success in college-level courses and conclude "some people aren't fit to learn programming". However, such a conclusion severely oversteps the bounds of the observed evidence. How much failure could instead be attributed to how the programming is taught (too abstract?), or which style of programming is taught (too imperative?), or the programming environment (compilation, no immediate feedback?).

It is well understood that people grasp abstractions most readily after they've already worked with multiple concrete instances - i.e. that we cannot learn something until we almost already know it. Starting with the abstract, therefore, is an entirely foolish way to teach programming. Many people who stumble over premisconceived "mental models" would thrive if taught in a more concrete environment with real-time feedback (e.g. as in the Kahn Academy for CS) then encouraged to climb the ladder of abstraction when they are ready for it. Learnable Programming is a recent essay by Bret Victor draws attention to unnecessary environmental challenges programmers face in learning.

In some cases, it is the students that fail their classes. Intellectual laziness and willful ignorance will exist in any large group of humans. Smart folk are no exception, as anyone who has argued with a brilliant crank can attest. But, especially for programming and maths, it is often the classes that are failing the students.

share|improve this answer
I think that just about anyone can learn rudimentary coding just like they can learn basic music. However, making a living from it is a different matter. For example, I love to play guitar but I'm not going to be going on a multi-city stadium tour or appearing on a major studio album anytime soon. –  jfrankcarr Sep 4 '12 at 19:33
Take a look at the paper linked in Serg's answer. Even if it's not as clear as they'd initially thought, the truth is that some people just can't wrap their head around the most basic programming concepts, even after a month or two of classes - for example: x = 1; y = x; and the question is "What are the values of x and y?" –  Izkata Sep 4 '12 at 19:43
Hello and welcome! You probably don't know this, since you are very new, but we really don't like open ended and/or discussion-y questions. I've removed the Is it true that not everyone can learn how to program? line from the question, our more experienced members ignored it, realizing that it didn't fit our guidelines, and concentrated their answers on the research / scientific aspects of the question. Could you please do the same? –  Yannis Rizos Sep 4 '12 at 19:51
@jfrankcarr - Any skill, at a professional or competitive level, will leave many practitioners behind. Most people cannot speak or write even natural language professionally. –  dmbarbour Sep 5 '12 at 6:10
@Izkata - The paper Serg linked is of dubious scientific value; similar results would be achieved from any poorly taught class: people who already understood the subject did well. And regarding your example question: more common were questions that assumed imperative semantics, which are certainly not intuitive. Could you even answer your own question if you could not assume the absence of concurrency? –  dmbarbour Sep 5 '12 at 6:17
show 6 more comments

Maybe this is anecdotal, but when I taught intro programming to a few hundred liberal arts students, I found no such "double hump". It seemed to me they were all quite capable, though some worked harder than others, and a very few tried to bluff their way through.

A lot has to do with how it is taught.

A lot also has to do with desire - some don't find programming the least bit interesting. But even so, they can learn it if they give it an honest effort.

share|improve this answer
I often wonder where desire plays into this, we all know how totally uninteresting programming is to the vast majority of the general populace, makes me wonder how many people try going cs for money but having the average persons complete lack of interest in the way a computer works. –  Jimmy Hoffa Sep 5 '12 at 3:46
"...were all quite capable..." - how did you measure that? Could all of them answer basic programming questions in test? –  Den Sep 5 '12 at 8:13
@Jimmy: I tried to make it interesting by getting them going on personal projects about games, science, finance, music, whatever appealed to them. Programming is much more interesting when it's a means to an end. –  Mike Dunlavey Sep 5 '12 at 11:51
@Den: Well, they had to do small programs for homework, they had quizzes and tests, and they each had to do a significant personal programming project, all of which I graded. The course was required. –  Mike Dunlavey Sep 5 '12 at 11:54
@MikeDunlavey Students always have friends who can program and homework can be easily cheated. –  Sulthan Sep 15 '12 at 0:43
show 1 more comment

One can make studies about abstraction capacities, or other useful knowledge, but the definition of programming is unclear, and I think the quote is irrelevant, because there are opposite ways to look at programming :

The first kind : Programming languages are (or should be) some kind of human language made to describe a task for the computer to execute, so everyone who talks should be able to program. It's called scripting, BASIC, the typesetting system TeX, etc... the language or the system doesn't matter, it's the way their creators and people looked at it : "dear program/computer, please print my name", rather than "get me space the size of eleven chars, then give me the adress of this space, then let me store it, then enter eleven characters into this memory which you can take out of my keyboard buffer (but dont forget to clean it, etc.."

In this case it's clear that the study would rather be "Not every language can be assimilated quickly ?".

On the other side, programming languages are just a way to describe how a computer works or how it should work, how it should be 'connected' if you think of 1950s computers. Therefore the programmer can't do anything, even if he 'speaks' the programming language perfectly, if his/her intelligence can't reach this abstraction level where you see bytes beeing stored in memory, strings as pointers etc, and then go back to earth to link it to the problem. Therefore not every human can program (in Assembly...).

Apart from this you will need all qualities required to work and produce something : know very well what you want, make it easy for others to understand/complete/review, focus on your objectives, etc... but just like an architect, a writer, a musician, a prostit..aehh prothesist, etc.

But most Humans have good abstractions capacities, especially children. Some German schools are teaching Haskell to pre-teens (programming languages like pascal or Delphi are beeing taught in every german school).

So I would say the question is very hard to answer, and any answer (or study) is likely to be irrelevant.

You will find a very brief analysis of how people learn programming in the article "Teach Yourself Programming in Ten Years" by Peter Norvig http://www.norvig.com/21-days.html. He seems to think there is no born programmer.

share|improve this answer
Hello and welcome! I'm a bit confused on how your answer answers the question, which is really about whether this has been studied or not... –  Yannis Rizos Sep 4 '12 at 20:15
sorry i messed up with the "send" button... I hope this makes more sense –  Yves Sep 4 '12 at 20:52
You're on the right track but you tie programming languages with hardware (computers) to tightly. Programming is not exclusively the ability to talk to the computer. Programming is about describing a process in a consistent way. Describing a process to other human is similar to coding it in a high level programming language. The biggest difference is that humans are more tolerant to ambiguity. –  Emperor Orionii Sep 5 '12 at 13:24
I don't defend this point of view, but tried to point out the fact that people tend to see programming languages and the use that should be made of them either as tasks descriptions (which is important for high level programming and scripting), or as "computer process" descriptions (eg low-level languages seem closer to the VHDL modelling language than to VB.NET, even if they're programming languages). These 2 approaches are very different and yet 2 sides of the same coin. They insist on different aspects of the human intelligence, which are difficult to quantify. So it's hard to study them. –  Yves Sep 6 '12 at 10:01
add comment

When I started out it was common to sit an "aptitude test" before you got a programming job. There were not so many CS graduates so it was common to recruit fro other disciplines.

The tests were similar to what you see on IQ tests (whats the next number in the sequence etc.).

The anecdotal evidence was that while not everyone who passed the test became a good programmer, no-one who failed the test but was hired for other reasons ever became a good programmer.

Sadly HR drones did not understand these tests (and failed when they took them!) so recruitment these days depends on things HR drones understand -- good college, communication and suit wearing skills.

This is pretty much the reason large IT departments have lots of people who are great at power point shows and very few good programmers.

share|improve this answer
+ I am so thankful that I have never (almost) had to go through HR. –  Mike Dunlavey Sep 5 '12 at 14:10
add comment

To those citing Dehnadi and Bornat's double-hump or goats-vs-sheep study, it's worthwhile to check out Mental Models and Programming Aptitude by Caspersen et al (2007) in which they attempt to replicate it:

Predicting the success of students participating in introductory programming courses has been an active research area for more than 25 years. Until recently, no variables or tests have had any significant predictive power. However, Dehnadi and Bornat claim to have found a simple test for programming aptitude to cleanly separate programming sheep from non-programming goats. We briefly present their theory and test instrument.

We have repeated their test in our local context in order to verify and perhaps generalise their findings, but we could not show that the test predicts students' success in our introductory program-ming course.

Based on this failure of the test instrument, we discuss various explanations for our differing results and suggest a research method from which it may be possible to generalise local results in this area. Furthermore, we discuss and criticize Dehnadi and Bornat's programming aptitude test and devise alternative test instruments.

share|improve this answer
add comment

Many years ago I did several courses that included military leadership theory. Part of the theory was that there exists a leadership continuum, from those who are natural leaders to those who couldn't lead a dog on a leash. The idea was that people were distributed on this leadership continuum in a bell curve, with most people being somewhere between the two extremes. Apart from the few at the far extreme "couldn't lead a dog" end almost everyone could be taught the art of leadership. The amount of effort required to turn someone into a leader depended on where they sat on the continuum.

I suspect programming has a similar continuum and a similar distribution. There'll be those that just get it effortlessly, and those that could never get it if their lives depended on it. But they're the few at the tail of the bell curve. Most people sit between those extremes on the continuum. They can learn to program but the effort required to teach them will depend on where on the continuum they sit.

share|improve this answer
add comment

I'm not sure it's just programming. I saw the same sort of phenomenon with people simply learning to use computers. Back in college I was a lab assistant in a lab that hosted a computer literacy for seniors class.

Within two weeks I could identify those who would get it and those who wouldn't with basically 100% accuracy. You either accepted that this is the way the computer works or you beat your head against it for the whole class. There was no middle ground. (The fact that it was a seniors class meant we had a lot of head-beaters which made the pattern much more obvious.)

share|improve this answer
add comment

Programs are mostly gibberish. Therefore, whoever would be a good programmer has to have a high tolerance and retention for gibberish, and the willingness and ability to perceive patterns in it and its substructures. Nobody has said anything about Larry Wall, the inventor of PERL. He is known to have said that good programmers are lazy, impatient and proud. Maybe the reason the issue has never been formally studied is that the task first has to be attractive to a good programmer.

share|improve this answer
Thanks for providing your first answer on Programmers Stack Exchange. Be sure you are focused on recommended criteria for answers programmers.stackexchange.com/questions/how-to-answer and be careful about opinions, but please do repeat the reasoning behind recommendations from recognized authorities. –  DeveloperDon Sep 8 '12 at 8:26
A Wild Troll Appeared! –  Rafael Sep 18 '12 at 15:36
add comment

Your Answer


