GameDev->StackOverflow->Facebook->Check Email->(repeat).
damn, replace stackoverflow with exophase, and you pretty much have my loop.
i tend to find that it's pretty common for me to run the loop when coding some of the more boring tasks, or especially when i don't know exactly how i want to tackle a problem, so i keep going through the sites, then maybe write a line, repeat, until i eventually i have something.
the only solution i have is.....get to a less boring part of programming, or something i have an exact plan of attack for completing.