Glen over at the self improvement blog LifeDev has an interesting way of dealing with distraction and remaining productive. He works through projects in parallel, so that when he's distracted it's by another project. Recently he found out that his father had been working the same way for years, by balancing projects to keep himself interested:
Dad has a simple method for keeping himself busy and entertained with what he's working on. He simply starts 3 projects at the same time. He can work on whichever he pleases throughout the day, and go back and forth as his mood permits. If he becomes bored with a task or needs to think about how to do something, he switches tasks. By the end of the day he'll have completed, (or nearly completed), 3 different projects. This is much better than only making halfway through a single project and getting distracted.
Both he and his father recognise that they are more prone to distraction than some people, so rather than fight it they set up their work so that when they do get distracted it's by another relevant project and not a time sink. Photo by Flik.