I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

July 14, 2006

Separating Programming Sheep from Non-Programming Goats

A bunch of people have linked to this academic paper, which proposes a way to separate programming sheep from non-programming goats in computer science classes-- long before the students have ever touched a program or a programming language:

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.

I wasn't aware that the dichotomy between programmers and non-programmers was so pronounced at this early stage. Dan Bricklin touched on this topic in his essay, Why Johnny Can't Program. But evidently it's common knowledge amongst those who teach computer science:

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.

You may think the test they're proposing to determine programming aptitude is complex, but it's not. Here's question one, verbatim:

Read the following statements and tick the box next to the correct answer.

int a = 10; int b = 20; a = b;

The new values of a and b are: [ ] a = 20 b = 0 [ ] a = 20 b = 20 [ ] a = 0 b = 10 [ ] a = 10 b = 10 [ ] a = 30 b = 20 [ ] a = 30 b = 0 [ ] a = 10 b = 30 [ ] a = 0 b = 30 [ ] a = 10 b = 20 [ ] a = 20 b = 10

This test seems trivial to professional programmers, but remember, it's intended for students who have never looked at a line of code in their lives. The other 12 questions are all variations on the same assignment theme.

The authors of the paper posit that the primary hurdles in computer science are..

  1. assignment and sequence
  2. recursion / iteration
  3. concurrency*

.. in that order. Thus, we start by testing the very first hurdle novice programmers will encounter: assignment. The test results divided the students cleanly into three groups:

  • 44% of students formed a consistent mental model of how assignment works (even if incorrect!)
  • 39% students never formed a consistent model of how assignment works.
  • 8% of students didn't give a damn and left the answers blank.

The test was administered twice; once at the beginning, before any instruction at all, and again after three weeks of class. The striking thing is that there was virtually no movement at all between the groups from the first to second test. Either you had a consistent model in your mind immediately upon first exposure to assignment, the first hurdle in programming-- or else you never developed one!

The authors found an extremely high level of correlation between success at programming and forming a consistent mental model:

Clearly, Dehnahdi's test is not a perfect divider of programming sheep from non-programming goats. Nevertheless, if it were used as an admissions barrier, and only those who scored consistently were admitted, the pass/fail statistics would be transformed. In the total population 32 out of 61 (52%) failed; in the first-test consistent group only 6 out of 27 (22%). We believe that we can claim that we have a predictive test which can be taken prior to the course to determine, with a very high degree of accuracy, which students will be successful. This is, so far as we are aware, the first test to be able to claim any degree of predictive success.

I highly recommend reading through the draft paper (pdf), which was remarkably entertaining for what I thought was going to be a dry, academic paper. Instead, it reads like a blog entry. It's filled with interesting insights like this one:

It has taken us some time to dare to believe in our own results. It now seems to us, although we are aware that at this point we do not have sufficient data, and so it must remain a speculation, that what distinguishes the three groups in the first test is their different attitudes to meaninglessness.

Formal logical proofs, and therefore programs – formal logical proofs that particular computations are possible, expressed in a formal system called a programming language – are utterly meaningless. To write a computer program you have to come to terms with this, to accept that whatever you might want the program to mean, the machine will blindly follow its meaningless rules and come to some meaningless conclusion. In the test the consistent group showed a pre-acceptance of this fact: they are capable of seeing mathematical calculation problems in terms of rules, and can follow those rules wheresoever they may lead. The inconsistent group, on the other hand, looks for meaning where it is not. The blank group knows that it is looking at meaninglessness, and refuses to deal with it.

Everyone should know how to use a computer, but not everyone needs to be a programmer. But it's still a little disturbing that the act of programming seems literally unteachable to a sizable subset of incoming computer science students. Evidently not everyone is as fascinated by meaningless rules and meaningless conclusions as we are; I can't imagine why not.

* which I hope to master sometime between now and my death

Posted by Jeff Atwood    View blog reactions
« I Heart Strings
Own a Coding Horror »
Comments

Uhm ... you've fumbled the variable assignments in the first question.

Brian Donovan on July 15, 2006 2:30 AM

Aw, c'mon, it was a one-character typo. Ain't there no love in the 'hood?

It's only tangentially related to the above entry, but I found this great article, "Johnny can so program", here:

http://news.com.com/2010-1007-5700858.html?tag=tb

Jeff Atwood on July 15, 2006 2:33 AM

I wonder if there's another variable at play. Perhaps the students who scored with a consistent view had already been exposed to programming. When I was in college, I remember the students in my classes who had trouble were ones who were entirely new to programming. The rest of us had either been in programming classes previously or had been coding for fun since we were kids.

Chris on July 15, 2006 3:13 AM

The interpretation of the results of the above assignment test make me feel angry. I am not a teacher but I am confident that I can teach (in less than 15 minutes) any person smart enough to be admitted to a computer science class how to pass the above test. The results speak volumes about the utter ignorance of educators regarding the nature of human knowledge and how to acquire it. It is a tremendous act of injustice to blame the students and not the teachers. Now if a student is *unwilling* to learn the material then that is another question. But to blame the poor education methods on students willing to acquire the knowledge is just ridiculous.

Fabian on July 15, 2006 5:22 AM

"unteachable"? How is this teaching being done, would changing the teaching method affect the results?

Anbal Rojas on July 15, 2006 6:00 AM

Anibal, yes changing the teaching methods would definitely change the results somewhat. Maintaing 100% accuracy with humans is nigh on impossible.

It is a good paper, I was at its presentation. I look forward to the follow up work that will be done on it. Unfortunately most computer science departments are not in the position to turn away students, so I think the best application of this(if it turns out to work well in all institutions) would be for streaming the class into honours students and pass students.

Generally in CS Education Research you'd need a multi-institutional, longtitudinal study to have fully verified results, so I guess we'll wait and see what comes out of it.

Des Traynor on July 15, 2006 6:41 AM

I liked the paper, but the acedemic snobbery in Section 5 pissed me off no end:

"The consistent group seem to be much easier to teach. We speculate that they divide into two groups: the very successful ones find programming easy and may perhaps be those who ought to follow a conventional computer-science education, with lots of formal content; the moderately successful perhaps are the software engineers, those who can program but can’t imagine that they will ever enjoy it, and are content to submit to management discipline and to be drowned in UML (ugh!)."

Poor software engineers, doomed forever to management discipline, UML, and a lack of formalism, all in a job that they'll never enjoy!

Andrew Shebanow on July 15, 2006 9:02 AM

I would add 'indirection' as hurdle number 3 between recursion / iteration and concurrency. Unless you treat indirection as part of recursion? Anyway, I observed of my fellow students that, whether expressed as explicit pointers or references, or as reference semantics, many of them simply never got the concept of indirection.

Mike Dimmick on July 15, 2006 9:18 AM

<i>Programming ability is not known to be correlated with age, <b>with sex</b>, or with educational attainment</i>

Uh, it is known to be correlated with sex. In fact, it is glaringly obvious. Are these people jokers?

namehere on July 15, 2006 10:23 AM

I'm by no means an expert but I've been teaching high school computer science for 14 years. Was a "real" programmer before that.

I did link a comment to this post and to the orginal study, because I find both fascinating.

Over the years, I've had actually three groups of students.

1 group vows very to get involved with programming again. 1 group absolutely loves it (I was in the group myself), and can't imagine doing anything else. A third group can do it, but doesn't like it much.

The good news, since I'm teaching high school, it gives them an opportunity to find out which group they belong in without shelling out any money.

The funny part is the high number of parents who are upset that their student isn't in the 2nd group. I keep telling them that their kids are normal but they don't always believe me.

And yes, the first group is the most prevelant.

I get both gifted and talented students, regular students and special ed (not many of those), many of them who have no clue what computer science is, but think it might be cool to sit at a computer for an entire class period. Many of my second group have come out of the group that didn't have a clue if they would like it or not.

Kathleen Weaver on July 15, 2006 10:53 AM

Another good article that's food for thought. This site always has good stuff!
I always wondered about that glazed stare I sometimes get back from some smart, though non-techie people when I try to explain something. Am I not communicating well?
Too much jargon?
Have I not simplified the question or explaination enough?
Do I have something between my teeth?
It usually happens when I'm trying to gather requirements or when explaining what happens when they do a particular action within an application and how that might effect other things in the system.
It's sort of like that Friends episode when Phoebe tries to teach Joey French.
I'll have to keep this article in mind and change how I explain things or ask question when I get the "look." Instead of trying to explain why the computer behaves as it does and getting myself and the user more frustrated, take a different tack completely.

Geoff on July 15, 2006 11:13 AM

"Programming ability is not known to be correlated with age, with sex, or with educational attainment

Uh, it is known to be correlated with sex. In fact, it is glaringly obvious. Are these people jokers?"

Unless you mean correlated with *having* sex (which in inversely related, I think...), you are wrong. Fewer women *attempt* to become programmers, but those that do they are just as capable as the males. The ACM and IEEE are trying to engage more women in the the field, but the are hitting a wall with the sterotypes of the field, not the ability of women to code.

Wesley Shephard on July 15, 2006 1:20 PM

I wonder how many of the people who fail programming classes also fail algebra classes?

Christopher on July 15, 2006 4:12 PM

It's an incorrect question. B has NO new value, only an old value, ergo all the answers are wrong.

This is what happens when you let subliterate engineers design a test: they screw it up. Right there, in the directions.

There are plenty of 17/18/19 year olds insecure enough that they are going to read the question like an actual English sentence (which it is not, it DOES NOT COMPILE given the correct answer, but you coders seem to have ZERO respect for the actual language us humans use) and believe that B HAS CHANGED, MUST HAVE CHANGED.

Such total crap.

Ryan on July 15, 2006 9:03 PM

Hey, I didnt do to well in algebra or physics, but I got a 3.99 GPA in programming, I did however such in English ("but you coders seem to have ZERO respect for the actual language us humans use") I guess that statement might be true.

Matt on July 16, 2006 12:32 AM

That should be "however SUCK in English".

Matt on July 16, 2006 12:33 AM

I haven't read the paper yet, only the test, so excuse me if I've overlooked something. But at first sight I find that assignement operator is a (unfortunate) convention of certain programming languages that we just have to learn, but it has no logic as seen by anyone that has learned the meaning of "=" in maths.

I wonder what would have happened using a different notation like "<-" or ":=" that risks no confusion with equality operator. I think it's called "usability". Maybe that explains why most programmers are unable to design decent user interfaces.

Nico on July 16, 2006 5:26 AM

The question does seem biased towards some programming experience. If the idea was to identify an ability to somehow detect rules consistently, when they really want to exclude any previous familiarity with the language, they should have picked symbols which aren't so C-ish. After all, they say the test takers have to detect a consistent connection, not know C. And that = sign in both the question and the answers, is also complicating the matters.

I wonder how similar the answers would have been if the questions were written like:

} a*10 %
} b*20 %
a*b %

The rules are the same rules. Just replacing some unknown symbols with other unknown symbols.

Plus, I don't like the idea that they think they can tell what represents a consistent outlook, and what isn't. It's perfectly possible that someone new will see a consistent rule which the researchers didn't. It could be a seemingly silly connection, one that a programmer will never make, but it may still be consistent. Someone who doesn't know the rules can come up with very wacky, yet totally consistent, ones.


The language, as mentioned in the comments above, is actually something I don't have a problem with. The values are new values, even if they're the original values. The values were just assigned, so they're new.

On the technical side, the original value may even have been the default uninitiated memory. Without exact knowledge of the language, the compiler, and the context (maybe a and b have been defined before, and this is a re-definition? Maybe something else? Remember, this isn't officially C, and doesn't necessarily comply with any specific C standards) the values may very well be new.

And on the semantic side the variables didn't have a value before they were assigned, so this is the new value. Otherwise you justify sentences like "My new car? Oh, this isn't my new car, I just got my driver's license and bought it yesterday, so it's the first car I ever owned."

Yaron on July 16, 2006 6:54 AM

hi jeff

the example given seems very tilted toward people with experience in a C-like language.

if instead of:

int a = 10;
int b = 20;
a = b;

it was in a more verbose format:

Variable a is integer
Variable b is integer
set a = 10
set b = 20
set a = b

then clever kids with no programming experience might have a fairer shot at it.

otherwise you need to use the 'code-cracking' part of your brain to try and infer a meaning from an unknown syntax.

i know that the biggest barrier to learning in the earliest CS subjects i took was the quality of the lecturers, not the material itself.

interesting article still. best of luck.
lb

lb on July 16, 2006 7:02 AM

I think what most commenters are missing is that the results of the test don't change after 3 weeks of the students being taught programming, by which time they would have been taught the syntax etc.

James on July 16, 2006 9:22 AM

I'm a latecomer to this discussion, but in my experience as a late-blooming 30 year old CS undergraduate senior, I've found the programming classes to be useless, and less badly taught as un-taught. I've only been to a community college and then the University of Illinois in Chicago, but the introductory programming classes were:

1. Object-oriented, which left students with little or no understanding of procedural methods, and

2. Weed-out classes. The classes consisted primarily of descriptions of different types of problems and the mathematics behind them, rather than ayntax and structure, for which people were told to just read the book.

Code was barely directly acknowledged until the Data Structures core, and then it still depended on which instructor you got, some being very code light and some being nicely code heavy. You could tell that it was a big temptation for teachers to be code light at this point, because if they concentrated on code, they would also have to concentrate on teaching students who had been in a computer science course for two years how to program.

Since coding is a hobby for many young people, I think that educational institutions have relied on that to establish their expected learning curves, leaving people who had little to no experience programming when they entered school no choice but to cheat like crazy, spend all of their spare time studying code, or switch majors. And it isn't a necessarily a deficit in abstract thinking in my experience, because everyone I know who dropped out of CS ended up in Electrical Engineering, which is nothing to shake a stick at on the abstract front. They still don't know how to program, while doing math that I can't make heads nor tails of. Most absurd memories:

1. Java as the required programming language. I'm not going to bash Java here, but wouldn't it be nice for students to have to learn their own garbage collection? And wouldn't pointers be a nice thing to learn, even if we never decided to program in a language with them again?

2. Taking a core class on operating systems theory, after being being deluged with Java, and finding out it was in C (of course) without even one C class on campus?

Of course, I'm thirty, and also one of those people who always programmed, so I had no problems, but I saw plenty of people who I knew were better at abstraction than me (from Calculus, DiffEQ, and physics classes before) and their total agony at trying to finish a program that had been stacked against them.

Jamaal on July 16, 2006 9:58 AM

It might be worthwhile for people to mentally review what exactly a single study means in the realm of science.

It is neither more nor less than evidence. It may have been misinterpreted. It may be the beginning of a solid proof. As yet, though, you can't know which is which; it is merely an interesting tidbit.

