Personal Productivity Stack Exchange is a question and answer site for people wanting to improve their personal productivity. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a freelance programmer and I suffer from procrastination - a lot. When I manage to dive into work I really enjoy it, but then after a while something crosses my mind, and I have strong urge to google that and google this and suddenly I am browsing web for two hours looking for random stuff and reading blogs. Luckily, my OS of choice is Linux (Archlinux), so I have a power of customization at my hands. I was thinking of installing brand new distribution on separate partition that would allow me only to do my work and nothing else. But unfortunately most of my work is web development so I need access to web as well.

My question is: What approach do you propose for creating work environment that enables only editing in vim, accessing localhost for testing websites and occasional googling for some solutions, function references, etc. (that could be done in command line web browser).

Than, after 12-16 pomodoros of work, I'd reboot into my full fledged OS and catch up with the internetz and relax :)

share|improve this question
" I was thinking of installing brand new distribution..." --> sounds like a new way to procrastinate :-) – Rabarberski Oct 24 '12 at 16:32
I could give you all sorts of advice here. But that would collapse into "do as I say, not as I do." :-( ...back to refactoring C++... – Camille Goudeseune May 17 '13 at 17:23

As you can't simply pull the LAN cable and go offline, you could try to increase the subjective penalty for using the internet.

  1. Create artificial lag. If loading a web site takes two seconds more than usual, you will think twice before google-ing cute kittens. This is a parameter you can adjust until you have found a perfect penalty vs. productivity balance. This solution is way better than accidentaly blacklisting anything you might need. (Sadly, I don't have the technical expertise required to answer how to do that)
  2. Avoid tabbing web browsers. While they are a great invention, they invite having 30 open tabs and switching frantically between them. Simply remove any shortcuts that would open a new tab. This helps you to focus on one task.
  3. Use a tiling window manager like awesome. This allows powerful keyboard-only navigation. Also, this makes it harder to "hide" a window out of your line of sight. The less windows you have, the more you can focus on a single task. You should also severly limit the number of workspaces/tags to perhaps three (code, offline documentation, web search).
    Combining 2 + 3, each additional website eats considerable screen estate. This is another penalty guarding against mindeless browsing.
  4. Take write access for configuration files away from your main user. If you like to constantly improve your system, this would take away any opportunity. If you need to adjust something, you can always go root. (You could even take away your right to go root directly, and require a new login)
  5. Don't install anything beyond the base system and whatever you really need for work. You have no idea how many hours I have wasted with these little pre-installed games that come with a full Desktop Environment, so don't walk into that trap.

Not all of these ideas may work for you (especcially 2 and 4 could be bad ideas). If you are accidentally using KDE, you could perhaps implement a few concepts using Activities instead of creating a new partition (this would require making the Activity-switching shortcut something really awful like Super+Ctrl+Home+Esc+A ;-) ).

share|improve this answer
Thanks, very good tips, especially 1 and 2 - making browsing pain in the ass seems to help a lot, but I'll have to find some balance, so testing web pages doesn't get painful as well :) As for the tiling manager, I've already been using XMonad for a year and love it, it really helps in terms of speed and effectivity. – d1001001 Oct 18 '12 at 3:09
+1 The 2nd one is interesting. I started experimenting it today. – petrichor Oct 20 '12 at 21:11
#5 will keep your system running as fast as it did when you bought it! :) – Gaʀʀʏ Oct 23 '12 at 13:18
+1, the second one is what I always preferred. No 4 is also good one – Anwar Oct 18 '13 at 14:39

