You have to remove ALL distractions. Set yourself a time to do email, twitter, HN, return client phone calls, then put then phone to answer phone, and turn everything else off. Especially that growl thing. Close all windows that arn't for your immediate bit of work.<p>An exception to this might be if you work to music. Personally I find a low volume, vocaless music, helps you not get distracted by minor noises like doors slamming in other offices or traffic passing by.<p>You have to have at least an outline plan of what you want to produce beforehand - not the HOW, but having done some research before your high productivity time definitely helps. Basically, get stuff queued up.<p>I think it helps to know that your concentrated period will end. For some this would be a 25 minute timer, but I think something more like 2 hours is best. Maybe 11 til 1. Then go for lunch for an hour, then do another 2-4 session. I think knowing you'll stop and being doing something else during a break, concentrates your mind on the job in hand, and it knows you don't have to worry about lifes other things at the same time, as you can do them later.<p>I think I like the idea of pairing up with someone else who has also removed distractions. Helping each other to keep momentum up, and every time something unknown happens, doing the api lookup before the main coder needs it would be awesome. Then switch the role over regularly.<p>hth. Just random thoughts really.<p>In reality most of the time I'm distracted by traffic noise, other people chatting about other projects I've worked on when I'm trying to work on another, people going off on tangents - probably because there's no allocated time in the week for actual research & training. And the bloomin phone. Support is essential, but completely takes me out of the zone.
For some coding task, I gently start thinking about [problemX] well in advance, and then forget about it and do other stuff. I don't even think a whole lot about the problem, just note that I have to do such and such, and maybe think a little bit about how I might do it, then forget about it. If it's an important/hard/interesting problem, the rest comes naturally... I go off doing whatever other piddling crap needs to be done, and by the time I'm ready to sit down to attack the problem in question, I usually start to get ideas, seemingly out of nowhere. I've been following this process for some time now. When ideas on how to implement something start to come, that's the zone right there, far as I'm concerned. I can spend a couple hours without looking up from the screen at that stage.<p>Long story short: for a problem which I think is going to be hard to implement/fix, I briefly think about the problem well in advance of sitting down to work on it.