This is related, but I'm thinking about something more like a chastity belt for keeping me from checking programmers.SE or my email every time I compile. Rather advice like "go take a walk and you'll feel more like coding", I just need something to augment my weak constitution - a net nanny for my geek fetish I guess.

I'll take my answer off the air and I promise not to check programmers.SE for at least a day.

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.
If this question can be reworded to fit the rules in the help center, please edit the question.

If compilation takes longer than several seconds you will become bored waiting till compilation ends. I'm in the same situation myself. you can try to optimize your building scripts though, or use ccache to at least speed it up.

I use Delphi so it's pretty zippy on the compilation end of it. But I don't think there is any compiler that is faster than opening up a web browser. The worst part is coming back to the IDE and saying, "What was I doing again, oh yeah compiling - lets do that again..."
–
Peter TurnerOct 14 '10 at 17:31

From time to time, I use the pomodoro technique. More info is here (official site) and here (wikipedia). Basically, you work focused for 25 minutes, then break for 5. Rinse, repeat. You can use an egg timer, iPhone app, etc... to track the time. When the acceptance criteria is pretty cut and dried, this is a great way to hammer through the work and the day.

I don't follow it religiously all the time but when I'm feeling scattered, I attempt to fall back to it. It's effective (IMHO) and easy to try.

RescueTime allows you to tell it which sites are or are not productive and then you can tell it to stop you accessing anything but useful sites for a given amount of time. It can also report on how you have spent your time during the day, to give a depressing assessment of how productive you aren't being. Or to give an encouraging picture of how absolutely productive you are, depending.

This is interesting. I am yoyo-ing back and forth between "This is too big brother", "This will collect interesting data", "I don't really want to see the results", and "I wonder if my IT department would let me install it".
–
AShellyOct 13 '10 at 21:00

That's mostly my -somewhat divided- feeling about it. I just haven't mentioned to anyone else it was there. Can be helpful for filling in a timesheet sometimes too.
–
glenatronOct 13 '10 at 21:44

I've used their service, and I was very pleased with it. It does feel kind of "big brother"-like, but if you're signing up for it for this purpose, that's kind of what you want... every time you're wasting time on the internet you'll have a little voice in the back of your mind, "this is going to show up on my time log, and I'm going to feel stupid for it later."
–
eykanalApr 5 '12 at 16:43

It's called cognitive behavorial therapy but you don't have to pay a cognitive psychologist, most concepts are described in personnal improvements books like Getting Things Done.

If you want to work on the symptoms anyway, something that work well is using two machine. One for your dev work and one for the informal stuff like surfing and emails. Try, you will see the difference :)

CBT does not necessarily have an angle on the multitude of push notification/interruptions of modern life. Have a 'work mode' on your phone would help, but many apps just keep interrupting you which can destroy concentration.
–
JBRWilkinsonApr 5 '12 at 17:03

That's cool, but pretty easy to ignore, I had a cron job to launch my screen saver just so I could look away from the screen every 15 minutes, but I started ignoring that after 1 or 2 weeks.
–
Peter TurnerOct 14 '10 at 17:30