Mark Guzdial gives a snapshot look at a research student done by several of his graduate students on how programmers who learn on their own actually program. A lot of interesting things there. Things like these programmers use a lot more FOR loops than WHILE loops. They use more TRY-CATCH blocks than WHILE loops as well. Who knew that TRY-CATCH was either more easy to learn or more important to learn (unclear which) than WHILE loops.
Oh and self-taught programmers seldom write their own classes. What does that say about the naturalness of classes? That one doesn’t surprise me that much BTW. I have come to the conclusion that the pendulum towards objects (object first, last and always) has swung too far in one direction. I think a swing back to somewhere in the middle (use classes where they make things easier but don’t use them when they make things harder and more confusing) is inevitable.
I hope this paper is published somewhere I can get a copy of it. I suspect that there is a lot we can learn by studying how people learn to program on their own.
Which reminds me – I wonder how often the GOTO statement showed up in self-taught programmers programs? Did they even find it? Did they find it useful?