I’ve been using the Pomodoro Technique for the past few months and have found it extremely effective for helping me focus.
What you do is set a timer for 25 minutes and focus on doing one and only one task during that time. You keep working on it until you’re done. You don’t get up to make some tea. You don’t check your email. You don’t go to the bathroom. You just sit in your chair and force yourself to work.
The first couple of times you get very anxious. After a while it gets fun. You’ll be amazed at how much you can do this way.
One caveat: I’ve found that 25 minutes is too short when I’m debugging. I get very irritated when the timer goes off and I’m in the middle of troubleshooting. On the other hand, you do need something to keep you from chasing a bug fruitlessly for the next 4 hours. The best solution is to use a longer time period and force yourself to stop and take a break. 50 minutes is a good duration for this (at least for me).
BTW: The game I like to play is when I hear my email client announce a new email, I ignore it — I win; the distraction loses. I know it’s not much of a game, but at least I always win 🙂
P.S. The timer I use is Minuteur.