C. Titus Brown wrote (on email, but I’m transferring the discussion to the blog):

http://railstips.org/blog/archives/2010/01/12/i-have-no-talent/

No, not my blog — I’m not that modest — but good words nonetheless :).

And the post he cited included the lines:

The kind of practice where all of a sudden I realize that it is 2am and I’m exhausted physically so I should go to bed, but mentally I feel on fire so I let the code have me for another hour or two (I imagine this state to be like a marathon runner or ironman near the end of their race).

Well … no.  Studies of highly-productive writers have shown that they establish a regular, sustainable pace of writing.  That includes deliberately stopping before they get exhausted, confident that they’ll be able to resume the next day with only a small productivity loss due to context switch.  Although these studies were done on writers of natural language, I have every reason to believe they apply to productive coders as well.

Becoming skilled at programming, like gaining skill at any difficult task, takes long practice, sustained over months and years, and at a pace that allows you to remain healthy—mentally, physically, and socially.   It’s not like running a marathon (the original author’s metaphor) so much as it’s like training to run a marathon.  You prepare by running sub-marathon distances, regularly, training over an extended period.