tags:

views:

1423

answers:

19

I recently read The Camel Has Two Humps, a paper from Middlesex University that claims that programming aptitude of incoming college freshmen is directly correlated answering questions about assignment consistently.

So my question is this: What is this test of assignment uncovering? What basic skill or exercise is necessary before someone learns programming? Anecdotes about teaching students or children about programming would be excellent.

Other subjects have prerequisites, at a very basic level, you have to be able to count before you can add, count backwards before you can subtract. You have to be able to detect edges before you can draw realistically, so it's likely that these skills also exist for programming.

Note: I'm not a 100% sure if this is non-subjective enough, if so, please comment and I'll try to make it better.

+4  A: 

I think it's the ability to construct a "mental model" of what the computer is doing, and the ability to use that model in a consistent way.

Thomas
+3  A: 

Logical thinking. Typing.

Aaron
I cannot believe how many programmers I see who can't type. Its amazing to me that their chosen profession and its #1 interface is lost on these poor souls...
Jason Punyon
I would rather see someone thinking than typing. think more type less. is the model I would choose.
Brian G
You realize there are programmers and computer scientists who are blind right? This whole "programming is just typing" nonsense bandied about by people like Steve Yegge and Atwood is just ridiculous.
BobbyShaftoe
A: 

to program, only basic algebra and the ability to reason about cause and effect are required

to debug, inductive reasoning is also required

Steven A. Lowe
+5  A: 

If I had to choose three qualities in a student I had to teach, I would have to choose enthusiasm (willingness to learn), curiosity (the hacker mindset), and Logical reasoning. Perhaps a passion for the subject, but I suppose that passion overlaps with enthusiasm somewhat.

William Keller
+2  A: 

problem solving- ability to hang in there when the problems get hard. I don't think it has anything to do with algebra- I failed algebra. When I run into math I can't figure out (a recent problem on linear interpolation, for example), I just find the nearest SME and let them figure it out and get back to me. (I can do linear interpolation now, though!)

Jeremy
i'm pretty sure you didn't fail the part about letting X = Y
Steven A. Lowe
+3  A: 

'It is your attitude, not your aptitude, that determines your altitude.'

Terhorst
Tell that to combat pilots.
icelava
+3  A: 

Abstraction. Any programming is abstracting an idea, or a model. E.g., when you draw a simple software architecture, it's an abstract model. Software inside a computer doesn't really look anything like that. Then you abstract concepts, ideas, and code into multiple levels. So I'd say an ability to think and communicate in abstract ways.

Enrique
+1  A: 

For Programming:
Logical thinking and some basic maths.

For being a good programmer:
Critical and Lateral thinking.
Ability to look before leap.
Ability to look at a bigger picture.
Being able to take a lot of factors into consideration.
Self starter / learner.
Should be able to stay of top of latest trends while not getting carried away.
Mostly important:
Survival on 2 hours of sleep.
Stomach for caffeine. LOTS of it.
Willingness to let go of the opposite in favor of deadlines and elegant code.
Temperament to put up with a manager/team lead/client.

Most important:
Ability to look at someones code and not going on a shooting spree.

Mostlyharmless
A: 

I think you've also got to be a bit pedantic, to be interested in minutia. If you're going to be a good programmer, you've got to be concerned with even the smallest aspects of your code and its execution.

J D OConal
+1  A: 

Persistence. The unexplainable yearning to get it right--even if it means staring at your screen for hours at a time and skipping a meal or two. Chasing that high you feel when you've solved something that seemed so out of reach just a few hours ago. Although I don't believe that this is something that can be taught. You have to want it.

You have to want it bad.

outsyncof
A: 

Maths are not a fundamental skill. Programming and maths overlap, but you can learn how to program without knowing the math theories beforehand. When I entered CS I found out that all I knew about programming had a math basis, but math theories teach you much more than you need for programming. Programming languages have taken the useful parts and left the rest for mathematicians. I would say that abstraction and problem solving abilities are a must. Anybody can learn to translate a mental algorithm to code, but you have to build a mental algorithm first.

jbcreix
+1  A: 

