There are few things more precious to a developer than attaining a state of "flow". Written about by Hungarian psychology professor Mihaly Csikszentmihalyi (mee-hy cheek-sent-mƏ-hy-ee), flow is the state of concentration or complete absorption in a task. It is when programmers are most productive. It is also when they're most likely to shiv anyone who dare pull them from it prematurely.
For the longest time I assumed that it was the only time I could get my problem solving done. "Friday doesn't have a three continuous hours free? Guess I'm not writing code today." Things changed when I started having kids; more so for the second. A young child doesn't understand the implied meaning of a closed door. They don't pickup on the hunched, engrossed body tilt toward the screen. For all they know you're playing hide and seek. Or playing Farmville.As a result those long, uninterrupted horizons to run over a problem don't exist in nearly the same frequency.
The challenge is to be able to jump in and out of flow as easily as flipping a light switch. Enjoying the slow, radiant dawning of ideas during an illuminating session is preferred but not practical. I need to make twenty minutes here or forty minutes there count.
Unfortunately, my mind seems to have all the elasticity to snap from one state to another as a frozen Gogurt.