186

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?

Ixrec
  • 27,621
  • 15
  • 80
  • 87
System Down
  • 4,743
  • 3
  • 24
  • 35
  • 63
    Sounds like a good skeptics question. – Chad Harrison Sep 04 '12 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 04 '12 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. – System Down Sep 04 '12 at 16:33
  • 3
    @SystemDown I find the claim that people *can't* learn programming very absurd. I'd rather take the stance that many people simply aren't *interested* in typing symbols and "solving problems"(which are imaginary to them, as the problems don't concretely "*exist*"). Just as some people aren't interested in selling cars or working in marketing industry even if it'd pay much more. As such, I'd personally see it as that people *won't* learn programming, they simply don't have the right kind of mindset(which they could learn to some extent tho). That doesn't mean they *couldn't* learn it though. – zxcdw Sep 04 '12 at 16:46
  • 1
    @zxcdw - Well that's the premise of the question isn't it? – System Down Sep 04 '12 at 17:01
  • 37
    The adage is proven true every day on Programmers – yannis Sep 04 '12 at 17:11
  • 5
    as comment because it's anecdotal: I've seen a lot of students who easily managed the classes, but once they were in the workplace culdn't really cope with coding on a daily basis. They had the capacities but just didn't get the joy out of it. To be successful in this kind of work you actually have to love programming. – Pieter B Sep 04 '12 at 17:44
  • 1
    Not everyone *should* be a programmer. That's what's important. BRB using cursors in SQL instead of subqueries for no reason – Ben Brocka Sep 04 '12 at 18:55
  • I wouldn't consider myself a programmer if I cannot teach a random person programming in 24 hours. – Nick Dandoulakis Sep 04 '12 at 20:47
  • There are about 1 to 3 % smart people in every society. Can't change that, no matter what. – Lukasz Madon Sep 05 '12 at 02:19
  • 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. – Jimmy Hoffa Sep 05 '12 at 03:33
  • 3
    Isn't this true of just about any job that requires skills? – JohnL Sep 05 '12 at 12:22
  • 1
    There certainly are more programming jobs than programmers. People outside of computer science are still funneled in to programming jobs, people with little real interest or passion in anything but making a career. I can see how there would be the impression that certain people can never grasp programming given the percentage of "real" programmers currently in the workspace. A question I would ask is what percentage of the general population actually wants to be a programmer. We can move on from there. – demongolem Sep 05 '12 at 21:07
  • In the late 90s I worked for a company that offered programmer training to meet the needs of fixing the Y2K bug. The company offered to double the salary immediately of those passing the training. 60 percent dropped out. Not scientific but seems to match some of the numbers here. – deleted_user Sep 05 '12 at 07:39
  • 2
    My humble opinion is that we must attack the CS education *first*, and then re-measure. At the moment, there are too many variables to judge properly. Still however, I believe a big part of the problem is the education itself. – dimitarvp Sep 16 '12 at 12:09
  • 2
    Many studies have shown over the years that given the right level of training, encouragement and willingness to learn, people can learn to play a musical instrument; become fluent in a foreign language; understand advanced physics; learn to pilot a fighter jet. Of course, in reality only a minority ever succeed, and the particular reasons for failure will often be unique to any individual. Personally I think a more compelling question is that of how to improve education for CS/Programming so that more students become interested/motivated and actually have the support/teaching to succeed. – Ben Cottrell Sep 16 '12 at 15:49
  • 1
    Not everyone can be smart, but everyone can be stupid. Not everyone can write good software, but everyone can learn computer programming. – Reactgular May 23 '13 at 20:02
  • Comment on Jeff Atwood's post: "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" I'm not sure that gels, statistically speaking. Just because you can replicate an experiment X number of times doesn't mean conclusions becomes stronger. – Mike Trelinski May 23 '13 at 19:56
  • You can still be valuable to a company, if a simple CRUD app is all you can do **AND** that simple CRUD app brings in more money for the company than your salary cost is. – Juha Untinen Aug 23 '13 at 09:01
  • 1
    Think of it this way. Basketball is easy enough for everyone to learn. But very few can become NBA players. The same applies to programming. Everyone can learn how to program, but very few can become good programmers. As with any skill it takes practice, and practice takes dedication. In programming is worse, as is an evolving target. So if you stop, you cease to be a good programmer, very quick. – rxantos Jun 12 '14 at 02:22
  • Basketball is easy to learn, but as the famous coach said, "You can't teach height." –  Mar 20 '17 at 18:16

9 Answers9

93

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.

