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. I’m a big fan of automating things that can be automated. While I like Randall’s idea, I would much prefer something that will manage itself for me!

    I’ve put up a description of an old strategy, and a automated take on Randall’s delay system on my blog

    http://andrewrussell.net/2011/02/productivity-vs-the-internet/

    In reply to Vroomfundel, and those who say that time setting up these systems is “wasted”. It’s not a question of the raw time spent distracted vs time spent implementing a solution (I think this wins anyway). It’s more to prevent fragmenting your time or getting knocked out of “the zone”.

    It’s not the amount of time – it’s how you use it.

    Like

  2. Here’s a quick way I just posted on xkcd forums to delay the opening of any program in Win, doing something similar in shell shouldn’t be too hard:

    @echo off
    echo Starting Firefox in 10 seconds…
    ping -n 10 127.0.0.1>nul
    start “” “C:Archivos de programaMozilla Firefoxfirefox.exe”

    Like

  3. scragz, tnx a lot! Works like a charm. As a slight improvement I modified the options.html file to make the input field for the websites a lot larger, which makes adding sites somewhat more convenient. If anyone’s interested (and scragz doesn’t object of course) I can share it, but I guess anyone on this site is able to make some slight HTML modifications in the right place :).

    Like

  4. If people are interested in a kwin plugin for kde that accomplishes this, I made one based on the ‘dim inactive’ plugin in kde, unfortunately it’s rather crude, just send me an email if you want the patch, and I’ll clean it up a little more: @gmail.com

    What it does is that it blacks the windows for a variable amount of time, based on the formula saturation/brightness = ^4, so initially it will be very black, then slowly rise to normal, t0 is variable, but I prefer to set it to 30. Only disadvantage is that you can unset it by simply disable compositing

    Like

  5. I found that I have the same problem (I’m having it right now actually.) I need to be able to check the internet somewhat often for group work, but find myself doings things that hinder productivity.

    One solution I’ve found (for PC users at least, I’m sure the same could be done for mac users with terminal or w/e its called) its to run the command line (Start -> Run -> type CMD) then to release your internet settings (once in command prompt, type -> ipconfig /release and hit ENTER) and close the command prompt. Now when I try to reload a page or open a tab I get an error. To fix this simply open up the command prompt again and type ipconfig /renew.

    Its a crude method, but every time I want to slack off I have to manually restore the internet. Hope this helps. Now back to not writing my 8 page paper.

    Like

  6. I too find scragz’s extension very helpful, but I modified it to not countdown on pages that are in the background. So now I can’t open a lot of tabs and just wait 30 (or whatever) seconds to read them all, instead I need to sit with a blank page before I can see it and repeat it for each and every tab. Unfortunately, a lot of sites use javascript to refresh page content (i think so; i’m not a web programmer), so the page itself is not refreshed, and script fails to block it. It means I need some discipline to refresh such pages manually instead of immediately seeing new content. But I’d still prefer some automated approach. Maybe I’ll just block such pages when I switch to them in addition to refreshing. Yeah, good idea.

    Like

  7. I’ve got exactly opposite problem. My working project is so slow that it takes 30 secs to load up, and around 45 seconds to build. So I have lots of idle time during which I always find something to distract myself, which of course I end up doing longer then loading/building takes :.

    Like

  8. How about a toolbar icon with a key combination that, when activated, inescapably displays your To Do list for 30 seconds full screen?

    Like

  9. Since most WinTel machines require much more than 30 sec to shut down and reboot, you can set the power switch to hibernate. That typically takes about that time and may serve the same purpose. My $0.02 worth

    Like

  10. Actually, i do run a 4 year old windows vista with a Pentium-133. refreshing my page probably takes longer than you shutting your computer down 😀

    Like

  11. Here’s a slick way to make a Windows desktop shortcut that just turns off your monitor for 30 seconds. (You can wake it prematurely with the mouse or keyboard.)

    1. Download NirCmd from the bottom of this page: http://www.nirsoft.net/utils/nircmd.html. Copy the unzipped files to C:Program FilesNirCmd.

    2. Make a text file somewhere like C:Program FilesScripts and rename it “blackout.bat”. Put this in the file:
    @echo off
    “C:Program FilesNirCmdnircmd.exe” cmdwait 200 monitor off
    “C:Program FilesNirCmdnircmd.exe” cmdwait %1000 monitor on

    3. Right-click blackout.bat, select “Send to > Desktop (create shortcut)”.

    4. Right-click the shortcut icon on your Desktop, select “Properties”. Add a duration, in seconds, to the “Target:” line, so it looks like this:
    “C:Program FilesScriptsblackout.bat” 30

    Change “Run:” to “Minimized” to prevent a black window from popping up. Optionally customize the “Shortcut key:”, “Change Icon…”, and the icon name.

    If you want to remove the name text under the icon, type Alt+0160 on the keyboard numpad to insert a special space character, or alternately open the Windows Character Map to select and copy the space character (the blank box about 5 rows down).

    Like

  12. In the above comment, make sure you *re-type* the quotation marks when you copy anything. The page automatically inserted angled quotation marks, and those won’t work.

    Like

  13. As a college student, I frequently elect to go to a public computer lab to do work that I could, theoretically, accomplish just fine in my dorm room. Just the fact that the other people around me can see what I’m doing generally keeps me off of Facebook, webcomics, etc.

    Like

  14. Here are 3 tricks I use:

    3. If I really want to read an article, I print it out, then step away from the computer and read it.
    2. The ReadItLater Firefox extension / bookmarklet / website.
    1. Shut down my browser and mail client whenever possible.

    Like

  15. I use selfcontrol (OSX) which blocks all sites on a blacklist (make sure wikipedia is on your blacklist!) OR only allows sites on a whitelist for a predefined period of time. I LOVE it. Pretty sure it’s free:

    http://visitsteve.com/made/selfcontrol/

    I’m sure you could find your way around it if you’re good with networking stuff, but if you’re going that far to check engadget.com you’re beyond help. 😉

    Like

  16. iabon, thanks for the step-by-step, blackout is pretty handy. I hadn’t realized what adverse physical conditions I was tolerating just to keep on using my PC, until I went on 30-second blackout. Not only was I sitting in some position requiring horrific arching of my back, but my bladder was nearing its 2 liter capacity.

    Like

  17. And as an added bonus, if you’re rebooting the computer many times a day, Windows is far less likely to crash or otherwise get wonky, since the usual “cure” for these problems is usually to reboot!

    Like

  18. iabon, I love this idea, but I can’t make it last the full 30 seconds on my windows 7 PC. For one thing, the line [“C:Program FilesScriptsblackout.bat” 30] keeps editing out the apostrophes when I type it in, and the blackout fades when I bump the mouse. Other than that it seems perfect for keeping programs running while I deprogram my novelty response. If you have any suggestions, I’d appreciate hearing them at gmail of my username.

    Like

  19. My own experience—and I concede I might be unique—is that “time-wasting” behavior on the web (i.e. cycling through the same sites over and over) is actually positively correlated with productivity on things I enjoy doing. My conjectured reason is that when I’m doing something I enjoy, I’m working the fastest, and when I need to stop to think about what I’m doing, quickly swapping over to a browser and hitting some site I look at frequently stimulates my brain. I still want to get back to what I was doing, I just needed a small diversion. Without that ability I’m not sure I’d be as productive.

    For the things I don’t want to do, I know I’ll find ways to procrastinate whether I can access the web easily or not. In fact, when I’m procrastinating on something I don’t want to do something, my web surfing drops because I find some game on Kongregate or something and devote hours to it. If I couldn’t access Kongregate I’d just pick up a book instead.

    Like

  20. I may try either the reboot or hibernate trick on windows, although it’s a bit of a problem if I’m in the middle of writing/working on a document.

    Without RTFAing, I’m totally willing to believe I’m in some kind of mild addiction to stupid web crap, in that I can semi-consciously feel the dopamine drop whenever I’m not re-stimulated quickly enough. I find myself semi-compulsively always clicking through to unread emails, just because there’s something new there.

    When possible, I find listening to music loudly enough to drown out background noise (via headphones) helps me a lot, as it provides just enough distraction to keep me focused on what I’m supposed to be doing. Unfortunately, it tethers me to my machine (no mobile player), and occasionally a new song on Pandora sends me into a flurry of music/artist research that rivals the XKCD “Problem with Wikipedia” article. Still, it’s a net productivity win compared to staring blankly at engineering test reports.

    Like

  21. The method, I use at the moment: if I want to play an online game, I have to play my double bass first. That keeps me from playing online games, improves my music skills. Ok, my room is still a mess. 😉

    Like

  22. Interesting idea! For those of us who can’t just turn off their computer for one reason or another and don’t want the complexity of a browser plugin… how about the following script, let’s call it “firepause”:


    #!/bin/bash

    pid=$(ps -U $(whoami) | grep firefox | cut -f 1 -d ' ')
    kill -s SIGSTOP $pid
    sleep 30
    kill -s SIGCONT $pid

    Obviously a similar thing will work on any unix box, and since it uses standard unix process control it can be used against any program, not just firefox…

    I think I’ll attach it to a window manager shortcut and see how I go 🙂

    Like

  23. I’m using a similar system. I’ve two user profiles on windows: “work” and “master”. Under “work” profile i don’t have any passwords or cookies stored in browser, so to check the Facebook or anything else I have to switch profiles. It doesn’t take 30 seconds, but this effort is enough for me for not doing so.

    Like

  24. eng.Mruwnica, that jogged my memory. One time I created a randomly generated password that was about 16 characters long — too long for me to memorize at a glance. Trying my best not to look at it, I copied it, then saved it into a file with some name like “unknown password”, which I then closed. Then, while the password was still in my computer’s copy/paste memory, I changed my passwords to social networking accounts, like facebook, to the new password, which I didn’t know but technically did have access to. When you paste the password into “New Password” and “New Password Confirmation” fields, it only pulls up astrices, so at this point there was no chance I would see it. That way, in order to access any of those services, I would first have to open the file and copy/paste the password. Just this 10-15 second procedure was really effective in cutting down on my usage of those services.

    Like

  25. Dopamine controls reinforcement. This includes novel experiences, drugs, or the thrill of beating the next level of a video game. This is why those experiences are all so similar and addictive. They also all inevitably result in the raising of your threshold for such a thing, due to the change in homeostasis in dopamine. This means that, essentially, every reinforcing activity loses its value after repeated exposure. However, you will want that reinforcement again, and will continue to try until you get out less than you put in. Qualitative, not quantitative, novelty is the only solution to this problem. It is nice that we are set up this way, so we don’t just do one thing over and over until we die (usually), but it is shitty that we are set up this way because we do the same thing over and over until it gets really dull and useless. If you want to discuss neuroscience further, feel free to contact me.

    Like

  26. Oops, my script above doesn’t always work because “cut” counts initial whitespace as creating a blank column and ps right-justifies the pid’s in the first column, ugh. Try this instead:


    #!/bin/bash

    pid=$(ps -U $(whoami) | awk '/firefox/ {print $1}')
    kill -s SIGSTOP $pid
    sleep 30
    kill -s SIGCONT $pid

    Like

  27. But… but this would mean less clicks on XKCD!

    (but probably just as many comic views, just no clicking on it at random times to see if something new popped up).

    Also, I’ve found that, oddly, getting a mobile phone helped a bit with this. If I institute a rule that I can go on the internet… but only with my phone… I find that I do it a lot less than I would otherwise, especially if there is no wireless connection. I think it is the same thing… it is so much slower, that I only check the things I really want to see.

    Maybe I should be doing this right now rather than posting on your blag 🙂

    Like

  28. I also found scragz chrome extension VERY useful.

    Mudak mentioned he modified it such that it would only run the countdown on webpages that were in focus. Does anyone know how to accomplish this?

    Thank you very much!

    Like

  29. I believe the solution for this is called dial-up.

    But seriously, I can relate to the mentioned affliction. Smart phones affect a similar dilemma, albeit, (at least mine is) not as snappy.

    Like

  30. Sadly, none of these solutions help me stop reading *entire* comment threads on sites I already have open…

    Like

  31. Here’s a simpler and maybe better way, updated from my comment above, to make a Windows desktop shortcut that just blacks out your monitor for 30 seconds. (You can wake it prematurely with the mouse or keyboard.) It uses a screensaver instead of turning off your monitor with NirCmd. Make sure you *re-type* the quotation marks when you copy anything, as these comments automatically insert angled quotes, and those won’t work.

    1. Make a text file somewhere like C:Program FilesScripts and rename it “blackout.bat”. Put this in the file:

    @echo off
    set scrPath=”C:WindowsSystem32scrnsave.scr”

    for %%A in (%scrPath%) do set scrName=%%~nxA
    start “” %scrPath% /s
    ping 1.1.1.1 -n 1 -w %1000 >nul
    taskkill /IM %scrName%
    exit

    2. If you want to use a screensaver other than the plain blank-screen one, search your computer for *.scr files, and update the scrPath in the second line of blackout.bat.

    3. Right-click blackout.bat, select “Send to > Desktop (create shortcut)”.

    4. Right-click the shortcut icon on your Desktop, select “Properties”. Add a duration (in seconds) to the end of the “Target:” line, so it looks like this:
    “C:Program FilesScriptsblackout.bat” 30
    (The quotation marks may be absent; that’s okay if it still works.)

    Change “Run:” to “Minimized” to prevent a black window from popping up. Optionally customize the “Shortcut key:”, “Change Icon…”, and the icon name.

    If you want to remove the name text under the icon, type Alt+0160 on the keyboard numpad to insert a special space character, or alternately open the Windows Character Map to select and copy the space character (the blank box about 5 rows down).

    Like

  32. ADDelay has been a great help for me in cutting down on the impulsive actions already. I made some improvements tonight, mainly only counting down while focused like a few folks had mentioned (strict mode).

    I also refactored it all so hopefully the title works a little more reliably, and added a confirm so you can’t just load it in a bg tab even without strict mode enabled.

    Patches are welcome for anything else, of course.

    Like

  33. it’s so ironic that i’m reading this when i should be going out to a doctor’s appointment. later i’ll read the 93 comments; i hope i can find help, because sometimes i feel i need some. when i don’t fight it, internet takes away hours from my day

    Like

Comments are closed.

%d bloggers like this: