We (Saeed Dehnadi, Richard Bornat) have discovered a test which divides programming sheep from non-programming goats. This test predicts ability to program with very high accuracy before the subjects have ever seen a program or a programming language.

Also interesting from the paper:

From experience it appears that there are three major semantic hurdles which trip up novice imperative programmers. In order they are:

assignment and sequence

recursion / iteration;

concurrency.

My own experience seems to confirm this path, I know many programmers who, like me, have problems with concurrency. But I’m not sure if it’s because it’s inherently more difficult or because of the way most languages describe it (shared state).Via Lambda the Ultimate