sergserg
  • 1,882
  • 1
  • 11
  • 17
  • 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! – Martin Beckett Sep 04 '12 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 04 '12 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](http://www.eis.mdx.ac.uk/research/PhDArea/saeed/). – Jeff Atwood Sep 04 '12 at 18:26
  • 4
    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 04 '12 at 19:10
  • My university lecturer on introductory quantum physics said the same thing was true when marking those papers: a double hump curve – MarkJ Sep 04 '12 at 19:37
  • 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 05 '12 at 12:36
  • 1
    The test given in [your link](http://blog.codinghorror.com/separating-programming-sheep-from-non-programming-goats/) is not entirely correct. It's about reasoning about assignment operations, but there are languages which don't have such operations: what about programming in Haskell? Or programming in Scheme in functional style? (like in the first chapters of the SICP book) Maybe these people can program in such languages easily. – Display Name Aug 13 '14 at 08:45
  • 6
    Prof. Bornat later bothered to voluntarily retract that draft, because he mental health issues at the time. http://www.eis.mdx.ac.uk/staffpages/r_bornat/papers/camel_hump_retraction.pdf 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. – Blaisorblade Mar 15 '15 at 00:04
88

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.

Jeff Atwood
  • 6,757
  • 10
  • 45
  • 49
  • 24
    "...first year Java programming course..." <- I found your problem. – Jon Galloway Sep 25 '12 at 04:34
  • 5
    Bornat, beyond retracting the original paper, discusses attempts to reproduce the 2009 result—to me, they don't seem encouraging: http://www.eis.mdx.ac.uk/staffpages/r_bornat/papers/camel_hump_retraction.pdf – Blaisorblade Mar 15 '15 at 00:06
  • 8
    As mentioned above, the original paper on this was retracted: http://retractionwatch.com/2014/07/18/the-camel-doesnt-have-two-humps-programming-aptitude-test-canned-for-overzealous-conclusion/ – Spongeboy Dec 21 '15 at 05:28
33

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.

dmbarbour
  • 485
  • 3
  • 6
  • 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 04 '12 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 04 '12 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 04 '12 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 05 '12 at 06: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 05 '12 at 06:17
  • 2
    @YannisRizos - It is not clear to me what you want me to remove from my answer. But I can only caution that most studies of this subject involve people finding the answers they want to see, rather than answers the evidence can reach. – dmbarbour Sep 05 '12 at 06:19
  • @dmbarbour I don't want you to remove anything from your answer, that's completely up to you. I was just letting you know that I've removed the softer part of the question and it seems to me that it was the part you concentrated your answer on and now it seems like you are answering a question that was never asked ;) – yannis Sep 05 '12 at 06:22
  • 1
    @dmbarbour Read the paper more closely. They weren't seeing whether or not questions like my example were answered correctly, they were asking multiple similar ones, and seeing if the students were able to come up with a mental model and apply it consistently, even if that model was wrong. If all of such questions ended up with "x = 1 and y is unknown", that student would fall in the "able to program" group, while if some were answered like that and others as "x and y both = 1", their model is inconsistent - that student would fall in the "unable to program" group. – Izkata Sep 14 '12 at 18:04
  • 1
    _"Anyone"_ or _"Everyone"_ may be dangerous generalities, as one area I know of no studies and have no personal experience, is computer programming by individuals with cognitive or developmental disabilities. I suspect people who have problems learning, would be at a severe disadvantage, which could translate into a legitimate limitation, or frustration barrier high enough that it is typically not crossed, but I don't know of any survey or studies on the topic. And I don't know of any studies on whether people lacking any formal education can be successful at programming. – mctylr Sep 15 '12 at 00:16
  • 1
    @Izkata Review the author's page, linked by Jeff Atwood in his reply to Serg. The conclusions reached in the 2006 paper did not hold in later tests. – dmbarbour Sep 15 '12 at 07:01
  • 1
    @mctylr - I cannot generalize to developmental disabilities. However, the line between user interface and programming is quite blurry in the realm of live coding. Anyone who can communicate through reading and writing - i.e. who can learn and use ad-hoc symbolic abstractions - is capable of learning to program. Regarding formal education: Alan Kay has introduced very young children to programming successfully, and repeatably. Squeak, Logo, ToonTalk, Alice, Basic, and other PLs have all been used successfully by children. Estonia will soon be teaching 6 year olds - not much education. – dmbarbour Sep 15 '12 at 07:11
  • 1
    @jfrankcarr err you've misunderstood. What the professor would have run into, is that it seems many people in computer science courses can't program.. we are talking introductory programming courses. how to do a for loop that kind of thing. assigning variables. The main thing that happens is they find somebody that can. So this is far deeper than just not being able to make a living programming. You could put it down to teaching, but clearly the degree of incompetence of some is like a mental disability. – barlop Apr 21 '14 at 20:08
  • "Consider how easily people grasp spreadsheets" - Do they grasp spreadsheets easily? Most people in my workplace think that Excel is Black Magic! – T. Sar Jul 16 '21 at 18:26
19

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.

Mike Dunlavey
  • 12,815
  • 2
  • 35
  • 58
  • 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. – Jimmy Hoffa Sep 05 '12 at 03:46
  • "...were all quite capable..." - how did you measure that? Could all of them answer basic programming questions in test? – Den Sep 05 '12 at 08:13
  • 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. – Mike Dunlavey Sep 05 '12 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. – Mike Dunlavey Sep 05 '12 at 11:54
  • 1
    @MikeDunlavey Students always have friends who can program and homework can be easily cheated. – Sulthan Sep 15 '12 at 00: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. – Mike Dunlavey Sep 15 '12 at 15:36
8

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.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
James Anderson
  • 18,049
  • 1
  • 42
  • 72
5

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.

4

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.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Yves
  • 141
  • 3
  • 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 04 '12 at 20:15
  • sorry i messed up with the "send" button... I hope this makes more sense – Yves Sep 04 '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 05 '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 06 '12 at 10:01
3

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.

Simon Elms
  • 427
  • 4
  • 11
  • 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. –  Mar 20 '17 at 18:28
2

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

Loren Pechtel
  • 3,371
  • 24
  • 19