Preparing to use this test in a real college environment or decrying the study as rank elitism are both premature.

I'm prepared to believe that perhaps the standard teaching methods are questionable and that with other methods the currently "unreachable" students might yet learn what is meant. In fact, this test is useful simply by virtue of providing a discriminator; much of psychology works that way. We can't actually know whether a person has "schizophrenia", because we don't even know exactly what "schizophrenia" is, but we can study how two populations, divided by a standard "schizophrenia battery test". Without that tool study is borderline impossible.

On the other hand, I'm prepared to believe that the ideas hinted at by the study are true and there are people who just can't get it. I saw senior-level students who I seriously wonder if they could pass that test, and after four years of experience I daresay teaching methods should be of minimal consequence; the teaching method of the compilers is both constant and rigorous.

It's worth further study. If it does turn out that there is a segment of people who literally can not understand computer programming, and it turns out we can identify them with high reliability, then we *owe* it to those people to so identify them before they spend years going down the wrong (for them) path.

"Encouragement" is not an intrinsic virtue. "Encouraging" somebody who has been mountaineering for a week to take on Everest is not a positive thing, it's postively *murderous*. Encouraging somebody who can't learn to program to learn to program is not a positive thing, it's *evil*. If this study does reveal something, then the authors are not evil elitists, they are the heros of every non-programmer the test identifies.

Jeremy Bowers on July 16, 2006 10:16 AM

Hmm, so the key is to never work with the 44% of students that formed an incorrect, consistent mental model of how assignment works.

That explains a lot.

foobar on July 16, 2006 11:53 AM

3 weeks of programming classes taught me *nothing*, except what textbook the lecturer had helped write and wanted us all to buy.

The problem in a current educational setting is deciding which languages (of the thousands out there) to teach students. Majoring on .Net and Java will teach them useful work skills, but some time spent on Ruby, Python or other languages might be more useful in teaching them that there is more than one way to solve a problem.

I was taught COBOL, Miranda, Assembler and SQL - except for the last one, a more useless set of languages you would be hard to find. My best learning experience was on the job learning the actual languages I needed to use.

Angus McDonald on July 16, 2006 4:15 PM

While the question is indeed vague and the asignment vs. equator could be an issue, I don't think it really is. Given that the answers are not "true" or "false" the function of = is fairly obvious.
The C style syntax is not a problem either. What they are looking for is a consistant mental model. If it's some crazy language where = moves the value from b into a and leaves b empty, then that should be reflected in all of their answers.

[ICR] on July 17, 2006 12:50 AM

I wonder how many students would have answered false in the question if it had been there.. mind you, I taught a guy a language after he had read the teach yourself language in 21 days, and been on a 2 week course and had a degree in computing.. still didnt know what an integer was.

brit on July 17, 2006 5:05 AM

having been taught programming as part of an engineering course, where the course book was along the lines of 'C for idiots' (which was actually a good choice as it turned out :-) ), by a lecturer who understood FORTRAN and didn't have a clue what 'C' *was* let alone how to use it...

I spent many an hour with the only other person on the course who understood anything (far more than I did) running side classes to explain things. ironically the lecturer 'attended' these classes as well.

these tests would have been a very good idea. put the people who pass into one stream and the people who fail into another, teach to peoples abilities, then a bit further the stretch peoples minds.

there is not point baffling people, programming isn't hard once you get the basics. its just that 'getting' the basics can take time and needs to be taught well, by which i don't mean the all to common answer during my education of "you don't need to know that to pass the exam" which really annoyed me...

claire rand on July 17, 2006 5:29 AM

int a = 10;
int b = 20;
a = b;

Is C (based) syntax. You have to learn C to know the correct answer. If someone does not know C (or any other programming language) they could easily not know that = in this case is an assignment.

Assuming the student being tested to know such syntax is ridiculous (after all whats the point in the int keyword? or the semi-colons?). The person who designed the test obviously forgot that they themselves know how to program. Either that or they were just lazy to think up a more generic language.

All the same, interesting stuff. Might be good to see the test conducted on actual so called professional programmers as well (not just students). I wonder how many "professional programmers" have no aptitude for programming? ;-)

Paul on July 17, 2006 6:05 AM

Quibbling about the language is missing the point. I think part of what this test seeks to identify is the ability to determine these things heuristically, without necessarily knowing how syntax translates into semantics. That's mostly what you end up doing in production code - you don't write clever academic programs from scratch, you use libraries and frameworks and other people's code that has either minimal or no documentation, and try to make sense of what it means and how to use it. If you can't do that, and you need to have everything spoon-fed to you, then as the test states, you have no business being a programmer.

Remember that the test is looking for *consistency*, not necessarily *correctness*. Even if someone got the syntax wrong (I'm not sure how), they're looking for the formation of a mental model, which is a required element of problem solving, which is what programming is really about. If you can't form a consist mental model on your own, you can't code. When you write real production code, you're most often working in an unfamiliar problem domain and you have to do the same thing - solve a problem you don't understand!

So it's using C syntax, or C# syntax, or the syntax of any of the other 50 languages which is exactly the same. So what? It's very close to the algebraic syntax you ought to have learned in grade 9 or earlier, much closer than a language like VB or Pascal.

Blame the teachers if you want, but there are lousy teachers in every discipline and you don't see the double hump in their classes. What's so special about programming?

Aaron G on July 17, 2006 7:16 AM

It's important to note that:

* 44% of students formed a consistent mental model of how assignment works (even if incorrect!)
* 39% students never formed a consistent model of how assignment works.

They didn't just look for "correct" answers, they looked for consistency. So, if you don't know that a=b means the value of b gets assigned to the value of a, then the group in the first bullet would create a mental rule for what it means, and consistently apply that rule throughout the test. The folks in the second bullet would 'change' that mental rule for each question.

Now, the question is, if you didn't know, and you were guessing, did the folks from the second bullet alter their rules in order to get some of the questions right, instead of applying the same rule throughout the test. The whole, "well, I don't know how to do this, but I want to get some of these right" attitude.

jdkludge on July 17, 2006 7:24 AM

A double hump is not limited to programming. In elementary geometry, there is a classic problem called the Pons Asinorum ("Bridge of Asses"). Some students handle it swimmingly, others require extensive handholding. It has also been said that regarding advanced mathematics, only about 15% of secondary students really "get it" and the other 85% just follow along. Knuth once remarked that in Stanford CS classes, only about 1-2% of the students were at all fluent when it came to programming. Gerald Weinberg in "The Psychology of Computer Programming," noted that unlike most fields of endeavor, where the difference between the best and worst practitioners might be a factor of 2, in programming, even after being measured with a wide variety of metrics, the difference can be as much as a factor of TEN.

Bob Byard on July 17, 2006 12:53 PM

I remember looking at code before attending my first "Introduction to Programming" class and not understanding how something was "equal" to something else. This was one of those "aha" moments where the pieces came together. I would have failed the question before the class but that simple stepping stone opened worlds to me.

Aesop on July 17, 2006 1:23 PM

While I agree that the language specifics isn't really a problem, they are not meant to get it correct, only show a consistant model the C style asignment operator is confusing to everyone I've seen exposed to it for the first time. ":=" is a little better, and then something like "let x = 10" next, and then something like "let x be 10".

[ICR] on July 17, 2006 1:38 PM

I'd note that not only in programming does ability vary by a factory of ten. I've also observed a similar range in teachers.

It's kind of obvious which end the authors of the study fall into, since they assign the blame for the problem to the students.

And yes, you can teach the "I don't get it"s to program, but you have to have some understanding of teaching, not simply a degree in programming.

Tom on July 17, 2006 10:38 PM

As an individual who has gone through many MANY programming courses, it's well known to most people that these two groups exist. I was dismayed in my first year of engineering study when 90% of the class aknowledged that they had already learned Java (program we were studying) and many of the topics covered by the class. I was not one of them. By the end of the term, the class average was somewhere around 50% (tough university as well), with most students failing and struggling to even understand many of the basic concepts taught in class. Regardless, without much effort, I managed to pull out one of the highest marks (sorry if it sounds like i'm bragging).

So why does this divide exist? Obviously it has nothing to do with how smart an individual really is, but more so how they think. In my opinion, actual programmers are clearly able to see the big picture, and how little bits and pieces relate and affect everything else. Sadly, with how simple programming is to teach/learn, the industry will continue to churn out huge amounts of incompetent programmers.

Daiken on July 17, 2006 10:46 PM

So the answer was a=20 b=20 ?

scoop on July 17, 2006 11:26 PM

Exactly the same thing happened in the Kalmar Laszlo Computer Sciences School (Or whatever is the english name of it) in Hungary. Btw it seems to be true: "The two most common elements in the universe are Hydrogen and stupidity."

dH on July 17, 2006 11:40 PM

I think the previous comment on prior programming exposure is a good one. I remember first 'getting' assignment from a Spectrum BASIC program I had entered from a book. I have had similar experiences in 'getting' Prolog, C++ pointers, threading and, more recently, Ruby closure blocks, so I feel it is not a matter of either understanding, or not, these concepts, but in how long it takes for one's brain to make the comprehension leap.

If people fell into two camps on understanding assignment, then would not those assignment-impaired individuals never understand alegbra also?

Paul on July 18, 2006 12:27 AM

This not c syntax. The answer could be 20 or 10 as long as the rule is applied consistantly by the person taking the test.

understand on July 18, 2006 12:33 AM

QUOTE:
"So why does this divide exist? Obviously it has nothing to do with how smart an individual really is, but more so how they think. In my opinion, actual programmers are clearly able to see the big picture, and how little bits and pieces relate and affect everything else. Sadly, with how simple programming is to teach/learn, the industry will continue to churn out huge amounts of incompetent programmers."
Daiken on July 17, 2006 10:46 PM

*right u are!
From the beginning I would like to say that a programming course does teach openminded students something..
I think the test is a good tool both for teachers and the students. The students receive a signal that they might pretty much be wasting their time and money for soemthing they-re not suited for, or, in case, let's say..they weren't yet showing interest by the time of the second testing, they should start doing it, if they really want to be in this business..My ideea is that there are many bright students that "wake up" pretty late during faculty and start seriously working as programmers and maybe be miscathegorised by a test like this, and maybe a "wake up call" early in the process of learning would be good..I sure could have used one earlier :)

G on July 18, 2006 2:27 AM

I think this problem is a reality, I sure know some of the "ones that get it" and some who don't get it, no matter how much I try to explain to them... Whether this is because I'm a bad teacher or because they won't ever get it is left to study, but there sure is an hell of a difference between those two kind of people in the amount of effort they need to attain comprehension of the basics !
However I wouldn't say this is specific to CS, I encountered the same phenomenon in Maths (though the ones who are good in Maths aren't always good programmers). Of course this doesn't appear as much in college because Maths courses start way earlier and the Maths student are all in the "get it" part...

Jedai on July 18, 2006 2:52 AM

I think that the syntax is a minor problem. Except perhaps for the int declarators, it is fairly obvious what happens. What might not be as obvious though, is the fact that the program is a sequence that should be read top to bottom. I.e. the statement "a = b;" happens *after* the initializations of a and b. If that does not occur to you, determining the values of a and b is not straight forward.

Kristian Dupont on July 18, 2006 4:08 AM

I failed my first programming course in college, but I didn't give up. Now (some 28 years later) I am an accomplished and successful electronics engineer with about 20 years of successful embedded programming experience.
Like I've posted before, (1) immerse yourself and your way of thinking will gradually align itself to one that is compatible with programming (2) practice, practice, practice, practice! (3) if you stop trying before you succeed, you've failed.
I firmly believe that many people who fail programming at first could succeed if they kept working at it.
I also think it may be more fun to the a professional musician on the road, but there's an upside and a downside to everything!

~{;o)

Mellissa Dalby on July 18, 2006 4:09 AM

