What happens to programmers happens also to writers. Plot, pace, narrative, sentence rhythm, word selection, sense of character, character interactions – all these take time to load up and effort to hold in the mind.
This cartoon encapsulates the problem perfectly, substituting of course the extended logic/internal dialogue of the developer for the weird lopsided model of the story a fiction writer maintains as he struggles through first draft, second draft . . . .
Paul Graham’s article on Holding a Program in One’s Head is a good outline of the problem, expanding from an earlier article on maker’s schedule and this Paul Venezia’s article on Infoworld article develops the idea further with the reference to the suitably illustrative graph above showing productivity over the day. I particularly relate to the high productivity peak at 11pm rising sharply to 2am.
Programmer Interrupted is more on the same theme.