Distraction Affliction Correction Extension

Lots of people have asked me for the system I used to implement the restriction in the alt-text of today’s comic.

At various times, I thought of doing it with an X modification, Firefox extension, a Chrome add-on, an irssi script, etc—but none of them worked too well (or involved a lot of sustained undistracted effort, which was sort of a Catch-22).  Then I hit on a much simpler solution:

I made it a rule that as soon as I finished any task, or got bored with it, I had to power off my computer.

I could turn it back on right away—this wasn’t about trying to use the computer less. The rule was just that the moment I finished (or lost interest in) the thing I was doing, and felt like checking Google News et. al., before I had time to think too much, I’d start the shutdown process.  There was no struggle of willpower; I knew that after I hit the button, I could decide to do anything I wanted. But if I decided to look at a website, I’d have to wait through the startup, and once I was done, I’d have to turn it off again before doing anything else. (This works best if your ongoing activities are persistent online—for example, all my IRC chat is through irssi running in screen, so turning off my laptop doesn’t make me sign out.)

Other ‘honor system’ approaches have never worked for me.  Blocking the sites (or keeping the computer off) didn’t work—I could always find a way to argue with myself. I’d decide this day needed to be an exception for some reason, think of a project that required the computer, or just grow frustrated after a few hours and get really curious about something I’d seen a website somewhere.  There’s some interesting research about novelty and dopamine, suggesting (tentatively) that for some people exposure to novelty may activate the same reward system that drug abuse does.  In my case, I felt like my problem was that whenever I was trying to focus on a (rewarding) project, these sites were always in the background offering a quicker and easier rush.  I’d sit down to write code, draw something, build something, or clean, and the moment I hit a little bump—math I wasn’t sure how to handle, a sentence I couldn’t word right, an electronic part I couldn’t find, or a sock without a mate—I’d find myself switching to one of these sites and refreshing.  Reward was briefly unavailable from the project, but constantly available from the internet.  Adding the time-delay removed the promise of instant novelty, and perhaps helped disconnect the action from the reward in my head.  Without that connection dominating my decisions, I could think more clearly about whether the task was really important to me.

Beyond that one rule, I put no other restrictions on myself.  Want to go read a 17-part Cracked article?  Fine!  Think you might have an important email?  Go check.  Feel like looking at Reddit for the 20th time today?  Go for it; you might find something interesting (hey, it’s where I found that dopamine article).  Want to play Manufactoria until your eyes bubble?  Absolutely.  The only catch is that you have to stare at a startup screen for 30-60 seconds first. (If you have one of those instant-boot laptops, you’re out of luck.)

It was remarkable how quickly the urges to constantly check those sites vanished. Also remarkable was that for the first time in years, I was keeping my room clean. Since the computer was no longer an instant novelty dispenser, when I got antsy or bored I’d look around my room for a distraction, and wind up picking up a random object and putting it away.

I’ve since relaxed this restriction; the family health situation I mentioned a while back has meant that I’ve had less free time lately, and when I do, mindless distractions have been welcome (thank you again to everyone who sent in games!). But just following this system for a short time was enough to break most of my distracting website habits completely, and when things return to normal around here I’ll probably start using it again.

There’s still a place for a browser extension, though.  A lot of peoples’ jobs require them to be on a computer running something all the time, or can’t shut down for other reasons, so my quick turning-the-computer-off trick won’t work for them.  None of my abortive attempts are worth building on, but if someone’s looking for a quick project, building an extension like this might be a good one.  It could let you impose a delay like this on loading a new page, or a page outside the current domain, or refreshing a page you’re already on (and no, just running the browser under Vista on a Pentium-133 doesn’t count).  If anyone makes a good one, I’d be happy to share it here .  Just post a link in the comments!

