Have multiple tasks available to work on. Some years ago, I saw a talk by Isaac Asimov in which he made the same observation. He pointed out that he hated working on what he was supposed to, so he would strategically place other things that were also important around the room and when his eye would wander, looking for something to do that wasn’t what he really should be doing, he’d at least find some other thing that needed doing. And eventually things would get done anyway. Also, sometimes you just can’t do one thing all the time. If I have a large writing task to do, I try to find another project of a different kind (e.g., programming) to interleave with it. It helps break the monotony. If you don’t use techniques like this, you simply end up wasting your slack time, and that time is never recovered.
— Kent Pitman