Hi,
Maybe i am a fool, but i do not read the results the same way. In my opinion, the got a test before the course, and on after. so the test will allow to qualify of the course, not the students.
Obviously if 44% answer in the right way to the question they have some previous knowledge in the topic (and maybe that's why they were interested in the course).
(I haven't read the related academics papers, because I think we just need to change the computer science to something better).

Peace,

Steve

Steve on July 18, 2006 4:53 AM

I am a third year computer engineer and work as a student lab instructor for my university. I would like to mention that from my experience, I agree somewhat with the conclusion of the study. I feel that tests like this could and should be used to determine which students MAY need more help understanding the basics. Through my quarters of teaching, I have seen the divide of students who see the code and understand right away...I have also seen students who are too shy to ask for help and as a result, never get a solid foundation of the basics. There is also several students in each group that I feel will just NEVER get it, no matter how many different ways I attempt to explain it (but I NEVER stop trying). My recommendation would be to give a test like this a week into the course, after the assignment operators have been discussed. Using the results from this, I would highly urge the students who had trouble to visit me during my office hours. As I tell all of my students...programming isn't really hard, you just need for it to "click". I am a big fan of student lab instructing, just because I know exactly what the students are going through; I've had the terrible professors, I've had the terrible books, I'm now able to adjust my teaching style to what I feel will work best for the students.

Jesse on July 18, 2006 5:38 AM

I think a lot of you may be missing the point here. The correct answer did not matter at all. After reading through the draft, I gathered that the test measured whether or not a student could hold a consistent rule set in his/her head or not. The students who did not answer consistently were most likely to be the students that did not understand that computers are dumb and will only do exactly what you tell them...following the exact same rules every time. This is a huge disadvantage when programming, because the rules do not change. Unlike the relativism most high schools teach, where there is no right answer and each problem should be looked at in its own way, where everyone can have his or her own set of rules and values, programming is very strict. The people who comprehend this are much more likely to be good at programming. That was the point of this article, not that knowing the correct answers to these questions makes you a good programmer. I think there was even a list of what all the answers meant the student was thinking at the time, most of which, were perfectly acceptable thought processes, if self-consistent. I'm just worried that something like this may be used as a deterrent for those who really don't get it at first, but are able to adapt quickly.

Jake on July 18, 2006 5:53 AM

A large number of people commenting above fail to realise that the students were not being assessed on their actual answers to questions like the one above: what they were being assessed on was how CONSISTENT the mental model was of what they were being asked.

a=30, b=0 is an acceptable answer, but to be consistent, the student must then answer the remaining 11 questions using the same rules. If they do so, they are "consistent", and are demonstratably more likely to get higher scores in the actual course.

I'm disappointed by the number of software engineers who read this article and fail to realise this!

Scatman Dan on July 18, 2006 6:11 AM

"but you coders seem to have ZERO respect for the actual language us humans use" ....sorry, but this coder can't resist: that should be "language WE humans use."

dennis on July 18, 2006 6:19 AM

Great article, this explains why so many people failed out in College.

On a side note, anyone else think that this site's grey text is terrible for reading? A darker font would be much easier to read.

Stan on July 18, 2006 6:26 AM

I've found that people who do well in high school geometry have a better chance of clearly understanding programming... Geometry proofs are pure logic. I did not do well in algebra, but got deans list and merit list in college while doing computer programming (merit list is a deans list for part time students).

Jeremy on July 18, 2006 6:56 AM

I had the pleasure of tutoring many students in beginning programming courses. I am definitely a firm believer that some people can never learn how to program. It's a simple matter of brain function. Some people just don't have a brain that is suited for logic design.

Chris Goetschius on July 18, 2006 7:05 AM

Many years ago, after teaching myself to solve engineering problems in BASIC, I tried an undergraduate programming course in hopes of sharpening my skills. I made it through the first assignment, then dropped the course when I realized everyone else's program listings were 10 times as long as mine.

I never tried another class, but I've been writing working code as part of my career ever since, learning to use a variety of programming and scripting languages along the way.

I guess I'm an intermediate programmer, in the same way that I'm an intermediate
skiier. To me, programming is both a useful skill and healthy mental exercise, like writing poetry or playing chess or a musical instrument, even if you never get really good at it.

Maybe some people just don't like it or don't get it - some of the same people who can't seem to construct a grammatically correct sentence in their native language.

But it's still depressing to me that so many bright people I work with have been indoctrinated to believe they'll never be able to do anything with a computer outside of a GUI.

Eric on July 18, 2006 7:32 AM

It is unfortunate when so called "studies" like this come out to make speculations sound like truths. This page might be better served in a Wiki and accepted as "thoughts and streams of conciousness without conclusive proof". I agree that it appears there are groups of people who just "get it", but I won't easily forget about all the social factors and variables at play here. I think the authors should consider other factors as well such as: teachers, class material, language and syntax, prior exposure to similar topics, left/right brain usage. Even though this industry has been around for some number of years, the formalities of teaching the subject are still in their infancy.

MuchoInsight on July 18, 2006 7:48 AM

"dropped the course when I realized everyone else's program listings were 10 times as long as mine."...you're probably a really good programmer then, assuming your programs worked.

We've got a lot of old code where I work that's probably about ten times as long as it should be. Drives me crazy. Some people just don't seem to have the knack of figuring out a concise and elegant way of solving the problem.

dennis on July 18, 2006 9:04 AM

I find fault with the belief that you can test someone's aptitude on a subject before they even begin their studies. You can test anyone's logic skills, which is what variable assignements do. They utilize the critical thinking of the subject. However, that same method can apply to any subject matter and doesn't really show an natural ability at one particular subject. It merely shows that individuals ability to apply reason across any material.

You test likelihood of success, but that denegrates those who come into it knowing very little and end up learning a lot. Perhaps even more so than those who did very well on the test. My fear is that if this theory is utilized throughout the academic community, then only those who show a natural aptitude for the subject matter will be allowed to take the course. And that even those who complete the course with a high grade, will still be hindered because they didn't show a natural aptitude for the material. Whereas someone who just barely passed the course will get higher consideration because they scored high on the tests. (Remember, potential and the results are two different things.)

The great thing about education, is that a person can come into their studies knowing nothing and walk away much wiser. It is the pursuit of knowledge that is most important, not who has a natural ability at the subject or not. By testing students for their natural ability, we are going to create a system where by people are only able to do what they show an ability for, not what they want to do. That sounds a lot like the former Communist regimes of the USSR and China.

William on July 18, 2006 9:17 AM

Interesting discussion.

A few observations from my 23 years of programming and 3 years of teaching high school programming.

Sexism: In my prior life as a programmer/manager, about half my team was female. Quality of programming was indistinguishable between the sexes. In some teams the best programmer was female; in others it was male; often it depended on the business knowledge of the programmer rather than on the mechanics of programming.

Language to teach: I opted to teach Java as my introductory programming language. It provides a safe language for beginners: they can't accidentally do something that trashes their system. It can also be written and run on any of the major high school platforms: PC, Mac or Linux. And yes, all three platforms are represented in my student population. And no, knowledge of multiple platforms does NOT mean that the student is a better programmer!

Beyond that, Java allows all the basic strategies of programming: procedural approach, sequential processing, compiling (OK, so it's byte code and not a "true" compile. They're still exposed to the thought process of translating written code into something machine readable.), logic statements, loops, recursion, data types, arrays, sorting, trees, linked lists, file IO, searching through documentation for the code they need. I also require documentation (the bane of many "true" programmers), requirements gathering, testing (string, unit & full application), and good design. For my advanced class I also get into project life cycle and maintenance by taking a single application through several cycles of improvement.

Weeding out: My first couple lectures are completely from hand-outs, and the first assignments are based on that information and the class discussion. I then review the programs in class using student code (from that class or another, with the victim's name removed) so we can see examples of good and bad design and code approaches. I also put my own code up for review, including bad code, so we can go through trouble shooting and debugging. That is the most useful teaching technique I've found based on the students' "ah ha!" response. After several weeks and assignments I talk with all the students about continuing in programming or finding another area of interest. Most don't need the conversation.

BTW, my favorite first program is to write the directions for making a peanut butter and jelly sandwich. Then I'll pick one and misinterpret as many of the directions as I can to illustrate the stupidity of the computer, the importance of clear instructions.

English language: Having come from the corporate world of application programming and working with the user community, I emphasize to the students and to our English teachers the importance of clear writing skills. Writing is the most important part of working with users: meeting minutes, email, user documents - if they are unclear to the users, you are just wasting your time and theirs, and your project is doomed. Unless you work for someone who has those skills, but you won't ever be in charge of many successful projects. But maybe you only ever want to be a bit twiddler, and those of us in management appreciate the bit twiddlers who work for us. (Is that food for flaming, or what?!)

Quality of teaching: There is no doubt that there are good teachers and there are bad teachers. And while there is pressure on elementary teachers, and to a certain extent on high school teachers, to use better methods and techniques, I don't see the same urgency in the college and higher levels for teachers to keep up with current teaching techniques. In many cases they have there PhD so know what is best for us, and if we can't get it, well, then we just don't belong in the field! I've been fortunate to have had good or excellent teachers. Not that there are things I wouldn't have changed! And for the money, there are few better college classes than evening classes at community colleges in the DC area: the students are pros in their fields, looking to improve their skills or expand their knowledge base (no trade mark infringement intended) by taking evening classes. They know what they want and are very demanding, so the best teachers are assigned to their classes.

And yes, I will play with the test and see how it does in my classes. And I'll watch out for follow up studies, because this has said, "There is something interesting here."

Well, this has certainly gone on much longer than I intended, but there were a lot of points in the discussion that I wanted to respond to based on my experience.

ron on July 18, 2006 9:21 AM

Two items to note based on the conversation so far

> I had the pleasure of tutoring many students in beginning programming courses.

1) Bear in mind that "the camel has two humps" observation comes from people in the trenches teaching computer programming to novices. The idea that there are two populations, those that "get it", and those that don't, isn't a an experimental concept-- it's professional observation based on years of hard experience by seasoned, professional teachers.

> If someone does not know C (or any other programming language) they could easily not know that = in this case is an assignment

2) The authors specifically noted that they used the = operator because it was simpler to understand. Probably because it looks more like standard maths. However, this does make me wonder if a more explicit, verbose syntax..

> Variable a is integer
> set a = 10

would have helped at all. Probably not, but worth a shot.

Jeff Atwood on July 18, 2006 9:23 AM

Surely the question is a logic problem, it has nothing to do with C, semantics or otherwise. As posted previously, some people just don't have logical minds - and they would certainly have trouble learning programming, but the mind is a mouldable thing and I firmly believe that they could learn, given the correct tutoring and the will to learn.

Also interesting to note is that people who are good at programming also show aptitude at picking up other languages and vice versa.

Owen on July 18, 2006 9:43 AM

It's an interesting question, but the 3rd line contains an error, a=b is clearly illegal.

Excedrin on July 18, 2006 10:29 AM

To be honest I am very fascinated by the study being done here. It quantifies some of what I experienced in a beginner computer course in High School. As part of the course we were introduced to a programming called Turing which was developed as beginners programming language at the University of Toronto.

Prior to taking that course I was already exposed to logic and programming courses, and would consider myself to an analytical thinker. What amazed me about my peers was their inability to grasp logical concepts. Being done my assignments very early on, I assisted the teacher in help students to debug their program errors. These programs were littered with a large number of logic errors like:

1. Not dealing with assignments properly.
2. Not able to transcribe the requirements into the language constructs.
3. Not understanding the actual project requirements.

I think it would be even more interesting if these test could be applied to a high school level when students take their first programming course at a point where they have been taught the basics of the language... I think the results would still come out the same way because there was a group in my class that would not be able to understand the problem even with additional programming teaching.

Abraham on July 18, 2006 11:05 AM

Just to reitterate the language problem, I showed the test (out of personal curiosity) to several people who have never programmed, and they all got very confused, aggitated and thus reluctant to continue with the test over the fact they failed to understand that the = was an asignment, and thus the question made no logical sence in any form. After I explained this, they were alot happier.

[ICR] on July 18, 2006 11:16 AM

One thing that no one has taken into account is learning style. Almost all public school and college instruction is geared to ONE kind of learning style (this is one of the problems with mass education). This "study" completely ignores this factor. Another factor that this study ignores is that most Computer Science programs do not teach the process of programming, but rather syntax, flow of control and encapsulation methodologies. The result is that students know "what," but not "why."

Forget teaching students syntax right off the bat, teach them how to solve problems, teach them how to break down complex systems into groups of interactive, simple systems. For instance, my oldest son wants me to teach him how to program, but he is still too young. He is not yet able to reason from the complex to the simple. He also does not have enough math to understand how to make logical comparisons. So should I teach him how to write "Hello World" on the screen? NO! There is no value in that way of teaching; it is pragmatic and therefore useless. Instead, using real life situations, I am teaching him (many times without him knowing I'm "teaching" him) how to think logically about things and how to see a bigger problem as simply a sum of parts. If you want to learn how to draw a realistic looking tree, start with understanding how to draw a leaf and even then leaf drawing can be broken down into simpler parts.

If a student does not like this kind of problem solving, he will never be able to look at a problem and write a program that really solves the problem (because he does not truly understand what the problem is). That same student may "get" assignment and recursion, but they if they do not know how to apply it, what good is the knowledge? The reason why there are so many bad programs out there is because the market is flooded with this kind of programmer.

In my own education, I had this same problem. I would have failed the test that is being put forward in this study. I found my first year of comp. sci. in high school boring and I did not really understand what was being taught. Why? Because I did not learn in the same way that I was being “taught.” The only reason I passed the class, is because I had friends in the class who mostly understood what was going on and they let me study (not copy verbatim) their programs (yes, this is still cheating and it was wrong as well as pragmatic – I should have asked for help from the instructor which probably would have done like those doing the study and told me to quit the class because I was not predetermined to be a programmer). My point is that I learned programming by pouring through programs and deciphering them. By looking at how several people solved the same problem, I was able to understand the problem and the best way to solve it. By year 2 of comp. sci. all of my friends (who were all smarter than me – at least according to the public school system’s grading methodologies) were coming to me for help. And now (16 years later), as far as I know, I’m the only one still programming.

Am I the world’s best programmer? No, not even close. There are many reasons for this many of which are beyond the scope of this reply, but one of these reasons is lack of specialization. To be really great programmer, one has to be able to specialize in a small set of programming languages and then learn every nuance of the language so that he can apply the appropriate features of the language in developing the best solution to the problem at hand.

Stiles on July 18, 2006 12:43 PM

A comment to those who think you need to know programming to answer the first question on assignment... What a joke.

This is basic math. NOT programming. You have 2 variables and you are assigning one to another. Simple as that. Grade 7 math taught me all I needed to know for that question!

Tim on July 18, 2006 12:44 PM

And yet, there are companies out there that would rather hire someone who has graduated college with a computer science type of degree, irregardless of how skilled of a programmer they are.

Would you rather hire someone who barely squeaked by a C++ class, or would you rather hire someone who has had to learn how to program 100% on their own for many years and has a proven track record?

For a lot of places, it is still the college graduate that gets the preference. Maybe it's a CYA move...I dunno.

Shawn C on July 18, 2006 12:56 PM

Readers should note that the dedicated professional teachers all recognise the two humps.
I have attended many teaching conferences where young aspiring teachers wonder what they are doing wrong. Eventually, they recognise the two hump problem. Some students just don't get it.
To all those who are insulting the article's authors' teaching ability, please consult the literature on teaching introductory programming.

And point of the test was not to find a way to discriminate between goats and sheep; as pointed out in the article (please read it) this was a complete accident. This was discovered by subsequently analysing the results. So this "so called study" is simply pointing the way. The lovely thing about this paper is it presents what they discovered and offers entertaining insights and opens up a very useful approach for studying potential programmers with a view to improving teaching. It is far more useful than so many of those so called "real" studies.

I completely agree with Scatman Dan, "I'm disappointed by the number of software engineers who read this article and fail to realise this!"

James on July 18, 2006 1:32 PM


============================================

Whats the answer to the question anyway? -BG

============================================

Bill Gates on July 18, 2006 2:05 PM

or...


Those who can, do.
Those who can't, teach.

Shawn C on July 18, 2006 3:34 PM

As a linux hobbyist / non-programmer, I find this discussion interesting; especially in that no one apparently posted an answer to the question.

As a non programmer I would have checked off:

a=10; b=20

In other words, the 'rules' of this particular program are such that 10=20. I know that 10=20 wouldn't make 'sense' in a basic math world, but I'm assuming that in programming, you can define your own rules, even if it wouldn't be 'true' outside of a programming environment. So...am I correct? Do I have the 'programmer's mind'? ;)

Ben in Chicago on July 18, 2006 5:10 PM

Ben,
If you have a ruleset that you would then apply to another similar problem, then you 'pass' the test and have the 'programmer's mindset'.

Your rule set doesn't match mine.

I read it as follows:
Set A = 10
Set B = 20
Set A = B (ie. move the value of B, to A)

Thus, both A and B are now equal to 20.

While I have been programming for 20+ years now, I've never used C (learned in Apple Assembler and Basic and Pascal, then moved to the AS/400, which is RPG)

Michelle on July 18, 2006 6:21 PM

> Would you rather hire someone who barely squeaked by a C++ class, or would you rather hire someone who has had to learn how to program 100% on their own for many years and has a proven track record?

I'd hire someone who did well in school and did some self-study. Believe it or not, those people exist. I've hired a few. Those are the people with passion - the ones that care about what they do with their life. Everyone else is a damned hack.

> Those who can, do.
> Those who can't, teach.

I've met plenty of people who can't, try to do.

I've also met many really good programmers/analysts that teach.


foobar on July 18, 2006 9:34 PM

I agree with some that algebra, although important is not a necessary requirement. I actually found that I was better at logic and syntax of the given programming language. The mathematical formulae will usually be supplied for the programmer anyway. So in my case I found logic and syntax to be important. I found I was very adept at debugging programs. No I found I was a programming sheep. It also didn't hurt that at the age of 16 I graduated from a Unit Record School, I am now 55 with a degree in BDP/CIS. I love programming.

Rick on July 18, 2006 9:41 PM

That test was ridiculous! It is so biased towards the imperative programming!!!
It does little to test logic.
Maybe the problem aren`t the students, but the whole "think like you're a fSCing Von Neumann machine." Of course, so many C++, Java, C, Python programmers out there won't even understand what I'm talking about.
So instead of identifying the disease, they choose to name students "uncapable." F******G CRIMINALS! MORONS! It seams the mental disease called imperative programming has caught everyone, except the few of us who choose to reamin sane and inside Computer Science, but outside marketing and corporations intrduing in on the field, and taking over...with their substandards...But so many people in academic departments are seriously braindamaged.
LOOK AT THE F******G RESEARCH DONE IN THE LAST 20 YEARS AND YOU'LL SEE...EFFECTIVE COMPILERS FOR NON-IMPERATIVE FUNCTIONAL LANGUAGES...VIDEO GAME COMPILER WRITTEN IN LISP...OR CLEAN...SML ALMOST CATCHING UP WITH C...YOU CHOOSE TO STAY STUPID!
A functional proagrammer would fail it, because of assignment.
Maybe Math students would fail it too.

JeffT on July 18, 2006 9:57 PM

Might be interesting to substitute
a == b;

He-he.
One of the typical pitfalls usually encountered
in conditional statements -
if (a = b)
versus
if (a == b)

Roger

Roger on July 19, 2006 3:51 AM

a and b both equal 20 as the operations are executed in sequence

1. The integer of a - presumibly 11 > a > 10 is a valid assumption is calculated to be 10

2. The integer of b - presumibly 21 > a > 20 is a valid assumption is calculated to be 20

3 The result of a is then made equal to the result of b thus rendering a = b = 20

I think it depends on the person at the end of the day - some can and some can't - also depends on the language that one has been exposed to . . .

Steve

Steve on July 19, 2006 5:33 AM

Looks like a paper describing the failure of professors to teach the subject they know (which is likely not education).

Perhaps if more of them (and I'm sure some do) focused more on conveying the material instead of carbon copying their favorite textbook to a chalk board, more students would know important things like what programming language the test is in, and what the symbols mean in that language as well as on the hardware of the machine it's instructing.

Who did well? The kids that learned something on their own first, beacuse thats obviously all they come out with!

teh_chad on July 19, 2006 9:25 AM

RE: programming sexism.

There is a theory that women are smarter on average, but that men have more variability/larget standard deviation. Women cluster around a higher average, but men have a higher chance of being extremely smart.

This has beared out in my experience as a 34-year-old programmer. Women are generally good, but I have never met a superstar female programmer.

For example, does anyone know of a framework author/architect that is female? The people that come up with Jini, or Ruby on Rails, or Hibernate, or the like. I can't recall a single female author of groundbreaking ideas, either theoretical or practical.

I agree with many people that the given C example is riddled with hidden lessons/assumptions that actual programmers have learned. The '=' as an assignment is confusing since equality is a test, not an implication of transferrence or copying.

blahblah on July 19, 2006 12:12 PM

About the only thing missing here is ... Hitler!

Pops on July 19, 2006 4:21 PM

Related to comment that implied 'No good woman programmers' Dr. Grace Hopper (COBOL and other early work). She as also coined 'debugging' since she found a moth in a relay switch on early computer. How about Ada Lovelace [The Ada language was named for her] the very first computer programmer ! Do google search on each for details.
I have been a computer programmer for 48 years [I still work for clients] and enjoyed the various comments etc.

Ken on July 19, 2006 9:57 PM

"I agree with many people that the given C example is riddled with hidden lessons/assumptions that actual programmers have learned. The '=' as an assignment is confusing since equality is a test, not an implication of transferrence or copying."

I couldnt agree more. The test is already biased towards people that have programming knowledge, (especially C related languages). It isnt doing non-programmers any favours, not exactly a level playing field of a test.

PS Jeff - shouldnt you get a few words to enter when posting? i'm sure a spammer could work out "orange" is the word quite quickly :-)

Paul on July 20, 2006 6:23 AM

"I agree with many people that the given C example is riddled with hidden lessons/assumptions that actual programmers have learned. The '=' as an assignment is confusing since equality is a test, not an implication of transferrence or copying."

I think the programming language is lesson important to be concerned about than the ability to just let things stand for other things. Choosing a language where 'a' is the assignment operator and other symbols are chosen compeltely randomly would be bad, but using = at least gives some people a clue of what is going on. I think it is key to note people using the = consistently is what is being looked at(I think) not necesssarily them using the = operator correctly.

(let ((a 10) (b 20)) (let ((a b)) a))

Gives new people less of a clue as to whats going on that the c code does. It would be interesting to see what would happen with a test like that.

You could even go with something like pascal assignment using
int a := 10;
int b := 20;
a := b;

But i think the slight ambiguity in the = operator actually tests whether or not a person will use that symbol consistently(even though it is tempting not to) which is what is really important.

Stephen on July 20, 2006 8:25 AM

int a = 10
int b = 20
a = b

In my mindset, a = b = 10, but then again I'm a basic programmer anyway. (Even tho that's sort of like me blaming almost failing English 10 on the position of Mars)

Raekuul on July 22, 2006 7:46 AM

I enjoy coding. I enjoyed algebra but did not like geometry. My response to geometry was, "Prove it? What do you mean, prove it. It is intuitively obvious."

Janet on July 23, 2006 1:27 AM

Maybe further instructions would help? Although I think the test would work, perhaps something like:

"where the equals sign is an operation of some kind. Decide what operation you want this to be an apply it consistently across all the following problems."

Or would that be explaining too much?

Bill M on July 23, 2006 4:38 PM

What pointless emphasis on the mechanics of software! Writing software is a creative process, much like writing a story. Like any other subject taught in schools, you love it, are indifferent to it or you hate it. Grasp of a language and programming concepts are the required underpinnings for being a software engineer, but do not begin to describe the experience of creating successful programs, any more than a comprehensive grasp of English will make you Stephen King. It is facile to try to identify a successful formula for churning out talented logicians, mathematicians, writers or any other human endeavour. It simply identifies the limitations and prejudices of the so-called "educators" conducting the study, and their fears of being caught out if they depart from the line of pretending to teach the self-motivated and ignoring the unmotivated.

Paul O'Brien on July 24, 2006 4:43 AM

How do people with no capacity to grasp basic programming concepts function in real life?

Programming is modelling; It's a map / territory thing. Someone who can't learn to program likely can't read or draw a map of any kind. How do they engage the real world? A human needs a sufficient understanding of real world processes to draw a map of those processes with enough truth to predict the consequences of their actions. A grasp of the rules of gravity, for example, is quite useful.

Fred on July 24, 2006 6:22 AM

Interesting - the last I read on the the nature/nurture debate splits things at 50/50. Looks like there is some hardwired circuitry for programming that is either there or not.

The naysayers should realize that the article is based on experience not an educational theory.

Mark on July 24, 2006 7:35 AM

What an odd question. Actually, I have no background in programming, and will start my first programming class in a month or so. Logically, a cannot equal b, so you have to look for other options. Without any context and without any history to base your decisions on, the answer could be any of them, because it is impossible to determine the value of =. = could very well be a modifier for the word 'int', then create a completely different meaning. If 'int' meant 'multiply this by 0', that changes the whole context, and a=b is no longer a logical difficulty. I'd say they're insinuating that there's a definition of what 'int' and '=' mean, and expecting you to know that. Or... what if ; meant stop doing everything here. A would = 10, and b would never occur, and the closest answer for b would b 0.

My background is actually in psychology, and I'm going back to school for UI design. That's a straight up invalid test, similar to the 'IQ' tests that favor one culture over another because of the language used. They're assuming that the person has at least seen a programming language before. Personally, I wouldn't want them as teachers.

AL on July 24, 2006 10:16 PM

Bring back cobol

01 A PIC 99.
01 B PIC 99.
MOVE A TO B.

Its not rocket science.

Burt D on July 27, 2006 2:50 AM

As someone who has been programming for a while, I'd like to say that that is a pretty bad question. Sure, it's glaringly obvious to us, but it doesn't just test assignment to variables; it also tests the ability to comprehend syntax by just looking at it.

Lvalues and rvalues are a trivial concept, but it's pure convention that says "the left side gets the result of the right side." It's implied to some extent when the variables are initialized, but this tests the ability to immediately comprehend foreign syntax correctly. If I had never seen code before, I'd say that that either they're both 10 or that they're both 20 - but I wouldn't be at all sure.

I think it's certainly true that some people have brains that are "wired" for programming, and some don't - like anything else, it's a talent that people have to a greater or lesser degree. However, the concept of assignment is simple enough that it can be taught to almost anyone with not too much difficulty.

I find it mind-boggling that people couldn't learn the concept of assignment after 3 weeks of class, to the point where I think the error is as much in the instructor as the students. Assignment is as simple as putting an object in a box - that's it.

I've had to take a "beginning computer programming" course before, already knowing the language, and I've found that instructors, even the good ones, can be pretty obtuse to beginners. On the first day, students don't need to know that a variable represents a specific location in memory, how it's possible to overflow a variable, or the representation of a floating-point number. Instead, they should get a solid idea of assignment in the abstract: you've got boxes that can hold one piece of data, and each box has its own name. If you put a new object in a box, you've got to take the old one out first.

Once the students have CONCEPTUAL understanding, you can talk about implementation, syntax, and everything else. Talking about the stack and the instruction pointer on the first day just makes students' eyese glaze over, and reinforces the idea that "nobody but a supergenius could ever learn this stuff!" (direct quote from a person whom I helped in a programming class, who went on to understand the basic concepts pretty well).

Teach the concepts, and all else will follow.

Pete on July 27, 2006 5:19 PM

"I find it mind-boggling that people couldn't learn the concept of assignment after 3 weeks of class"

That is not what this study is about. At the first test, the students had no experience with programming. That meant that to solve the questions, they had to create their own model/ruleset about the way assignment works. Students who were able to create a model and use that model consistently for all the questions in the first test, scored on average better on the course exam, than students who didn't consistently use the same model.

The key word here is consistently. Did the student create a model and stuck with it, or did he use different models for different questions (or was he just guessing). What particular model he used didn't matter.

The course exam probably didn't just test understanding of assignment, but also if else constructs, loops, and other subjects. The point is that consistency in the study's test is a good indicator of how well the student would do in the exam.

Thijs on July 28, 2006 10:54 AM

So, where's the FRIGGIN test???

And why is the captcha always Orange? Is this blog based in Florida?

mcgurk on August 2, 2006 6:04 AM

Some comments here (and elsewhere) attack the test's validity on the basis that it requires the taker to have some prior understanding of a programming language or at least programming concepts.

I'd like to support Thijs by reiterating that this is NOT what is being tested - the marking criteria, as can be seen at http://www.cs.mdx.ac.uk/research/PhDArea/saeed/ are based on the *consistency* of response and have nothing to do with the "correct" answer under a given programming paradigm.

It is not culturally specific (or at least the culture that it specifies is incredibly broad and hardly exclusive); all that is needed is an understanding of the relationship implied by an equals sign, which anyone with any sort of background in mathematics can deduce in this context.

Adam on August 9, 2006 3:40 AM

Okay, just finished reading all the comments and the actual paper and results. Just to give you some background, I am someone who made it about half-way through a CS degree before dropping out due to a divorce, I have been a professional programmer for about 8 years, I've written successful products, and programming frameworks from scratch, and these days I can keep up just fine with PhD CS folks (not trying to brag, just trying to keep my background accurate and short).

Let me see if I have this right: The results indicate that there is a correlation between people who can derive a consistent mental model for answering these questions, and people who make it through an introductory programming course.

First of all, I think I appreciate the objectivity of the paper better after reading it--at first, like many posters, I saw this experiment as extremely biased towards people with a previous understanding of the assignment operator. Now I see how that is eliminated that by allowing multiple "right" answers so long as a consistent model is applied.

All that said, I think there are several really dangerous assumptions that this paper draws from these results, and which it implies in its conclusion.

1) That the "consistent mental model" required to learn programming is something inherent, that learning to think in the consistent manner necessary for programming cannot be taught.

2) That the 61 students across only TWO courses surveyed at TWO universities is sufficient data for drawing such conclusions.

3) That these two courses (or any intro CS course) provide suitable instruction for students to learn the "consistent mental model" necessary for programming.

Now obviously this last point happens to line up with already established evidence (based on far more more data) that apparently very few intro CS programs succeed in teaching basic programming to all students who enroll (the double-hump phenomenon). But there are a lot of other factors at work here:

1) Most universities don't have the facilities to support getting everyone who enrolls in their CS program through the whole program.

2) Most intro CS classes are over-crowded.

3)The previous programming experience of students in intro CS classes is extremely diverse, with some students already being semi-skilled programmers, and others having no exposure at all. The lowest common denominator is REALLY far away from the highest.

While one could argue that all this is irrevelant to the research, my point is that these conditions are prevelant (though not univeral) in colleges across the world, and that it affects the way that intro CS teaching gets done. This study rushes to the conclusion that these results point to something inherent about the students, without considering it may have something more to do with widespread conditions placed on the classrooms and teachers. Just because a lot of teachers in the trenches have experienced the double-hump phenomenon and couldn't seem to beat it doesn't prove it is inherent to some wiring in the students. If you live in the Arctic, you'll quickly assert that all bears are white--that doesn't make it true.

I'm just supposing here, but I bet those students who need some practice and attention (perhaps some help that would go towards learning a more consistent mental model) don't get the attention and encouragement they need. They are thrown into the midst of cryptic syntax, alongside a bunch of folks who already seem to understand it naturally, and they get discouraged very quickly because they don't pick it up as fast. The classroom is huge, the teacher has way too many students, and doesn't have time to bring the stragglers up to speed. Especially when the stragglers may become quickly demotivated in an environment where the subject matter comes so easily to some students. Just my opinion, but I think this phenomenon comes much closer to explaining the double-hump.

Of course, I do not submit all this not as a counter-theory--I have no data--but it is an argument that this study is pretty anecdotal and not good science. Many extremely subjective statements are presented as fact and the author's bias is made obvious in the introduction.

"We point out that programming teaching is useless for those who are bound to fail and pointless for those who are certain to succeed."

That's a pretty broad statement, don't you think?

So here are some anecdotes of my own (and at least I present them as such):

I taught two semesters of programming in a continuing education program (voluntary, small classroom, no grades, no pressure) and everyone could do basic programs by the end of it. No drop-outs. Of course, the make-up of my student population was biased because no one was trying to meet "core requirements"--everyone wanted to be there. Nonetheless, one student had an extremely difficult time, and required a great deal of one-on-one attention. As another teacher described, after enough practice, one day, it finally just "clicked" for her.

What is the difference between this student and the thousands that drop out of intro CS courses every year? I'll tell you I think it has nothing to do with some hard-wired gene for programming. That is just old-fashioned bigotry.

Personally I think there are two simple factors:

-The teacher's skill and experience with teaching, their patience and motivation, and their time-capacity for encouragement and one-on-one attention
-The students attitude and motivation to learn the material

Those two things added up, and I believe there is very little that cannot be learned.

Jesse on August 30, 2006 1:40 PM

Hello, before I lay down my views on the subject, a few things about me. I'm 25 yo, and I studyed programming and computer science for 12 years, starting from fifth grade. From 5th to 8th there were 2 hours of programming a week, on old Z80 / BASIC machines - very "light" (so to speeak) stuff - basic programming, basic control structures etc - and if memory serves, the course was suspended during 7th and 8th grade. From highschool(wich was CS) began the real heavy teaching, pascal, structured programming, intensive etc. And then there was the university - electrical engineering and CS. I am currently working as a programmer, employed by a software company - and I am very successfull in my work. Here are my opinions, based on my personal experience as a student of various institutions (I never taught):

1) There is definitely a programming gene, a natural, inborn ability to program. And yes, those who lack this will never be able to program computers. I still remember the first programming course - I had seen and played on computers before, but had no ideea about programming. From that very first course I was like: "hey, I understand this perfectly, this makes perfect sense, this is so easy - this is NATURAL". And I was perplexed that the others couldn't understand programming. After only a couple of courses, I was one of the two or maybe three "freaks" in the class, those who could understand programming perfectly. Thoughout highschool and university, I have seen bad teachers, excellent teachers, good and bad teaching, but the double hump was allways there, and nothing could be done about it. There were those (few) who could, and those who couldn't (well eventually, after years of hammering, they could write basic programs, and had a general grasp of programming, but not enough to become programming professionals - most of them don't even work in IT). And another true thing - the teaching is too slow, tuned to the rythm of the "goats". The "sheep" were devouring the books, learning several lessons in one session, were 1-2-3 semesters ahead of schedule, reading 10th grade manuals in 9th grade, languages, general algorythms etc. No other course was like this, there were no students lo learn math ahead of schedule, or physics, or whatever. Meanwile, the rest were struggling and going through all imaginable hell. I was perplexed - why can't they learn, what is so difficult, what is their problem? In the end, many were relieved to have finished highscool, and never have to see programming ever again.

2) About sexism - nobody can tell me there is no link between gender and programming ability. I once watched a documentary about the human mind, basic psychology and stuff, and one ideea was this: men have an inborn ability towards exact, mathematic, and engineering fields, and make "excellent nerds", while women are far better at psychology, human behaviour and interpersonal skills. This is clear as night and day. CS highscools were almost all male with as few as 2 girls out of 30 in one class. CS and electrical profiles in the faculty were all male. Languages, psychology were almost all female. I recently went to job interviews to several software companyes. The programmers/technical were all males, the same "nerds" and "geeks" types I saw in highscool and faculty. Human resources were all female, all of them.
As a sidenote, both my parents are programmers, my father is an expert, my mother barely strugles with some basic database software.

3) I am not shure about the test. The results sound interesting, but I am not convinced. I tryed to imagine how I would have fared back then, before any programming course - and frankly, I don't know. I do believe that programming is special, set aside from all the other objects, and needs specialised testing and evaluation - and specialised aproach of all aspects. As I said, I am not convinced that some test for some basic mind patterns could be the panacea. What I sugest, before admitting students, teach some basic programming, logic, algorythms - just a couple of courses - and then do lots of evaluations. As I said earlier, the sheep are identified very quikly.

4) For a teaching, introductory language, I swear by Pascal. People say it's a "comunist language", but it forges a coding discipline and clarity that I personaly value greatly. I consider myself lucky to have studied pascal, before moving to c/c++. Hated JAVA...

These I my personal and highly subjective opinions. Please excuse my english...

Dragos on August 31, 2006 1:06 AM

Hi, I'm a professor of physics. And a woman. There's definitely another factor at work here: confidence. If you were unconfident you would probably switch up the rules you were using to answer the questions just in the hopes of getting it right some of the time. That says nothing about your innate intelligence, just your confidence. I've given a lot of oral exams to students in a 101-level course and have found that the unconfident ones often know the material but it needs to be coaxed out of them because of the barrier that lack of confidence presents.

I'd also like to add a few other things that need to be said:
1. This experiment does not do a thorough enough job of testing the possible parameters. These profs should collaborate with a wide range of other CS profs at different colleges who teach classes of varying size and use different teaching techniques. I know a woman CS prof at U of Maryland who can teach anyone to program.
2. If the authors of the study really want to investigate this fully they should do several case studies where they do in-depth assessments with students from all over the double hump. Ask the students what their background is with computers, how comfortable they feel using them (ie, confidence level), etc.
3. Dragos, watching a documentary does not make you an expert. Any and all "facts" on television carry a bias. Part of the lack of women in your CS classes has been the slow-to-change phenomenon of available mentors. As more women become the teachers of CS classes more women will take them and feel like they belong. Also, in many cultures (including US culture) the patriarchal way of life keeps women down and discourages them from achieving more than their male counterparts. These seemingly small effects add up to a society that lacks women programmers. It is a social commentary, not a genetic one.

-Kristine

Kristine on September 8, 2006 8:11 PM

What a weird choice of "sheep" and "goats" as an analogy, and what a weird way to assign which were the sheep and which were the goats. Anybody that knows anything about sheep and goats knows that sheep are really really not very smart at all, and being called a sheep is a bit of an insult, whereas goats are much more clever and resourceful, much harder to keep confined, impossible to herd, devour anything and everything.

Given that managing programmers has commonly been described as "trying to herd cats", mapping good programmers to sheep seems particularly inept.

SteveC on January 30, 2007 6:43 AM

in response to dragos:

1) There is definitely a programming gene
re:
The problem i see with this opinion is that it is based on experience, but it doesn't take into account nurture. Perhaps in your first programing course, you had already been introduced to logical relationships in one way or another, and understood some basics about giving instructions and potential pitfalls; whereas the individuals who couldn't grasp it, had never really been introduced to these concepts. It could be that we are trying to teach a baby to run before they know how to crawl... which would only result in lots of skinned knees and a few concussions. Since you already knew how to crawl, it was easier for you to stand up and run.

2) gender differences
re:
Documentaries can be wrong, and a lot of them have been. I could argue, in the same manner, that since most girls play with dolls, it is the doll, not gender, that causes a lack of interest in programming.
Could it be that because as a culture, we assume girls will like pink and dolls, and then go ahead and stick them in a pink baby room with doll, that they like dolls because of the situation, and not because of a predisposition? How many countless families perpetuate this view, and thus perpetuate the situation in our culture. The classic case of self-fulfilling prophecy. Because we assume girls have this predisposition to psychology, we (as a net sum) unknowingly force them in that position.
In my highschool, when a conflict arose, boys were given gym, and girls were given home-ek... is it no wonder that most of the boys at my school assume girls liked home-ek and vice versa. It really had nothing to do with their predisposition, but instead having to do with the presumptions of faculty. Is it that far off basis that, as a whole, most schools do the same thing when it comes to psychology and comp-ed courses; thusly creating this mass assumption that boys are better at it than girls?
Correlation does not equal causation.

3)
programing is the act of instructing a computer to do things, and using the application of logic to make it do things that you want it to. Instructions is a form of communication, in essence, you are coaxing a computer to do something for you. And logic is an abstract form of looking at how we solve problems and arguments. It typically takes a lot of logic to preform well in math. And the instructions usually require an understanding of how a computer works (ie, writing to the appropriate audience).

4)
I bet your code isn't very object-oriented.


apeinago on January 30, 2007 1:57 PM

I've seen a comment here that complained about programming teaching being biased towards the imperative paradigm, and making it the supposed reason for the situation where so many people just can't get it.

I'll admit that I'm a novice at functional programming, and I know almost nothing about logic programming, but anyway...I still can't understand something: Is it really easiest to understand everything in computing in terms of functional programming?

Say, how can you explain a data structure such as a hash table, or say, explain how a garbage collector operates at runtime, with the functional programming mindset?

Another thing, why is it that pseudo-code, the preferred formal method for describing algorithms [at least in academic papers that is], is distinctively "imperative"? I'm just talking out of my own experience here ... Maybe that has changed in recent times? Almost all of the programmers I know are more comfortable with imperative programming, though there is no argument functional programming is vastly more expressive/powerful in many cases. The best programmers can think in whatever paradigm suits the problem best, but I can't think of a single programmer who can easily understand functional programming, and still struggles with imperative programming.

yonil on January 30, 2007 3:50 PM

I remember my ( Stage 2 ) lecturer talking about some code a student was having trouble with :
--
int i = 0;
while(i<100)
anArray[i] = 0;
--

Now, this was in a second year course, with 2 pre-req papers, both of which cover a C-like language.

Personally, i think that these crap^W bad programmers exist because of the flawed teaching system. The stage 1 courses cover OOP, indentation, drawing flowcharts, comments, GUI buttons, etc but miss one important thing : teaching students about what code is. E.g., what happens when you run "a = b;". Students who don't instinctively get this fail because they never learn it properly and instead spend hours messing around in a circle. Also, at a higher level i see students who abuse recursion, or write f-ing massive switch statements when a simple bit of bit-or/and-ing, etc would have made it 2 lines.

Once i saw the source to this chess game a student was writing, he had used a separate array for each piece for each side. So he had a blackPawns array, a whitePawns array, and so on. Yep. So you can imagine what a mess the code to draw the board with these 12 arrays was. He hadn't done the code for the simple A.I. the computer side was going to have, because (surprise) it was going to be very hard. So i recommended the he use a 8x8 array of Pieces for the board, and have the Pawn class extend the Piece Class, and have white/black flag(s), empty spots are null, etc. Right ? (Hopefully) This is a pretty simple and standard way of writing it. His first response was "How do you check if a spot is empty?", i was about to say that you check if the element is == to null. His way of doing it ? "Catch the NullPointer exception." He didn't take my advice to use a 2D array for the board, and as far as i know is still trying to write the huge amount of code to handle the movement checks or A.I. To give you an idea of the extra work it would need :
His code :
bool isEmpty(int x, int y){
for(int i = 0; i < ...;i++)
if(writePawns[i].getX() == x && whitePawns[i].getY() == y) return false;
[ copy + paste * 11 ]
return true;
}
My Code ?
return board[x][j] == null;

Matthew on January 30, 2007 4:09 PM

I find it curios that only one poster commented on the imperative nature of this test.

It would be interesting to see what results would follow if they'd choose a purley functional model of programming.

I can even imagine that the dichotomy isn't between ability to program or not but rather affinity towards functional programming v. affinity towards imperative programming.

John Nilsson on January 30, 2007 11:37 PM

as far as i can see the test has nothing to do with imperative programming. one could devise a mental model which concurrently processed the 3 statements and still pass the test IFF you use the same model on the other questions.

jk on February 7, 2007 6:13 AM

I think the test should be in some meta-language pseudo-code because intelligent people good at algebra and math but have never touched a programming language in their lives doesn't have to know that in something called C programming language "=" is an assignment operation. Maybe something like.

BEGIN PROGRAM
x <- 10
y <- 20
x <- b
END PROGRAM

What are the values of x and y at the end of the PROGRAM.

AndresVia on February 27, 2007 4:58 AM

People are going to lynch me for this, but those inventing pseudo-language are a bit silly. There's already a perfect language for this: COBOL

Granted, my COBOL is incredibly rusty, so I probably can't write code that compiles here, and it would be best to leave the division separators off, or, in fact, the whole data division, but:

MOVE 10 TO A
MOVE 20 TO B
MOVE B TO A

With a note that 'MOVE leaves the first value intact' if needed. (Or make it 'COPY' instead.)

In fact, this is basically what COBOL was designed for...having non-programmer readable programming language, and the reason it's such a joke is that, as this article points out, that doesn't actually work. Certain people simple cannot parse programming languages, no matter how simple the languages are.

It's not a matter of intelligence, I've known very very smart people who passed programming course by 'faking it' by copying and pasting code they knew worked, and I've known pretty dumb-in-other-respects people who could write code just fine.

'Sequence' is a big one that programmers who have not tried to teach simply won't believe, but there are people who simply do not order statements in their mind when evaluating them. They know to do it, they just look at blocks of code as a gestalt, and see a=10, and that's the right answer. This isn't due to intelligence or even knowledge level, it's something like dyslexia. Just like people with dyslexia can manually go letter by letter to get a word, they can manually run them in order, but that's very hard when loops or recursion or functions are involved.

There are, indeed, entire groups of people who *cannot* be programmers, will *never* be programmers, and really should be encouraged into some other line of work at the start of their programming education. Just like someone with dyslexia probably shouldn't be a copy-editor.

Now, if someone wants to star in their own made-for-TV movie about how they overcame hardship to do what they loved to do, that's one thing, but honestly, most of the people just heard their was a lot of money in computers, and should be firmly encouraged into law or something else where they aren't going to always be struggling just to understand what's going on.

Hrm. No preview. Well, let's hope this is right.

DavidTC on February 27, 2007 10:37 AM

Let the compiler/assembler/interpreter sort it out. Everything else is subjective.

Michael on February 27, 2007 1:40 PM

"...not a perfect divider of programming sheep from non-programming goats..."

I don't like that for some reason. I think we're programming goats, and they're non-programming sheep.

Casey R. on February 27, 2007 1:56 PM

Actually goats are the more intelligent animal. Sheep are mindless. While from the perspective of archaic theology that values conformity over independence or intelligence, sheep may be preferred, the metaphor should be reversed for dividing programmers from wannabes.

Joshua Mostafa on February 27, 2007 2:34 PM

I have not seen it mentioned, but the US Gov has known about this since the 60's. They still use the same test for programmers, the ADPE ( Automated Data Processing Exam ). It consists of four sections, word association, numerical sequencing, memory, and dimensional correlation.

The failure rate for the tech training was around 80-90% as well.

SSgt on February 27, 2007 4:53 PM

I think it's interesting that so many respondents seem to see the mere possibility of a test that *may* reliably indicate programming talent or the lack thereof as being somehow threatening or pejorative. Have we really come to the place where an individual is lessened somehow if they don't possess all talents? I guess I should really reexamine my value to society since I'm a pretty good programmer but I can't carry a tune to save my life?

One of the things that intrigued me about the study is that it reminded me of discussions I've had with my wife. She is a top-notch educator with 30+ years experience and she has often mentioned that she thinks our institutions of higher learning should have an effective way to detect and discourage education majors who have absolutely no talent for the vocation. Her reasoning is that it is a disservice to the college students to allow them to spend so much of their time and money pursuing something they will never excel at and that it is also a disservice to the future students who wind up in their classrooms. I think the same reasoning can be applied to CS majors who have no talent for the trade. They suffer because they don't measure up in their jobs and those of us who come after them suffer when we spend our time cleaning up their mistakes.

I think it's important to strive for excellence in all areas but there are some areas where individuals will never achieve excellence because those individuals are not well suited for that particular type of endeavor. That doesn't mean we should prohibit them from pursuing those goals if they're set on doing so but it might be helpful to them to know that it's likely to be an uphill climb; we can leave certainly leave the final decision to them.

Carl Bauman on February 28, 2007 7:47 AM

Mr. Bauman,
I agree with what you and your wife say, however, I don't think you realize why it's not happening: Departments need numbers of students to get funding, building space, faculty, staff, etc. So they suck in every student they can and help them as much as they feel like whether they have a shot or not.

I think it's reticent of one of the biggest problems with bureaucracy: It puts money where it's needed in strange ways that have nothing to do with the the industry and everything to do with the number of people and their ability to fill out useless forms. And it rewards bad spending!

It's possible that not every school has this glaring problem and that some may actually deeply care about the students well being and education, but I'd bet most are more like this.


Also, to other commenters: You're not reading the study. Their conclusion was that the group that fairs the best is the group who finds a consistent model (whether it's C like or not) and sticks with it. They also found that not much changes after they understand the syntax.
And if you really want a familiar syntax you should use an algebraic syntax:
a=5
b=6
a=b

Unfortunately, this still doesn't make sense as algebra is formed without statements. This is more similar to formal proof language where you setup some variables early on (except you don't assign numbers, obviously).


However, back to your idea Mr. Bauman. I think the way to do this would be private industry placement exams taken between high school and your sophomore year of college (it doesn't make much difference if you take the wrong major in your freshman year, especially if you're in the right college -- as in college inside a university system).
So students could pay for exams that would say if they have aptitude for a given field. You could add a general aptitude test to give them some direction, but most students would likely be able to guess based on their personal history.

Charge $50 for a test like this and give nice results. I imagine you could get quite a few students on board! You might need to hire overpriced PhD's to "back" your tests though, in which case you can charge $150 for the exams.

Chris on February 28, 2007 4:16 PM

My take on it is that the Teacher is inexperienced. I've not seen that sort of results in the night classes I taught for Harnell college in King City, CA and surrounding areas. At least after the first 3 or 4 years of teaching.

I believe that most "intro to computer" classes are taught by graduate students. As a group they tend to assume that Everybody already knows the basics. By the time they grasp how to teach the novice, if they ever do, they’ve moved on and a new inexperienced teacher takes their place.

Bob Durtschi

Bob Durtschi on March 1, 2007 10:17 AM

I think all the comments to the effect that "a = b is bad syntax" miss the point entirely. The test isn't about whether this represents good syntax or not - it's about whether the student will do well in CS or not. You can argue all you want about this syntax, but if this test is a good predictor, that's all that counts. If it's bad syntax, then apparently an intuitive understanding of this very bad syntax is a good predictor of success in CS - the fact that it's bad syntax is entirely off the point.

For the record, I never thought it was bad syntax. Any math person understands things like "let x = 15. Then x+5 is 20. Now let x=20. Then x+5 is 25". Nobody gets confused and says "Wait! You just said x=15 which means it can't be 20!". On the other hand "x=20+5. Then x=25. Oh, wait, now x=30." is confusing. It just depends on whether you're using "=" as a declarative statement about the permanent and necessary value of x or whether you're using it as a verb to consider x to have a value of 15 for the moment. Both are used in standard math without confusion so I never really understood people's confusion about the verb sort of usage in languages. Some languages us "let" or "set" to clarify, which I guess makes it a bit clearer that the verb form is being used, but it seems a bit unnecessary to me.

I like the guy's comments about meaninglessness. I remember trying to teach my mom a bit of programming. If I would write down "age=20" she would immediately pipe in "no, that's not my age!". I'd try to explain that it's just a name but no amount of explaining would do. Finally I'd change it to "x=20" in an attempt to divorce it from the meaning she was assigning it. At that point she'd ask what "x" was. I'd have to tell her we were using it to represent her age and we'd be back to "but I'm not 20!". She wasn't able to accept that "x" or "age" is meaningless in the context of the program and had to know what it "stood for" at which point all sorts of real life connotations would flood in making it impossible for her to understand what was going on.

Darrell Plank on March 3, 2007 10:03 PM

This problem has puzzled me for years. I learned programming myself, with able tutoring from a friend. In turn, I've tried to teach others, some smarter than me, some not. There were some that picked up the concepts and then built on them. Others had great difficulty with the basic principles - and even when they'd gotten them, could not seem to carry forward with what they'd just learned.

I've always wondered at this difference. Looking back at my own history, I've also been curious why certain populations thrived in the school environment but never seemed to really grasp complex subjects - and vice-versa, some of the best minds felt totally out of place and suffered during their school career.

This essay really opened my eyes, and explained so much of why I felt out of place in school:
http://www.reciprocality.org/Reciprocality/r0/Day1.html
(if the comments don't allow links, google the words
mappers,packers,software and look for the link "Thinking about Thinking".

I don't attach a value judgement to mapper vs. packer, each have their place; and of course no one is all one or the other, it's a continuum. Still, it's a useful mental model when thinking about the issues this blog post has raised.

Tom Biggs on March 7, 2007 7:28 AM

I have the advantage that I know Richard Bornat, the author of this paper. A lot of the comments on him here make completely false assumptions. In particular, he wrote his own programming text book many years ago which was quite well-known in its time, and he was an expert in functional programming, which he taught. So the idea that he's fixated on imperative programming, or just some dumb person trying to teach from a prescribed textbook is wrong, wrong, wrong.

Richard Bornat was Head of Department at the university Computer Science department where I teach when I joined it as a new lecturer (he's now moved on to another university for various reasons). He taught introductory programming, and I taught it for several years after him.

Every year we used to get into fits of depression - and I'm seeing it with the new guys who are teaching intro programming now - just WHY can't the students get it? We've tried everything - functional first, objects first, back to imperative first, use an IDE, don't use an IDE, use a language they use in industry, use a simple teaching language etc etc - and the SAME pattern still happens, a huge proportion of those on the intro programming course either fail or ought to fail (sometimes we just have to be lenient on the passing requirements since if we failed too many we might lose our jobs).

What's more, if you look at the big conferences on teaching Computer Science, you'll find people saying the same thing the world over. No-one seems to have hit on a way of teaching intro programming so that most people who take the course pick it up and end up competent in it. If there was such a way, and Bornat and me and everyone else who teaches intro programming are just bad teachers, wouldn't that way have become apparent by now?

Bornat's also a political lefty, the sort of person who naturally recoils from the idea that there are innate born abilities, with people naturally divided into categories. He's certainly not saying this because it suits his ideology. No, he's saying it because it reflects his long experience of trying to teach programming. It seems there really is a divide between those who "get" programming and those who don't.

The test he's using here is acknowledged to be really simplistic, an observation which might be taken further, but with statistics so clear it's obvious something is happening. If you read the paper, it's clear it's not a test on whether you've previously encountered C-style assignment statements as many of the detractors have suggested (did they actually read it before commenting?)

Matthew Huntbach on March 16, 2007 6:21 AM

I'm with the people who vote that the teachers sound pretty bad. IMHO the entire metaphor for dealing with concepts on computers is changing, and more control is being given to users.

I have found some programmers to have fluid powers of conceptualization and good powers of communication. Others are fairly rigid. Luckily, there are programming languages and jobs for all different types of people.

I, on the other hand, am in the "oh jeez, that makes my pupils dilate and I must sleep immediately" category.

Kate on March 19, 2007 10:03 AM

Two interpretations, not necessarily consistent:

1 - Only one person even hinted at the fact that those who best perceive abstraction would vary their answers. Test takers presumably aim for the most correct answers. There is no sound reason to assign a particular function to the '=' operator (its resemblance to algebraic and programming usage is irrelevant and misleading). Thus one would have to be a gambler (most programmers are not) or a sheep to consistently assign it the same function. An actual rational actor would define the most likely interpretations - say, it either shifts the value right to left or vice-versa - and alternate between them, shooting for the highest possible score. The sheep, however, finds one answer that works, and sticks to it. Later, they will be told which one is correct and stick to that. They make good byte pushers because they uphold the banner of standards and conformity and ensure that everything is always "ready for the enterprise." Goats tend to wander off and explore flights of fancy (variables can not be assigned as values to other variables, so the value of the variable a is now the string "b".) Requires more intelligence and a more thorough insight into abstraction and the arbitrariness of formal systems, but they never get any work done.

2 - OK, so those who were consistent in their (incorrect) model of '=' over the first few WEEKS of this class did better than those who perceived the need for consistent interpretation, but changed their interpretation after they presumably learned (or got an idea of) how '=' works in nearly all commonly used programming languages?

NOTE: I'm perfectly ready to accept that there are people who can and can't program. And I thought this study was interesting, but that the reasoning and interpretation need some serious tweaking. As a sociological study, it seems to be about as rigorously and scientifically constructed as most of those done by sociologists. Now, you CS and Engineering guys wander down to the Sociology department and tell me if you're comfortable with that comparison.

Alex Gretlein on March 19, 2007 6:04 PM

This test was refuted by a trio of Australian computer science researchers. They found no correlation between the "consistent" group and the group that passed their intro-to-CS course.

anon on April 4, 2007 10:05 AM

While I understand the motivation, this test is just badly designed.

After reading the paper I find that the results simply needed a lot of guesswork to interpret, even without considering that they had problems mapping the results from the first administration to those from the second administration, i.e, some subjects couldn't remember the pseudonames they had used for the first administration.

Besides, the Java model of assignment is simply not intuitive.
Maybe if the background of the experimenters where in ML, Python, Haskell or [insert name of well-designed language here], the results would be interpreted differently (not to mention the test would be formulated differently). Or at least maybe they would have the sense to administer the test properly so they could then actually interpret the results.

Perhaps they were on a deadline to publish something. I might be offbase here but Saeed Dehnadi is a graduate student at Middlesex. This might be his first crack at the problem. Don't take it as gospel.

His mentor's (Richard Bornat), background is in Java so that might contribute slightly to the bias in the test. Even though he appears to be proficient at it.

Also, and I'm nitpicking now, Saeed's webpage has no title. This might be oversight or might be choice, but it suggests one of two possibilities, either he pays less attention to detail than he should or he lacks creativity. Admittedly, it could also mean he has little time for such things given all the incredible code he writes, you know, with lots of formal content.

Okay, I was being sarcastic, but I agree with Andrew Shebanow above, the last comment on page 16 of the paper is extremely arrogant and elitist. I mean, how would they stack up next to a software engineer at Googleplex?

FernandoGonzalez on April 7, 2007 7:29 AM

Philosophy is similar in many respects. Many people can argue, but few understand the rules of logic to form a coherent argument.

In philosophy, much like programming, you have to have the intellectual integrity to succumb to a logical argument. An argument is composed of 1: givens(axioms) 2: Logic. In order to refute an argument you have to 1: disagree with the Axioms or 2 Find fault in the logic. If you agree with the axioms and cannot find fault in the logic, you must always agree with the conclusion. No matter what. Its hard to grok at first, much like understanding that the computer has no clue what you MEANT to do. It will only do what you SAID to do.

Philosophy students have a similar problem understanding an axiom vs. logical operand in their first year.

brian on April 26, 2007 10:38 AM

Highly illogical paper. Who says we want to be taught?

Connelly Barnes on April 28, 2007 7:46 PM

I find it surprising that only two commentators mentioned that Intro to CS is usually a weeder course. Do they really *want* to teach the kids who don't know any programming, or have they set up the course (and this test) as a filter to find those who don't need an Intro to CS class.

Eli Gottlieb on May 12, 2007 9:00 PM

I had a teacher who was once in charge of grading the AP computer science test back when they still used Visual Basic. He ran statistics between correct answers on the questions and between the actual score the student got.

He found a few questions that, had they asked only those, could have scored students with something like 80-90% accuracy. The question with the highest correlation was this (sorry, I only know VB.NET syntax if this is off):

What is the value of a Boolean x after the following line of code?

x = (x = false)

1) x is always true
2) x is always false
3) x flips
4) x stays the same
5) None of the above

Basically, if a test-taker got this question right, s/he succeeded on the exam, and if s/he got this question wrong, they didn't do well.

Michael on May 29, 2007 4:27 PM

I think it's a similar number for mathematics. Some people just can't get it.

I went to a tech college for computers and remember all the moaning in algebra class. `It's worthless and a shouldn't be required computers come with a calculator. When am I ever going to need this junk.`

These where the same people who where lucky to do very poorly in the programming classes.

Matt on May 30, 2007 9:20 PM

before i started learning to program, i would have been in the 8% who refused to answer. i would have been appalled at this test, would have stopped execution of the task right at seeing the string "int".
my logic just refuses to go further if there are unclear details. and maybe that's why only assembly could lure me into trying to learn programming. no other language could. i'm serious. :)
so, what does the paper predict about the 8%? i don't see mention of that?
now, i'm still just learning, started it recently, can't say if i'm going to be a good programmer or not (i love assembly but i need to learn some other languages obviously to actually make serious programs), but now i'm at least able and willing to answer this test question :) (in the way a c++ programmer would.)
so it isn't true a (GOOD) course can't change some students. i don't like the generalization drawn from this test. but i do agree that you need some abilities to become a good programmer. i used to help classmates with math.. they were really dumb, i can't imagine them learning programming. not saying there is a very strong correlation between math and programming skills, friend hates math but can do cool stuff in programming.
oh and i said GOOD course! i did have a programming course in elementary school and absolutely didn't learn anything from it. for the same reason i would have been in the 8%. we were just told to copy the program lines and then press F5 or whatever to run the program (it was qbasic and pascal in the old times). no chance for me there. and i felt stupid too, i saw some guys were playing with the computers in the class in a cool way, and i had no clue, further discouraging me, preventing me from looking at programming, for about 10 years! so yes social circumstances and teaching quality do matter too..

cmon_ on June 3, 2007 7:27 PM

New programming students need time to learn to program, and master programming very well. Generally many get a lot of programming difficulties at the start of their course. Many are discouraged, and are afraid of subjects/modules that deal a lot with programming. Teaching programming is also a problem in many universities.

Programming should be for people good at mathematics. People who get good grades at math can understand programming well (even if it takes some time). I have also realised that some IT students can never understand programming. These are generally people not good/skilled in logics/maths.

Felix on June 24, 2007 10:46 AM

felix, you're right, you need to give time for practice (reading with little practice won't ever teach you to program). that got me thinking.. the paper on this subject could have gone wrong in one aspect: how much time did they give for students to get into programming / get comfortable with it? then lets assume the ones who'd been able to answer are the ones who'd already had some experience in programming.
(the other aspect is the quality of the teaching :) )

but, of course, one thing might eliminate this possibility: they did accept the solutions that were consistent even if not giving the "correct" solution. that doesn't require knowing any language, just having a strong enough sense of logic.

cmon_ on June 24, 2007 5:07 PM

This paper will never be published, seeing as it spends more time on petty insults directed at the people who will have to review it, than describing its findings.

John Hensley on July 15, 2007 2:28 PM

What exactly is meant by a "meaningless" statement in formal logic? They're not meaningless statements; in fact, they're statements with a very definite meaning, assuming they're defined. The computer blindly executes statements, it is a machine after all, but the way we approach the logic is not meaninglessly. x > y, say over integers, has a meaning, otherwise, we would have no idea what consequences it has or what it could imply in a particular context. When you read a computer program, x > y has a very definite meaning. Tell a mathematician that proofs are meaningless, and you're likely to get a whack in the head with something heavy and potentially sharp.

How often does a programmer sit there frustrated or wondering why the hell something he intended to express in a program isn't happening as expected? That is after all what a bug often is; a gap between the behavior intended and the behavior experienced. There are a million reasons why this could happen, many of which boil down to reasoning in absence of some knowledge (either a simply oversight, or lack of knowledge of an error elsewhere, or a misunderstanding). And rest assured, as we should all know, programmers are first and foremost excellent creators of bugs!

If I understand correctly, a claim is being made here that there are people who are incapable of understanding that the intended behavior can somehow not be isomorphic to the behavior observed. I'm not sure I understand, much less believe that statement. Reasoning used in programming is not somehow alien to people. Matthias Felleisen, previously of Rice University and now of Northeastern University, would probably go into one of his famous military-strength fits if he read this "paper". Programming is a discipline, and like any discipline, it requires discipline. A particular mindset is necessary to work effectively, and mindsets can change.

A more trivial claim perhaps is being made that people don't understand why they need to, say, add a ; after a statement, or end an expression with a ). I find this claim absurd, especially since syntax generally implies something: the ; tells the computer that the statement is ended, just as the parenthesis make something unambiguous. If there are programmers that think this is some concept that is inaccessible to some people, then I really question their ability to reason abstractly and their ability to form a big picture. Or, they must really suck at teaching something so basic from algebra.

Correlation is not causation. The conclusion is only as good as the premise. Garbage in, garbage out.

Bob the Chef on July 20, 2007 9:33 AM

I think Bob the Chef pointed out something important when learning to program.

> ability to reason abstractly and their ability to form a big picture

Also the ability to take rational/business requirements and transform them into, mostly, concrete logic. For my last semester in college I was able to take a graduate course to fulfill my credit requirements. I was appalled at the number of people in that class that couldn't abstract out the core process/idea behind a group of functions or processes.

One of our projects was to create a class library(dll) that would encapsulate the logic for a tic-tac-toe game. When discussing it in class it was amazing the number people that would want to print to console or pop up a message box when an error occurred. Just as scary were the number of people that would test the same things in the UI and logic layer, ie testing for a tie in the UI layer when the logic layer would "tell" you if there is a tie, or at least it should of from the specs given to us.

Just as disheartening when I was asked to help debug some classmates programs I found huge 15+ if blocks for testing if there was a winner or a tie. Why not just loop through all the rows and call one method that checks if that row is a winner. It was almost as if they didn't understand the concept of abstraction or rather didn't understand how to put into practice the concept of abstraction.

It worries me when I, as an undergraduate, feel smarter than 90% of a graduate course class. They have already been through what I am going through shouldn't they be better/smarter than me or not there at all? I hope that didn't sound to cocky I like to think I'm a little more humble than that.

I may not agree with what all of the paper says and some of the conclusions it comes to seem to be coming from incomplete/skewed data, but I do think that there are some people that just don't have the ability to wrap their heads around the concepts of programming like abstraction and polymorphism and the like, or the ability to break things down into logical steps.

Matt on July 20, 2007 11:45 AM

I read this before, it struck me as interesting. I came back to it and now it seems less interesting. It looks like yet another example of academics thinking that they are the gatekeepers to the world. That it is up to them to open the minds of the little people (those who are good enough to deserve their attention at any rate.)

I've gotten A's in some programming courses and F's in other ones. All of my teachers were quite sure of their own ideas about goto and comments and pointers and OO -- and I have seen since the same opinions and other opinions and opposite opinions in many different peoples mouths. All of them think they are saying something.

Everything I have learned I have learned on my own, just like English, just like sex. Stop taking yourselves so damn seriously -- you're just baby-sitters. Especially the college professors.

James D. Newman on September 3, 2007 1:04 AM

What's the correct answer, anyhow? I racked my brain and all I could come up with was none of the above.

Brian on October 24, 2007 6:27 PM

the answer is 20/20 haha... :)
this is nice website! Thanks!

Mete on November 6, 2007 12:05 PM

You know, I presented this to one of my programmer friends in this form:

a = 10;
b = 20;
a = b;

And he said it doesn't make any sense. I couldn't believe it until he told me that he interpreted it as a math problem and in math, that does make no sense.

Bad test design if you ask me.

If you had something like:

a <- 10
b <- 20
a <- b

I think the test results would of been significantly different

name on November 15, 2007 9:54 PM

Brian,

I'm not sure which question you were talking about, but if you were wanting to know the answer to the "x = (x = false)", then it is that x flips. If x was true before the statement, then true does not equal false. This makes the evaluation of the () part false. So, x gets assigned false. If x were false, then false DOES equal false, so x becomes true. Hope that helped!!


Everyone else,

But just to weigh in on the VERY old thread I stumbled upon here, I have a hard time going one way or the other. We all know those individuals who we have the damnedest time conveying the basics to. Those are often people who want as little to do with computers as possible. However, when it came to school, I think it is very clear to almost ANYONE who was a student that these two camps existed. But WHY did they exist? That is what the paper is trying to figure out.

There is one observation that I would like to make. Most of the students who did very well with little effort did so because they did much of this on their own. I know that this argument has been mentioned, but there is one correlation to this that i'm not sure has been mentioned. Students who are learning in his or her free time obviously have a greater passion for the subject. In the age of the internet, there is nothing that an individual cannot research on his or her own. If the student doesn't share drive of the better performing student, then maybe THAT is the reason the don't perform as well.

Basically, my point is the cowardly "agree with both sides" way of looking at it. lol. So maybe the one side is right that the test could potentially predict success. And maybe the other is correct that the test cannot predict who is CAPABLE of learning the material.

David on November 18, 2007 3:39 AM

To


Matt on July 20, 2007 11:45 AM

Since you can without a moment of thought, lash with little or no respect for those who are slowed in someway, i'll be seriously frank.


Im just begaining to step into the world of java programming and seeing your posts just irks me.
I've been thinking, a friend of mine have a "wired brain" just for programming, astonishingly, always the first to complete any homework within the given time frame.
And i noticed his other areas of study were completely wrecked, engineering maths etc.

So do i look down on his bad areas? Rather i look at how good he tries to coach us into this field.

Since i'm posting just to "bash", Matt you did best search yourself within and think over how much people you've insulted with those so called "harmless" comments. In the business model, i assume theres such a term called "win win situation".


Rather than posting how bad those people are, you could've help them those with sincere learning attitude but as you put it, zero ability to "pain abstract" out of nothing.


And for those who read and got to read by chance

A man with a beard with grey hair is my father, does that make all those with similar traits my god-father?

As said, there will be those with extraordinary gifted talents as well as those with it, struggled yet barely manage things.
However the latter always sees through hardwork.


So please,

if
either the teacher is willing to teach or the student loves programming.

Else

everything will be in Loop.

One does not learn how to walk, but one mimics.
Isn't that how most of us learn stuff? Memorizing the pattern until our internal minds sorts the pattern out to more logical thinking.

Therefore, if anyone here wana change the "programming world"
start with
Any Random Kindness, help those around.

j on November 29, 2007 6:00 AM

I don't have time for this crap (to busy programming) so I'll get straight to the point.

1. Some one with no prior programming experience is not going to know that = is an assignment operator and it is not fair to assume that they will infer it from the context of the question.

2. The question is further flawed by the use of the assignment operator (=) in the answers where a comparison operator (==), or plain English, could have been used. Instead the author is relying on the subjects prior experience with mathematical problems in which the = operator is equivalent to a comparison operator (==). Therefore, in the context of this question, = has two alternative meanings.

However it is likely that those students with an interest and/or experience in programming will have knowledge of both usages and successfully navigate the semantic of the question.

Furthermore I think it's a reasonable assumption that those students with interest and experience are more likely to be successful.

HENCE THE CORRELATION BETWEEN STUDENTS WHO DID WELL ON THIS TEST AND THOSE WHO DID WELL IN THE CLASS.

In short your question is flawed and your science is crap. I believe this revised question would yield a surprising increase in the number of students able to answer correctly.

--

In the C programming language the = operator copies the value of one variable into another. Read the following statements and tick the box next to the correct answer.

int a = 10;
int b = 20;
a = b;

The new values of a and b are:
20 and 0 respectively
20 and 20 respectively
0 and 10 respectively
10 and 10 respectively
30 and 20 respectively
30 and 0 respectively
10 and 30 respectively
0 and 30 respectively
10 and 20 respectively
20 and 10 respectively

--

I can be contacted at the following email address memeticvirus [insert at here] gmail [insert dot here] com

zeropointo

zeropointo on December 26, 2007 1:47 PM

Actually I lied, I deleted that email account...

zeropointo on December 27, 2007 8:55 AM

I only have my own experiences to relate, which is that it took me a long time -- some might say an embarrassingly long time -- to understand concepts like recursion and indirection.

I think this research confuses aptitude with ability in an almost offensive way.

Joe Chung on December 27, 2007 9:53 AM

This is just an observation. It isn't tested significantly, and the effects of the environment are not checked rigorously. Please do lighten up and recognize this for what it is, just an observation that the first three weeks of an introductory CS class didn't manage to change the students' behaviour much. There is a lot of reasons that could cause this:

1) People are indeed goats and sheep, no way to help it.
2) Students don't attend the first few classes in any measurable way.
3) We are not teaching people properly.
4) Students do not trust their brains, they trust the test-passing techniques they were conditioned for throughout their education.

To separate these causes (show which ones are just theories and which are the cold hard reality), one would need to do plenty of work. Probably it's already happening, and the study was intended solely to indicate that the authors are working on this.

My personal experience is that everybody who can pass a university entry exam can learn to do practically any mental task adequately. The problem is only in how long will it take and how much tutoring it will require, and whether it's a good idea to sink more resources into bringing absolutely everybody up to the same level rather than separate those who seem to be more able early on (creating a risk of misidentifying the students' abilities).

Sex has nothing to do with the affinity to programming, social stereotypes and the little biological details of having a slightly different window of opportunity to reproduce and the level of commitment to reproduction ("women are pigs, men are chickens", if you wish) are what I think cause most of the apparent gender inequality in the industry.

David:

As far as I can tell, you are analyzing x=(x==false) <flip x> instead of x=(x=false) <set x to false>.

Tepsifles on January 21, 2008 2:22 AM

WOW! A new site to troll!! :) Pretty good posts even though I had to skip some of the back log. Yes, it feels like some kind of matrix choice. Some people just like different color pills! There, is ofcourse, loads of scientific data to uncover with respect to all our predispositions, to summarize what exactly humans are and if we will ever be able to really classify human nature even if the taxidermy spawns iterations that out number the population.

Ezrad Lionel on February 10, 2008 7:14 PM

I teach at a summer camp aimed at getting kids (ages 13-17) ahead in programming (as in they've never seen it before), or teaching them more than your average high school will (for the ones who have seen it before). I COMPLETELY agree with these results. Anyone who claims 'I can teach anyone this in 15 minutes' has obviously never tried. I have worked ONE ON ONE with people (albeit, many of them 13-14 and not college aged) to whom I explain these very basic assignment concepts slowly and clearly over and over and over, for a week of camp. They never get it. Ever. Then there are the other kids who when I explain it to the whole group the first time, get it perfectly and start asking me relatively high-level questions like "What do I do if I want to compare them?" before I've even covered if statements. Take into account, this camp is mainly for rich people, and all of these kids usually go to fancy private schools or very good public schools. A lot of them are really smart otherwise, but just don't seem to get programming. Obviously this study is in no way conclusive, but I still agree with it intuitively whole-heartedly. I believe that explaining to the students what the assignment operator does would help some, but really, in my experience, it makes far less of a difference than you would expect.

Alex on April 21, 2008 5:13 PM

I find these results to largely be an abdication of actual teaching, sadly it is all to common in computer science departments. The teachers don't teach, and only the self-learners whose minds may be more predisposed to programming can pick it up on their own. Then the teachers point to the results. I have seen this happen again and again. Sigh. While predisposition is obviously a factor, it is real teaching that is needed, and that is rarely a simply going over of the concepts. It requires really translation of the underlying features of programming into easily graspable metaphors, analogies, and allegories. But that takes work, and dedication to teaching, which is not actually taught to doctoral students. So in the end they are not held accountable for teaching, but merely for knowing, and students continue to fail to learn.

Jeff McNeill on April 23, 2008 10:30 PM

In my experience of teaching introductory programming, I notice that many students do *not* see the = sign as an assignment operator. In fact, throughout their public school education, they learn that this is, instead, an "is equal" operator.

In ordinary math, the = sign means that both sides are equal. Another corollary to this in math is that the left-hand-side (LHS) and right-hand-side (RHS) are interchangeable.

In computer programming, it *never* has that meaning. For example, in Visual Basic, the = sign might mean one of two things:

1) Assignment - This is where the right hand side is "boiled down" to a single value, and that value is then stored into the single variable on the left of the = sign.
2) Comparison - This is where the left and right sides are compared and a question is asked, "Are these values equivalent?" The answer, of course, must be a True or False (aka "Yes" or "No").

Another interesting item to note is that this difference is seldom explicitly pointed out to beginner programmers. They are left to "infer" that the "mathematical meaning" isn't ever used in programming. At some point, we as educators fail to take into account the fact that we are "re-defining" symbols and constructs that students already have definitions for (largely through Math, but also through Chemistry, Physics, etc.).

Another item pointed out in the documents by Saeed is the problem that students have with thinking that all the statements somehow occur simultaneously. The idea of "sequence of operations" is not always easily perceived by students. Again, that can be seen in math statements. Consider these statements:

a = 45
b = 55
c - b = a

This is a "set" of "equations" which are all true at the *same* time. Their order is irrelevant. Sometimes their order is changed, but the meaning, it is emphasised, is the same:

c - b = a
b = 55
a = 45

The problem, as it is put to the student, is that they are to "solve for c".

When these students are put into a computer programming course, where they believe that the computer knows how to solve math problems, there is a fundamental set of assumptions and definitions (mostly false) that they bring to the area of computing.

Notice: These students aren't "dumb" or "stupid". Sometimes these are very bright students! They are simply employing a form of logic, but it is not *programming logic*. What we can do as educators is to be explicit about how we are going to re-define what they currently know or assume.

Dan Gilleland on April 25, 2008 7:52 AM

Actually, I have to say I have witnessed the same thing in both my programming classes and my logic classes.

Some students simply could not do logic. No matter how much everyone here howls in protest, some people can't do logic. Period. It's a fact.

Some of the students who lacked the ability in my classes were those who studied the hardest, asked many questions and really really tried. I felt bad for them. They really tried. They just lacked some kind of innate ability.

There is a middle group who can't do it yet but can learn. But there really is that group that is incapable. I am sorry if that offends you, but it's the truth. Sometimes life isn't fair.

Practicality on July 14, 2008 1:25 PM

http://www.secretgeek.net/camel_kay.asp

Alan Kay's comments on "The Camel Has Two Humps." Found on Leon Bambrick's blog, thanks to reddit.

Joe Chung on August 24, 2008 1:48 PM

>For example, does anyone know of a framework author/architect
>that is female? The people that come up with Jini, or Ruby on
>Rails, or Hibernate, or the like. I can't recall a single
>female author of groundbreaking ideas, either theoretical or
>practical.

There are profound differences between men and women in world view and mode of thought. These are evident from the literature they create, the literature they consume and the way they comport themselves over the spans of their careers.

The archetypal chick flick – Gone with the Wind – is described in its own advertising as "a searing tale of passion in a world gone mad". Essentially, it's about the feelings of the protagonist in a world that is utterly beyond the protagonist's control. If a Mills and Boon novel has a happy ending, it's provided by the intervention of a man. At no point does a woman attempt to change her world. She adapts to it, cries about it, or waits for a man to change it for her.

Men, by contrast, write about almost nothing but taking control of their world, and the mechanics by which this is attempted.

Another fundamental difference is the list thing. Men teach one another the mechanism, the distilled principle, because there is less to remember and it has to be taken in context anyway. Women want a fixed context and rote instructions. If you try to teach them the principles instead, they don’t listen and they get angry, saying “I don’t care why, I just asked you to tell me what to do.” If you give them a list of steps it must be exhaustive like a computer program because (also like a computer program) if context changes breaking the procedure or if anything has been omitted, blame is ascribed to the writer of the procedure.

A direct consequence of this intellectual inflexibility is that women do not create tools. They can be taught to use them, often very well, provided that the use of the tool can be described as lists of steps - programs!

Visit a craft shop like Spotlight. It will be crawling with women who think they are creative. In fact all they ever do is stick glitter to boxes, or cut cloth according to a plan that was almost certainly created by a man, before stitching it together using a sewing machine definitely both invented and made for them by men.

Some of them will vary the patterns, but creation ex nihilo is a behaviour exhibited almost exclusively by men.

I suppose you could say that women play god using the thing between their legs, whereas men use the thing between their ears. Probably this is enculturated behaviour. Possibly it is an artefact, in men, of the inability to play god the easy way; certainly many of us see our creations as children of sorts.

Peter on September 22, 2008 10:36 PM

Peter, I hope you are not serious because that was the most downright stupid thing I've read in a month.

Chris on November 12, 2008 2:29 PM

I'm 50, started learning electronics at 9 and programming on a PDP 8e using BASIC 8 in 74. I don't have a degree but have worked at two colleges. This is not about programming (there is no gene) it's about conceptual thinking. The particular problems on this test are related to transitive functions. These same people had a hard time in math class. They have poorly developed skills in two areas, they do not think symbolically nor do they understand levels of indirection. I would predict that the binary distribution would match their performance in their math classes as well.

My personal view is that these skills are 'naturally' developed in the early to mid-teens. It has some similar characteristics to language learning in that you can learn languages after that cognitive development window closes, but it's a lot harder.

Jim C. on December 6, 2008 9:36 PM

It's great to post a comment on a post more than 2 years old now...

I think it's interesting that almost everyone has concentrated on disagreeing with the fact that the test was given using "C like" syntax. To me, being a novice programmer learning "C related" languages, I got the assignment right away and had no trouble with the question.

I think the more interesting fact is the idea that those who failed the test, biased or not, never improved. Isn't this the point?

One of the earliest commenters mentioned that the educators must be to blame and that he could teach anyone what's required to pass the test in 15 minutes. What this paper is getting at is that there may be those who, whether it is that they can't or simply don't want to, will not improve.

Having an insight like this before committing to 4 years of study might be valuable to the student.

Justin Hopkins on December 7, 2008 5:09 PM

The interesting thing here is not the test itself, rather it is what this type of test indicates about how the subject is taught. The problem if you will is not the student but the apparent refusal of the learned practicioners to realize that human beings do not all learn in the same way. Most of the people here claim that programming is like mathematics, I would argue that this is in reality quite false and that most programming is actually more like natural language rather than mathematics. Rather than worrying about who had the consistent model when answering the questions (Which really is just a way to avoid realizing that the typical method of treating programming like a mathematical endeavor is probably not the best way to handle things for the human beings that will be writing the programs.) one should be looking at how the students interpreted the question(s.)

When we are in grade school we are taught what one is, what two is, what A is, what B is. Programming seems to be the exact opposite for many they are given complete words and then expected to extract the individual sounds of the letters. Students are not taught to speak the language, rather they are taught specific phrases. So they end up like the tourist who really only knows four or five basic phrases in a language trying to ask for directions to a given destination.

Can any of you imagine learning to speak English without knowing enough to even begin to read a dictionary? This is what students and others must go through when it comes to programming. I think that this test may provide an excellent spring board for figuring out the best possible approach rather than an indicator of who or who will not be able to learn to program.

It doesn't matter how supposedly simple a programming language is to learn if those learning it are never taught the alphabet so to speak.

Shadow Skill on December 13, 2008 10:03 PM

Interesting. When I was 15 I'm sure I'd fail the first test with variable assignment. We had an introduction to programming in high school and I barely passed it, because I refused to grasp exactly those 3 concepts mentioned above, probably for the exact same reason mentioned above. But by the time I was 18 I passed the second programming course in high school and introduction to programming at university with highest scores without much effort. The only reason I can think of is that something sparked in my head that I should do whatever it takes to learn programming after my initial failure.

Vasil on December 23, 2008 12:59 PM

Sorry Middlesex University isn't a good university. They don't get good student in the country. More on that have a look at Times Good University Guide: http://extras.timesonline.co.uk/tol_gug/gooduniversityguide.php?AC_sub=Computer+Science&sub=18&x=52&y=6

Student on December 24, 2008 3:41 PM

Just to note -- the problem at my university does not have much to do with the "kinds" of people coming in or the methods of teaching. It has a whole lot to do with the fact that they are forcing non-majors (Japanese and Math, as two random examples) to take a Java programming course. I can see no way for this to be helpful -- especially not to their GPA! -- and it makes the first class a joke for those of us who are Computer Science majors.

Marble Host on February 18, 2009 11:23 PM

From the page: "Evidently not everyone is as fascinated by meaningless rules and meaningless conclusions as we are; I can't imagine why not." When I began programming, back in the olden days of punched cards and paper print-outs (70's), I observed that some programmers were able to write code that was complete crap. I found blocks of code that would receive an input value and arduously convert it into the same value it already was.http://www.marblehost.com
Initially I was reluctant to believe my own mind; there had to be something I was missing. Slowly, I began to realize that many "programmers" had no idea what they were doing, and they were in the industry! How could this be? I saw this situation many times through out my career. For example: SELECT last_name, first_name FROM emp_name WHERE 1 > 0 That chunk of code will separate the sheep from the goats. I forgot - which ones were the programmers?

Marble Host on February 18, 2009 11:23 PM

orange!!!!!!!!!!!

Diplodocus on March 17, 2009 4:03 PM

I'm sorry but that is just rediculous - and it goes to show how crap modern day schools are at teaching, and understanding pupils.

Instead of disregarding "non-programmers" you should be seeking ways to communicate to both "types of student" in their own language.

Zoe on March 23, 2009 10:40 AM

@Shadow Skill Exactly! I completely agree!

Zoe on March 23, 2009 10:47 AM

@Peter thats has got to be one of the most elaborate trolls ever - because it is simply impossible for an intelligent person to believe that nonsense.

Zoe on March 23, 2009 10:53 AM

yaa its true that 30-60 % students can't program & most of them fial in thier first test.But everyone wants to be a programer so everyone id putting there hands into this without knowing there scope or anything.I think today lot of programmers are available and daily new one's are also coming.My suggestion for programmers will be to shift towards the mobile world because a lot mobiles are being manufactured everyday.and in turn public demand is increasing.
http://www.funmahol.com/
so there will be a huge chances of success in this field & also chances of succes are lot more than in any other programming field comparing to programming for mobiles.

Baby on April 23, 2009 12:18 AM

It was two years ago, but Bob the Chef's post is a bit amusing; statements in formal logic are meaningless by the definition of "formal". Yes, we may choose to interpret those strings of symbols as "programs" and/or "data" and call some "correct" and others "buggy", but none of that is in the realm of formal logic and when it comes to reasoning about what the computer does, you have to leave all that interpretation stuff at the door. Unless your computer is sentient, everything it does just involves meaningless manipulations of meaningless strings of symbols - it's not going to know any better. It's the *programmer's* job to deal with that fact - that statements of formal logic are meaningless. (And definitions only go so far and no further: Euclidean geometry never defines what a point is so "point" is a meaningless concept.)

Like I said, it was two years ago - what prompted me to post was that I gave the full test to my brother (he's a panelbeater with zero programming background). His first complaint was that he doesn't know any programming (as if I didn't know).
I told him it "doesn't matter; just see if you can make any sort of sense out of it."

He was wrong in every answer (assuming conventional C-like semantics), but he scored in the "consistent" group. Maybe
I should suggest he take a few night classes in programming?

Brody on May 19, 2009 5:40 AM

It's very interesting, if i was young, I would fail in the test. When you go to college, you must learn the programming because you have no choice.

evening shoes on May 26, 2009 10:52 AM

This should not take any programmer more than 6 seconds to figure the answer.

What are those people doing who are getting it wrong?

DarkNight on May 27, 2009 3:27 PM

it's all personality

you have to like to solve puzzles, coding is all about solving puzzles.

those who have very analytical and problem solving type personalities succeed.

those who do not are more at risk of failure.

check out this website http://www.bizet.com/ava.php

they know why.

david on June 12, 2009 1:15 PM

Very nice post.I agree mostly but every person is diffrent.

Egipat Letovanje on June 20, 2009 10:43 AM

I agree with Steve.

Egipat Letovanje on June 20, 2009 10:45 AM

Jesse, I read your thoughts on the double hump and I felt like I was reading my biography :D

"I'm just supposing here, but I bet those students who need some practice and attention (perhaps some help that would go towards learning a more consistent mental model) don't get the attention and encouragement they need. They are thrown into the midst of cryptic syntax, alongside a bunch of folks who already seem to understand it naturally, and they get discouraged very quickly because they don't pick it up as fast. The classroom is huge, the teacher has way too many students, and doesn't have time to bring the stragglers up to speed. Especially when the stragglers may become quickly demotivated in an environment where the subject matter comes so easily to some students. Just my opinion, but I think this phenomenon comes much closer to explaining the double-hump."

Sorry to quote this whole thing again, but this really rang true for me, so true that I'm actually posting something on the internet. I was one of the stragglers in my CS 101 class, I felt so confused the first day when our professor asked if anyone had prior knowledge and 3/4ths of the kids raised their hands, and even more confused later when it seemed I just couldn't get it. I ended up failing and having to retake it, and I felt truly miserable about it.

Well to put a long story short... somehow it just sort of "clicked" for me. I don't know why, but I've since caught up with the kids in that 101 class I failed and have risen to a 3.8 GPA in a year. Maybe some people are inherently better at programming, but that's life. Some people are inherently good at piano, but it doesn't mean anyone can't become decent at playing piano. Just because you aren't going to play and be the star of a symphony orchestra doesn't classify you as a bad pianist.

peter on June 30, 2009 11:55 PM

This article is wrong. Programming is about taking a basic set of instructions, and making something complex out of it. You can't ask questions about basic instructions, and if a student answers it wrong assume they can't program.

It does take time for the logical parts of the brain to develop. If you are trying to teach someone to program who can't grasp the logic, don't assume that the'll never ba able to program. You just have to help them develop the logical part of the brain.

Lastly programming requiers problem solving ability. Just becouse a student is not good at this, does not mean they will never be good at it. Things like project euler can *quickly* get someone better at problem solving. If not, than more gradual approches are availible.

This article seems to discurage people who can't program "in the early stage" to continue programming, they will never get better. That is BS. Everyone can get better at programming. Just becouse you fail your first test does not meant you'll fail all of them.

Hiroshe on July 10, 2009 7:05 PM

I just have to wonder:

If we accept the premise that assignment + MeaningVsRules is both the first hurdle and the failure point for so many student, could we instead just spend a little extra time dealing with those points for those students who need it?

Joel Coehoorn on July 22, 2009 11:19 AM

well, really hard to do this, but i will try my utmost.

love jordans on August 3, 2009 7:55 PM

well, really hard to do this, but i will try my utmost.

love jordans on August 3, 2009 7:55 PM
Content (c) 2009 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.