That article is refering to assignment, as in variable assignment (If it's the same article I read a few months back). A good indicator of programming potential is simply the ability to understand the concept of placeholders and variable assignment. That is such a fundamental part of programming, probably the most fundamental thing. If a person can understand X equals whatever is assigned to it, they have a shot at being a programmer. There are some people that just can't grasp the concept.

That is the fundamental skill for programming.

What skills and abilities need a programmer possess? That's another question :)

rob_g
A: 

Ability to enter a mental flow state while performing propositional reasoning

A: 

Logic. And common sense.

Jon Limjap
+15  A: 

The original question is about what fundamentals are necessary for a person to be able to program. This question was discussed in 2006 on Coding Horror. A study was done at Middlesex University, UK, to find what were the pre-requisites, what were the fundamental mental abilities necessary, before a person could program. The three fundamental abilities they came up with were

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

If you couldn't do this, you couldn't program. I've seen this in classes, and in schools, and with co-workers and friends. Even just the first one is a show-stopper. Some people can do algebra, but assignment just floors them. Their mental models do not allow it, and they cannot grasp assignment. Nothing wrong with that, they make fine dentists and accountants and fit into other useful and worthy professions, but they can't program because they can't grasp the fundamentals.

At one time, I believed that everyone could program, it was just that they weren't taught right. After many, many futile attempts to teach right, I have given up. Some folks required a lot of effort and still never got it. Many adults have completely forgotten algebra and need a lot of revision to understand the concept of variables. When it comes to assignment, it becomes obvious that their algebraic abilities are so minimal that their schooling was monkey-see-monkey-do. They weren't able to consistently apply assignment. They guess, they take wild stabs, their minds are slippery little fishes that swim all over the place and they cannot consistently apply assignment. I suspect that the mental model of variables is lacking in their brains. I used to have a number of visualisation techniques for imagining variables, little holes that held objects, that sort of thing. I don't need the visualisation nowadays, but that visualisation seems to be a prerequisite to programming.

I also suspect that the people who taught memory tricks before computers became prevalent, could have been programmers. They had mental models and visualisation techniques and could consistently do assignments, even if it was shoving facts in imaginary boxes in their brains and pulling those facts back years later.

If you find someone who can handle the idea of assignment, and can apply it consistently, the next big barrier is iteration. So many people go to pieces with iteration. Again, the mental models appear to be missing, or are the wrong sort. They can visualise a static model of data storage, but allowing change to those mental models is beyond them. They cannot set up a mental framework of variables, and then be able to follow a loop and change the variables as the loop progresses.

I don't believe recursion is a barrier to the ability to program. I know many fine robust, plodding programmers who function quite adequately churning out reports and data entry screens who are completely unable to understand recursion. I don't believe that recursion is a fundamental programming skill, but I do believe that it's a big separator between the lower programmers and the higher programmers. I like having lower programmers around. They get to do the boring donkey work while I get to do the experimental and the new and lay the patterns for the lower programmers. But recursion, it also depends on a mental model understanding. The more I explore these ideas, the more I come to believe that the other answerers who said "mental models" were right. Programming is all about the ability to form mental models and be able to manipulate those models. Without that ability, you can't program.

Persistence and curiosity and logical thinking and all the other suggestions might be the separators between barely adequate programmers and great programmers, but they aren't the separators between non-programmers and programmers.

codebunny
Very non-subjective answer. Most of the answers on this one are personal opinions about why the respective author believes he or she can program.
ranomore
a procedural programming language needs to do five things: input, output, sequence, selection, and iteration. Concurrency is optional. assignment can be considered both input and output. given the correlation, could we not conclude that inducton and decuction are sufficient to code Prolog?
Steven A. Lowe
To iterate is human. To recurse, divine.
Andrew Hedges
@ranomore, maybe, or maybe it is a little subjective its self-aggrandizement. :)
BobbyShaftoe
A: 

I object to the notion presented in the paper that x% of people CAN'T learn to program. I think the people that fail to pass introductory programming courses have decided on some level that the enormous amount of time and effort required to learn to program isn't worth it, not that they aren't capable of it. Barring some sort of mental incapacity, anyone can learn to program.

I don't see this as very different from learning a musical instrument. How many kids take music lessons, and how many of them quit? When you first sit down in front of a piano, it's not very rewarding. So you can play "Mary had a little lamb" (the musical equivalent of "Hello, World!"), but the novelty wears off quickly. It takes a huge time investment before reading music becomes natural and you know exactly where your hands should be and what they should be doing. The only difference is our arcana differs from theirs. We know about variable scope, they know about glissandos. We grok classes, they grok marziale.

Requisite skills? Piffle. The only requisite for music is an instrument, and the only requisite for programming is a computer.

A: 

My favorite answer to this is described in computational thinking: thinking in multiple levels of abstraction simultaneously.

Josh Segall
A: 

An ability to think of the things that could potentially go wrong (so that you can cater for them).

MB
A: 

Control over the Emotional Obsession Mechanism.
There are some things you need to get absolutely correct and you need to be able to force yourself to go over it one more time from every possible angle.
On the other hand there are LOTS of things where you must be able to say "good enough" and not waste time optimizing stuff which for whatever reason is just not important, even though it might be artful and fun to sink time into it.

pngaz