To Develop Expertise, Motivation is Necessary but Insufficient
freakonomics.com
freakonomics.com
"One method comes from the physicist John Wheeler (the PhD advisor of Richard Feynman). Wheeler recommended that, after we solve any problem, we think of one sentence that we could tell our earlier self that would have 'cracked' the problem. This kind of thinking turns each problem and its solution into an opportunity for reflection and for developing transferable reasoning tools."
Doesn't always work, though. Turns out that memorizing the form of the Lorentz transformation will allow you to solve arbitrary length contraction / time dilation type problems, but nowhere near as quickly as the physics GRE demands. C'est la vie.
If this is true, could studying (reading) good code do the same for programming? One could, for example, begin to write an application and find code to a similar application where they would be able to check why things are implemented a the way they are as they go along. The tricky part here is deciding which code is worth studying.
One way that it works for programming is doing small exercises and then checking the answers. For instance, the 99 Problems in Prolog (or its translations to Lisp, Haskell, etc):
http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/func...
But as you say, for larger problems it's harder to find good "answers". Even for something relatively small like unix utilities. Say you want to write cat or echo. You get source code from BSD and GNU and Solaris and they're quite different from each other (I recall seeing a comparison somewhere, mainly putting the GNU code in bad light, perhaps unfairly. Anyone has the link?).
Really polished code is hard to find. I've been playing around off and on with Ken Thompson's regular expression search paper most recently.
The idea I think is that by not knowing openings very well, you end up quickly getting out of the opening book, neutralizing your opponent's advantage and into where you're strongest.