Teach Yourself Programming in Ten Years
Teach Yourself Programming in Ten Years
Peter Norvig
Why is everyone in such a rush?
Walk into any bookstore, and you'll see how to Teach Yourself Java<br>in 24 Hours alongside endless variations offering to teach C,<br>SQL, Ruby, Algorithms, and so on in a few days or hours.<br>The Amazon advanced search for [title: teach,<br>yourself, hours, since: 2000 and found 512 such books. Of the top ten, nine are programming books (the other is about bookkeeping). Similar results come from replacing "teach yourself" with "learn" or "hours" with "days."
The conclusion is that either people are in a big rush to learn<br>about programming, or that programming is somehow fabulously easier to<br>learn than anything else.<br>Felleisen et al.<br>give a nod to this trend in their book How to Design Programs, when they say<br>"Bad programming is easy. Idiots can learn it in 21 days,<br>even if they are dummies." The Abtruse Goose comic also had their take.
Let's analyze what a title like Teach Yourself C++ in 24 Hours<br>could mean:
Teach Yourself: In 24 hours you won't have time to write several<br>significant programs, and learn from your successes and failures with<br>them. You won't have time to work with an experienced programmer and<br>understand what it is like to live in a C++ environment. In short, you<br>won't have time to learn much. So the book can only be talking about a<br>superficial familiarity, not a deep understanding. As Alexander Pope said,<br>a little learning is a dangerous thing.
C++: In 24 hours you might be able to learn some of the syntax of<br>C++ (if you already know another language), but you couldn't<br>learn much about how to use the language. In short, if you were, say, a<br>Basic programmer, you could learn to write programs in the style of<br>Basic using C++ syntax, but you couldn't learn what C++ is<br>actually good (and bad) for. So what's the point? Alan<br>Perlis once said: "A language that doesn't affect the way you<br>think about programming, is not worth knowing". One possible point is<br>that you have to learn a tiny bit of C++ (or more likely, something<br>like JavaScript or Processing) because you need to interface with an<br>existing tool to accomplish a specific task. But then you're not<br>learning how to program; you're learning to accomplish that task.
in 24 Hours: Unfortunately, this is not enough, as the next<br>section shows.
Teach Yourself Programming in Ten Years
Researchers (Bloom<br>(1985), Bryan & Harter (1899), Hayes<br>(1989), Simmon & Chase (1973)) have shown it<br>takes about ten years to develop expertise in any of a wide variety of<br>areas, including chess playing, music composition, telegraph<br>operation, painting, piano playing, swimming, tennis, and research in<br>neuropsychology and topology. The key is deliberative<br>practice: not just doing it again and again, but challenging yourself<br>with a task that is just beyond your current ability, trying it,<br>analyzing your performance while and after doing it, and correcting<br>any mistakes. Then repeat. And repeat again. There appear to be no<br>real shortcuts: even Mozart, who was a musical prodigy at age 4, took<br>13 more years before he began to produce world-class music. In<br>another genre, the Beatles seemed to burst onto the scene with a<br>string of #1 hits and an appearance on the Ed Sullivan show in 1964.<br>But they had been playing small clubs in Liverpool and Hamburg since<br>1957, and while they had mass appeal early on, their first great<br>critical success, Sgt. Peppers, was released in 1967.
Malcolm<br>Gladwell has popularized the idea, although he concentrates on 10,000 hours, not 10 years.<br>Henri Cartier-Bresson (1908-2004) had another metric: "Your first 10,000 photographs are your worst." (He didn't<br>anticipate that with digital cameras, some people can reach that mark in a week.)<br>True expertise may take a lifetime:<br>Samuel Johnson (1709-1784) said "Excellence in any department can be<br>attained only by the labor of a lifetime; it is not to be purchased at<br>a lesser price." And Chaucer (1340-1400) complained "the lyf so short, the craft<br>so long to lerne." Hippocrates (c. 400BC) is known for the excerpt "ars longa,<br>vita brevis", which is part of the longer quotation "Ars longa, vita<br>brevis, occasio praeceps, experimentum periculosum, iudicium<br>difficile", which in English renders as "Life is short, [the] craft<br>long, opportunity fleeting, experiment treacherous, judgment<br>difficult."<br>ars can mean either art or<br>craft, in the original Greek the word "techne" can only mean "skill", not "art". --><br>Of course, no single number can be the final answer: it doesn't seem reasonable<br>to assume that all skills (e.g., programming, chess playing, checkers playing, and music playing)<br>could all require exactly the same amount of time to master, nor that all people<br>will take exactly the same amount of time. As<br>Prof.<br>K. Anders Ericsson puts it, "In most domains it's remarkable how much time even the most<br>talented individuals need in order to reach the highest levels of performance. The 10,000 hour...