In a similar vein to Scooter's response:

  • Edit your hosts file and add EVERY site that you ever use to procrastinate. Now think about the sites that you would go to with all of those blocked, and add them too. Repeat until you can't think of any more. Facebook, twitter, linkedin, reddit, digg, hacker news, Stack sites not related to programming, news websites, game websites, other social networks.

  • Add a big angry warning message to yourself in your hosts file telling you not to edit it unless it's to add something.

  • If you end up finding a different site to procrastinate on, either add it to your hosts file, or use an extension like leechblock or chrome nanny to prevent you going back.

  • If you catch yourself procrastinating, get up from the computer and walk away. Take five minutes, and when your mind wanders back to the work you were doing, go back to the computer.

  • If you use the Pomodoro system, mark down every time you think about procrastinating on a website. Your mind is not focussed on your work, so count this as a distraction. This may happen tens of times in a pomodoro if you're used to procrastinating. I've found that getting up and walking away serves as a form of punishment and I'm less easily distracted the next time I sit back down.

share|improve this answer
Thanks, adding warning message to hosts file is a good idea, Maybe some scary ASCII art :) – d1001001 Oct 18 '12 at 3:13

Have you tried the LeechBlock Firefox extension? You can block sites and set a time duration or time period for how long the are blocked. And it takes wildcards like * Although, you do ultimately control it, so it has it's limitations.

Ideally you would have all of your HTML/pdf/txt reference material for your language(s) loaded onto this special version of Linux or available in print books sitting by the computer so you can have your computer not set up for any internet connectivity. Install everything via USB stick or CD/DVD. Do everything that you can each day without having to do a search, and wait till the end of the day to reboot to search for information to handle unsolved issues.

share|improve this answer

There is no need to rely on your willpower or easily circumventable obstacles. If you are a lifelong procrastinator, you probably know that all sorts of tricks work until their novelty wears off.

You can actually lock yourself out of the Internet at specified periods of time using the "pam_time" module. You should also be able to white-lists certain web sites.

Putting limits on one's time online

How to lock yourself out of the primary account temporarily

share|improve this answer

It may be possible to do everything using Linux Run levels. You could edit one of your unused run levels (3-5 usually) to only start applications you need. For what it sounds like you are doing you could even have it not start X and instead just give you GNU screen with vim and W3M or another terminal based web browser.

A text only browser would also help because you shouldn't get as distracted with ads or notifications from addons. As suggested above, this run level could also change your environment so that you use a tiling window manager etc.

To switch your run level you can simply use su -c 'init 3' and when you are done go back to your default run level with su -c 'init 5' (assuming your default runlevel is 5.

Another option would be to use your normal run level but use a different browser profile with addons/settings that specifically hinder your ability to get distracted. Chromium and Firefox both support multiple profiles and can easily be set up with plugins to disallow scripting, notifications, etc. Since web browsing is your biggest time waster this would be the easier approach and probably faster to implement.

share|improve this answer

Some ideas that help me:

  • Use multiple browsers.
    I use Opera for personal stuff, it has all my personal bookmarks for everything I'm into. Then I use Firefox for work. This way I can separate my email (I use gmail in both cases). Not having the browser (Opera in my case) open at all then help me only look at work related stuff in firefox.

  • Use multiple Stack Overflow Accounts
    Use this not to game the system - don't vote for your other account - but you can use an extra account for work related question and you won't be distracted by the SO activity on your main account. You can also use this approach to ask 'stupid' question that you think are good questions but you don't want them on your main profile.

  • Use multiple workspaces. I use Linux (Ubuntu) and sometimes I use the multiple workspaces to segregate my work. Then I can ctrl - alt arrow between them with all my work stuff in one and personal stuff in another.

  • Eliminate sense distractions. Not specific to your main question of how to set up the workstation, but I also find that paying attention to the five senses also help with the focus and concentration you are seeking, so pay attention to:

    • Noise
      Whatever works for you:- ignore, seek silence, use earplugs or use headphones
    • Sight
      I cut out visual distractions with multiple monitors to block the open view.
    • Touch
      Get a comfortable chair that works well for long periods. A wireless mouse and an comfortable external keyboard.
    • Smell
      Lets hope there's not too much here. Maybe take a shower and get some flowers.
    • Taste
      A constant supply of coffee and a good lunch are important to me.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.