210 replies on “Distraction Affliction Correction Extension”

  1. Well, unless you’re, say, downloading something at the time of the power off…

    Like

  2. Leechblock is simple and effective. It also covers IE as well on systems with firefox installed, which prevents workaround pretty well. It has trouble recognizing SOME sites, and you really should be comprehensive with what sites leech your time.

    However, that said, it’s MUCH better than nothing. 15 minutes per 3 hours is about as much as I need.

    https://addons.mozilla.org/en-US/firefox/addon/leechblock/

    Like

  3. Actually I’d be happy with one that just delayed firefox starting. The rest of what’s on the computer isn’t really a problem for me.

    Like

  4. I would pay a month’s salary to have a machine that can shut down and reboot in less than 30 seconds. Geez. Maybe it’s because I run so many things.

    Even if I had it, additional time penalties would be imposed when I wanted to get back to work because all of those things have to be restarted and large projects reloaded.

    Like

  5. At work, you could put your “fun browser” in a VM, which must be spun up for a hit, then spun back down.

    (Or even a separate browser, depending on your workstation speed versus impatience. 😉

    -danny

    Like

  6. But aren’t you also penalizing legitimate performance enhancing multi-tasking as well?

    What about distractions that will legitimately take only a few seconds to handle? Do you stop everything you’re doing and shut everything down just because you suddenly remember you were supposed to send a two sentence email?

    Do you have rules to handle that sort of thing, Or do you just consider this sort of thing an “Acceptable loss” in the face of your overall performance increase?

    Like

  7. The trouble with the heuristic of “loading a new site” for a web browser extension is that a) I can easily parallelize distraction by loading multiple tabs in the background, and b) sometimes in the process of doing a single task I must load many sites.

    Interesting idea, though.

    Like

  8. > But aren’t you also penalizing legitimate performance enhancing multi-tasking as well?

    Yes, but in my experience, it was not very much! YMMV, depending what you do. But in my case, handling email a few times a day and not worrying about it otherwise meant that I got a lot more email properly and fully handled than if I just saw it and filed it as “work on that when I’m less busy”. If you have to watch for new email as part of your job, you have to watch for new email as part of your job, and that’s that.

    > The trouble with the heuristic of “loading a new site” for a web browser extension is that a) I can easily parallelize distraction by loading multiple tabs in the background, and b) sometimes in the process of doing a single task I must load many sites.

    The extension a friend and I started writing could restrict you to one site at a time, but I’m not even sure that’s necessary. Just knowing that reddit wouldn’t be there for a minute would be enough to make me decide I didn’t really need reddit. You can do the workaround, but the idea is that you’d be making that decision on the basis of delayed gratification, and that means it’s more likely that you’re doing it for better reasons. This also goes for (b) — if they’re important, load them in the background, or wait 30 seconds for each. If you need to load many sites in a short time very frequently, then this solution might not work for you, or you might want to have a blacklist. Again, I’m just describing what worked for me.

    Like

  9. I think the key to happiness is balance, so completing tasks is equally important as allowing yourself not to complete tasks. But I might just be lazy 🙂

    Like

  10. I second the use of Leechblock and StayFocusd. We all have finite willpower, why use it to refrain from looking at websites? Automate that process and use your finite willpower for Awesome instead.

    If delaying is what works for you, that’s good too.

    Like

  11. A friend of mine made http://howaboutyoufoc.us/ as a joke (or more, found the domain, then made the site to go with it). I keep a bookmark to it in my bookmarks bar in firefox, just the reminder alone has been enough to stop me from getting into a wikipedia tree a couple of times and go do something more important

    Like

  12. I went ahead and created a simple google chrome extension to do this.

    Source: https://github.com/bwr/WebDelay
    Packaged Extension: http://dl.dropbox.com/u/6411024/WebDelay.crx

    By default it is set to delay for 30 seconds when accessing the websites twitter, facebook, or google reader. Both the amount of time and the list of sites can be changed in the extension’s options.

    This was my first google chrome extension and I’ve practically never used javascript before so there may be some bugs or other issues but it seems to work.

    Like

  13. I wonder wether the concious act of rebooting yourself is essential to the strategy. You trained yourself to obey this restriction, getting a reward out of doing as trained. If you used a plugin that just blocked page loads, this would be punishment only. So I think it is important to _allow_ there to be a way out _and_ reward yourself if you obey the set constraint. Actual work done might be reward enough, but not always.

    In the end, you should not need a blocking plugin anymore.

    Like

  14. Irony of ironies. I read you thru Google RSS, which ended your post with the following:

    You have no more items.
    But wait! We have recommended items waiting for you to read.
    Sweet! Show me my recommendations

    –gene chase

    Like

  15. I tried chrome this extension to inject some javascript code and it worked perfectly to hide facebook for 30 secs each time the page gets focus:

    https://chrome.google.com/extensions/detail/pdfbjinabdohnegjnbfgdgohlhegamnm

    JS code is:

    window.addEventListener(‘focus’, function() {
    document.body.style.display=’none’;
    setTimeout(“document.body.style.display=”;”, 30000);
    });

    You can set it up to inject the code for any regular expression on the URL.

    Like

  16. Great suggestion xkcd!

    (“Actually I’d be happy with one that just delayed firefox starting.”

    What? Firefox starts right up for someone?)

    Like

  17. Aza Raskin had an idea a while back – based, interestingly enough, on the great firewall of China: don’t BLOCK timewasting sites, just randomly degrade them over time. Here’s his writeup:

    http://www.azarask.in/blog/post/chinas-great-firewall-productivity/

    I toyed briefly with writing such a proxy, but in the end decided I didn’t have enough time to spend on it. Slashdot ain’t gonna surf itself, after all. 🙂

    Like

  18. I’ve often tried to find a solution like yours, but I need to use my computer to work, so its more a question of finding an irritant to random browsing which unbalances the reward to effort, while still allowing me to code. I made two little toys which tried to solve that (but I probably spent more time playing with them than I saved :P)

    I wrote a greasemonkey script which removes the Facebook newsfeed — once you can’t look at what is going on with other people it gets pretty boring. http://toys.byjp.me/blinkers

    I also wrote (a long time ago) an app which feigned being a web browser so that when it’s the default web browser you can click on a link in an email/tweet/rss item it would open in a real browser, but only after forcing you to wait through the old dial up modem noise: http://vimeo.com/9632924

    If anyone out there has reasonable graphical coding skills I’d love to see a version of this idea that doesn’t suck (like mine did :P)

    Cheers!

    Like

  19. I use the .hosts file (on my work computer) – it is a bit on the extreme end of things, but it works very very well, and is a major hassle* to change.

    *takes about 1 minute

    Like

  20. Here’s one I was doing for a while:

    With the exception of doing “real work”, all computer use must be done standing up.

    It quickly took the fun (was it “fun”?) out of procrastinating, and broke the click-trance.

    Like

  21. This is why upgrading from dial-up to overhyped-speed Internet doesn’t increase productivity. (I should know; I did the transition under 6 months ago.)

    We X users can just turn off X, or, if we really need a GUI for something, stop using the full gnome/kde installation and just use the window manager (or use a simpler, more worthless window manager, or use no window manager at all), preventing us from having an easy way to open distracting applications.

    It used to be effective to uninstall all nonfree software on linux (except, if absolutely necessary, the wireless driver). Aside from the obvious disappearance of flash, you would also loose (on many systems) the ability for high-resolution graphics. You could still use gnome/whatever, but it would be a subtle pain to deal with. The extra frustration – usually not enough to be consciously noticed – would nevertheless be enough to destroy the thrill of surfing.

    Like

  22. Evil evil humor, I need to write a paper and I’m reading the comics instead. You’re so cruuuel. (I love the Snapple joke best so far)

    Like

  23. Ironically enough, setting up the StayFocusd extension is proving difficult BECAUSE it doesn’t provide an instant fix.

    Like

  24. A superior idea to my others: Run xlock for 30 seconds. The -endCmd could be used to enforce this. Perhaps an easier way is to use the -erasedelay.

    Like

  25. As you insist that the power of your power-off trick stems from the delay of 30-60 seconds, why wouldn’t you just make a hotkey to call one of those anti-RSI programs like Workrave to block the screen for 60 seconds? Or even just a regular screen lock that requires you to enter the password to unlock but only allows to unblock 60 seconds at earliest…

    Actually, you made me think that maybe I need to introduce a rule like this, but instead of powering off the laptop just walking away for > 1 minute. And it even sounds healthy!

    Like

  26. You know, I was gonna just email you for the code, demanding it at gunpoint (so to speak).

    But then I looked at the Blog.

    If it works-I will owe you so much.

    So.

    So.

    Much.

    Like

  27. Mahdi’s suggestion works (with slight modification) as a script installed with the greasemonkey extension to firefox:

    window.addEventListener(‘focus’, function() {
    document.body.style.display=”none”;
    setTimeout(“document.body.style.display=”;”, 30000);
    }, false);
    window.addEventListener(‘load’, function() {
    document.body.style.display=”none”;
    setTimeout(“document.body.style.display=”;”, 30000);
    }, false);

    By the way, these comments get auto-formatted, so copy-and-paste might not work. It should be display=(apostrophe)(apostraphe)(semicolon)(double-quotation-mark).

    Greasemonkey makes it easy to define a blacklist where this applies (using regular expressions).

    The loophole is that you can click the greasemonkey icon to immediately turn this feature off. But so far I have enough self-control to not do that. 🙂

    I’m finding this a nice complement to Leechblock…Using leechblock during working hours, delay-script 24/7.

    Like

  28. I concur with ZYV: workrave with a 60 lock.

    Which, incidentally, allows to fix the problem I would have with this – I have (at least) two computers I work with regularly. With workrave I can network them to lock them out at the same time.

    Like

  29. Wish I had found these great ideas while I was in college. Instead, I failed the same class 3 times and dropped out. It was the only class I needed to graduate.

    Like

  30. Just started using Chrome and StayFocusd. StayFocusd is pretty good, but it’s missing a number of features which would make it much more useful, like the ability to set different timers for different days or different sites.

    Don’t enable the “Challenge” mode though, unless you’re REALLY REALLY confident about your typing skills, or you hunt and peck.

    Like

  31. Here’s something I threw together in Adobe Flash:
    http://dl.dropbox.com/u/5869687/GratificationDelayer.exe
    Here, also, is the ShockWaveFlash (SWF) file:
    http://dl.dropbox.com/u/5869687/GratificationDelayer.swf

    1. If a longer delay is needed, I can make that.
    2. This is made so the mouse MUST be kept in the circle during the delay time for the tab to open (NO ALT TAB FOR YOU!).

    If you can condition yourself to use this on those quick novelty sites, you should soon break the habit (easier than rebooting, too!)

    Like

  32. I was originally trying to make a user script but couldn’t find a way to make it not flash initially. I ended up making a Chrome extension, https://github.com/scragz/chrome-add

    You can download that and tell Chrome to load unpacked extension. Loads on new tabs, not each tab switch (I put it with StayFocused so I end up closing the tabs). Configurable delay, configurable site list.

    Like

  33. Hey Ross:
    I’ll be happy to build you a computer (OS included) that could start up and shut down in 30 seconds (each–though a 30-second reboot is possible with the right hardware.)

    Of course, if you want it to run Windows programs, you’ll be stuck with Wine. 😛

    (If you’re really serious, my email’s is the username-website field.)

    Like

  34. I find it a bit weird that people are jumping straight into implementing overly geeky ways to stay focused. So, for how long will your system work? I’m pretty sure it won’t last a lifetime and most of you will switch back to instant-reward website browsing (my guess is Friday afternoon)

    So, if you compare the time spent on reading this, researching and experimenting + the idle time vs the gain of staying focused – the bottom line may well be that this activitiy is actually one of the distractions 🙂

    I (obviously) also have some trouble with staying focused and I’m putting my willpower to work on that, sometimes in vain – but hey, using artificial barriers is a bit like quiting smoking with tabex. I find it much cooler to quit like a real man – just decide and stop doing it

    Also, I must admit that the mindless browsing of websites has made a good part of what I call me; hell, I don’t even regret the time spent on /b/… but maybe I have always managed to keep it to a reasonable level. If you can’t do that – maybe my introduction to time management will help:
    http://deathasingularityornothing.blogspot.com/2010/04/time-management-is-no-joke.html

    Like

Comments are closed.

%d bloggers like this: