You’re not a slacker. In fact, you’re a pretty good developer who gets things done on time and done well. But sometimes you find yourself wasting time on that site again. You weren’t planning to go there, but the code takes a minute to compile and the tests take a bit longer to run and so you just flip over there while you wait.
Ten minutes later you’re still there, not thinking, just consuming.
And you berate yourself again for wasting time.
What you don’t need is some overlord application telling you you can’t access the internet for the next three hours. You just need a gentle reminder that you want to be productive.
Here it is. Two simple scripts. (go to the GitHub Gist)
One to block the sites you don’t want to visit:
1 2 3 4 5 6
And one to remove the block:
1 2 3 4 5 6 7 8 9 10
List the sites you don’t want to be visiting in
.blocked_sites in your
directory. Like this:
1 2 3 4 5
When you want to be productive, run
worktime. When you’re ready to slack off,
worktime adds those sites to your
/etc/hosts file redirecting you back to
localhost. If you’re feeling creative, make a landing page with a picture or
text reminding you to keep been awesome. I use a picture of R. Lee Ermey
to gently remind me what I’m supposed to be doing.
When you’re done being productive, run
slacktime just removes the
entries which were added to the
So are these really the two most productivity enhancing scripts ever written in the history of UNIX, or am I just using a bit of hyperbole to increase traffic? Probably the latter, but I still hope I help you become more productive.
Now quit slacking off and get back to work!