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?

  • 63
    Sounds like a good skeptics question. Sep 4, 2012 at 16:27
  • 10
    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, 2012 at 16:28
  • 10
    @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. Sep 4, 2012 at 16:33
  • 37
    The adage is proven true every day on Programmers <sigh>
    – yannis
    Sep 4, 2012 at 17:11
  • 15
    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. Sep 5, 2012 at 3:33

9 Answers 9


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.


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.

Despite the enormous changes which have taken place since electronic computing was invented in the 1950s, some things remain stubbornly the same. In particular, most people can't learn to program: between 30% and 60% of every university computer science department's intake fail the first programming course.

Experienced teachers are weary but never oblivious of this fact; brighteyed beginners who believe that the old ones must have been doing it wrong learn the truth from bitter experience; and so it has been for almost two generations, ever since the subject began in the 1960s.

  • 47
    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! Sep 4, 2012 at 17:39
  • 15
    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, 2012 at 17:40
  • 26
    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. Sep 4, 2012 at 18:26
  • 18
    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, 2012 at 12:36
  • 6
    Prof. Bornat later bothered to voluntarily retract that draft, because he mental health issues at the time. eis.mdx.ac.uk/staffpages/r_bornat/papers/… Moreover, my reading of Sec. 3 is that others failed to replicate the result—as they say, even 2009's metaanalysis conclusion "is affected at least by cultural environment and educational practices". Overall, my best guess is that the course was bad, which isn't surprising since "how to teach programming effectively" is a research problem. Mar 15, 2015 at 0:04

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.

  • 10
    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, 2012 at 19:33
  • 5
    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, 2012 at 19:43
  • 3
    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
    Sep 4, 2012 at 19:51
  • 4
    @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, 2012 at 6:10
  • 4
    @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, 2012 at 6:17

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.

  • 5
    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. Sep 5, 2012 at 3:46
  • 6
    @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. Sep 5, 2012 at 11:51
  • 2
    @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. Sep 5, 2012 at 11:54
  • 1
    @MikeDunlavey Students always have friends who can program and homework can be easily cheated.
    – Sulthan
    Sep 15, 2012 at 0:43
  • 2
    @Sulthan: Not in my class they didn't. Some tried. Some tried copying from others on a test. It was obvious - the code was too much like someone else's, and at the same time contained obvious mistakes. For projects, no two were alike, and nothing raises a red flag like somebody who does mediocre work on quizzes and homework but turns in a beautiful project. I just make up another test and give it to them. If they clearly don't know which way is up, I'm under no obligation to give them a good grade. Alternatively, I can call in another professor. Sep 15, 2012 at 15:36

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

The tests were similar to what you see on IQ tests (what's 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 PowerPoint shows and very few good programmers.

  • 1
    + I am so thankful that I have never (almost) had to go through HR. Sep 5, 2012 at 14:10

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.


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 don't 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 hand, 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 language...).

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. He seems to think there is no born programmer.

  • 3
    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
    Sep 4, 2012 at 20:15
  • sorry i messed up with the "send" button... I hope this makes more sense
    – Yves
    Sep 4, 2012 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. Sep 5, 2012 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, 2012 at 10:01

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.

  • I see many people who do not correctly lead a dog on a leash. I used to be able to walk my dogs without a leash, even in town. I always wondered why people do not make the dog mind.
    – user251748
    Mar 20, 2017 at 18:28

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.)

Not the answer you're looking for? Browse other questions tagged or ask your own question.