Hacker News new | ask | show | jobs
by datawalke 5805 days ago
From time to time I suffer the same issue. I look back hours later and get angry at myself for 'wasting' so much time. There are a few things you can do to help you out that others have mentioned. However this works for me the best:

I edit my hosts file (Windows: /Windows/System32/drivers/etc/hosts, Mac: /etc/hosts) to look something similar to:

127.0.0.1 news.ycombinator.com

127.0.0.1 techcrunch.com www.techcrunch.com

127.0.0.1 reddit.com www.reddit.com

etc.

Alternatively you can use other tools to block traffic. RescueTime (http://www.rescuetime.com/)is an awesome tool as well.

2 comments

I wrote a small PHP command-line tool for turning on/off these host file entries. It's fairly simple, but I've found it to be extremely useful in killing off stray checks of favorite websites, which inevitably end in larger blocks of misspent time. http://github.com/killsaw/Timeguard
Make it a command line utility only for turning those entries on, but make it as hard as it could be to remove them again.
I considered this while writing it, but figured there's a fine line one must walk with a utility like this. If it's too annoying to disable, you won't use it.

Typically once I flip it on, I forget about it, until I actually try to check a site that's been blocked. I find that being unable to load a site or loading a local webserver hosted file injects just enough time to realize I should be doing something else.

Previously I wasn't in the "trick yourself" camp, but having used this for a while, I definitely am. Used in conjunction with the Pomodoro Technique, it's a really solid way to keep oneself on track.

I have to mention Leechblock again, a firefox plugin that lets you customize times/days that you can (or can not) view certain webpages. Great for keeping yourself from surfing when you come home from work but letting you surf on a lazy saturday morning. https://addons.mozilla.org/en-US/firefox/addon/4476/