Procrastination
January 29, 2005 5:50 PM   Subscribe

ProcrastinationFilter: Help me hack myself out of wasting time on the Internet. I want to only allow myself 2 hours of bloglines a day - is there a technological solution (that will work on my PowerBook)? [MI]

I've got a PhD thesis to do, which relies heavily on Internet research, but somehow instead of doing that I end up checking Bloglines and a few fora, endlessly, endlessly. Additionally, in combination with the student lifestyle, laptop and wireless broadband at home, it is hard for me to get out of bed without basically ringing someone up and arranging to do something with them - and this rarely happens before noon!

So, I want to make my computer forbid me from visiting my procrastination sites outside of the hours of, say, 8pm to 10pm. Can I make a script that edits the HOSTS file, or the firewall config? I still need to be able to visit other, non-procrastination sites all the time. A free/Free solution is ideal.
posted by cogat to Computers & Internet (22 answers total) 2 users marked this as a favorite
 
Maybe buy yourself some nanny software and when you need to work log-in to your computer as a "child". When in parent-mode, add your favourite blogs etc. to the list of forbidden sites.
posted by duck at 7:00 PM on January 29, 2005


Ahh! I am in the same boat. I am trying to write my MA thesis, and Bloglines is totally fucking killing me.

Way, way, way more addicting than crack.

I am in the "holy shit, I am running out of time" phase of the game, so I am kind of freaking out, and that is getting my ass in gear.

My thesis is on Metafilter, BTW, which makes things even worse for me, as I am on here all the time - wasting time and "researching" at the same time.
posted by Quartermass at 7:06 PM on January 29, 2005


I'm supposed to be working on my MA thesis, too, and this is the first I have heard of this bloglines. Now I am terrified that I'll go check it out when I should be working. Thanks. :)
posted by synecdoche at 7:16 PM on January 29, 2005


What you'd normally do is make two scripts, one to change hosts file to close off the sites and one to turn it back. As you probably know there's a service called cron that lets you edit a configuration script to run commands at specified times. So add two cron jobs by editing /etc/crontab and adding two lines like this:
* 20 * * * me /path/to/allowscript* 22 * * * me /path/to/banscript
The items on each line are are day, hour, day of month, month, day of week, user, and command to run. The days are in 24-hour format. All we care about is running the scripts at 8 and 10 respectively so just put the time, your username and the path and leave the others default by putting a *.

The scripts can be written in anything, probably Perl or AppleScript, but I'm best at Tcl so:


Ban script:
#!/usr/bin/tclshset blocked {www.bloglines.comwww.metafilter.com} ;# Edit this list to change the blocked sites obviouslyset wf [open /etc/hosts a]foreach host $blocked {  puts $wf "0.0.0.0 $host #naughty"}close $wf
Allow script:
#!/usr/bin/tclshset rf [open /etc/hosts]set data [read $rf]close $rfset wf [open /etc/hosts w]foreach line [split $data \n] {  if {![regexp "#naughty$" $line]} {puts $wf $line}}

posted by abcde at 7:56 PM on January 29, 2005


Do we have to name the scripts anything special? What if we want to run them from the command line?

Thanks from another graduate student here....
posted by josh at 8:04 PM on January 29, 2005


Actually, I don't know how OS X does the permissions, but you most likely should just set up the cron job to run as root, not your own username.

josh: You name the scripts whatever names you put in the crontab (in my example you use banscript and allowscript).

You can also do it in Windows by using the Scheduled Events feature in the control panel. OS X might actually have a GUI front-end like that for cron but again I don't have a mac yet so I don't know.
posted by abcde at 8:24 PM on January 29, 2005


Also, if you do use my scripts, you're going to need Tcl, which I don't know if OS X comes with nowdays (probably not) so you can get it here.
posted by abcde at 8:34 PM on January 29, 2005


Oh, and if you want to run it from the command line, type in its name (you may have to put a ./ before it depending on how X sets up its PATH). You can probably just click on it. This all applies to any kind of script.
posted by abcde at 8:47 PM on January 29, 2005


OS X might actually have a GUI front-end like that for cron but again I don't have a mac yet so I don't know.

Cronnix.
posted by AlexReynolds at 9:31 PM on January 29, 2005


cogat: I think the easiest way would be to just edit the HOSTS file to block the top 10 or 20 sites you are addicted to, not just bloglines.

Step 1: Use this tool to block sites, and then add custom addresses following the template. Block proxy sites that you know of as well, if you are a hardcore Bloglines addict like me. Hell, just take your internet history and cut and paste it.

Step 2: ??

Step 3: Use something like this to protect the files from being edited so you can't edit the files and allow yourself to access the HOSTS file. Have a reliable friend you trust set the password for access so you can't just go back and change it yourself.

Good luck, I feel your pain.
posted by tweak at 11:03 PM on January 29, 2005


Response by poster: Thanks everyone, especially abcde. That should do the trick - the only time I can see it going wrong is if the computer is off at 8pm or 10pm, then the cron will get missed.... a google tells me anacron is the way round that...
posted by cogat at 1:58 AM on January 30, 2005


This is crazy. Why not just learn to optimize your reading? I used to take an hour a day to go through all of my feeds, but now I can do it in twenty minutes.

Here's how I did it: Use a proper news reader like NewsFire. Create a Smart Feed so that all new items end up in a long list for you. Scroll through and alt+click on the ones you want to read, then click 'Mark All As Read'.. bam, all your news is gone. Then go to Safari and go through each tab of all the pages you wanted to read. Read through whatever you like, not spending more than a minute or two on each page. Complete.

It just strikes me as a world gone mad when you have resort to weird tricks like changing DNS entries to stop you doing something! We're not children.. just allocate time and stick to it.
posted by wackybrit at 5:15 AM on January 30, 2005


abcde - shouldn't there be zeros to the left of the values given, not asterisks? iirc, * 20 * * * me /path/to/allowscript is going to run the script every minute of hour 20. that's probably not what you wanted. instead, use 0 20 * * * me /path/to/allowscript

(from bitter experience - i scheduled a task to send an email to someone once a day, and ended up sending it every minute....)
posted by andrew cooke at 5:42 AM on January 30, 2005


Non-technical solution: Turn the computer off, pack up some of your notes and a blank pad of paper and go to a coffee shop. Write out four or five pages of your dissertation in longhand. This will help you focus on the task at hand and break the internet habit for at least a few hours. It worked for me 5 or 6 years ago when I finished my dissertation.
posted by LarryC at 7:10 AM on January 30, 2005


Yeah, cogat--and I only offer this suggestion because I recognize the same tendencies in myself--but doesn't it seem like you're turning _this_ whole idea into the same kind of procrastination that you're trying to avoid?

I mean, wackybrit _does_ have a point...this is really an issue of self-discipline, not technology. Using an approach that requires you to update your OS, install new tools, and then write/optimize scripts really just feels like you're shifting around _how_ you're procrastinating.
posted by LairBob at 7:11 AM on January 30, 2005


I'll second the 'real news reader' solution--I can't imagine spending 2 hrs a day on reading blogs. I keep my newsreader off and turn it on at lunch and before dinner and zoom through all the posts. My other solution is: buy some good books and read them instead. Blogs suck. (Compared to, say, George Eliot.)

However, I am definitely into just turning off the distracting parts of the internet at will; that sounds great!
posted by josh at 7:25 AM on January 30, 2005


Wackybrit: there's nothing inefficient about Bloglines, and I'm betting if it weren't there, something else would be. I'm thinking it's more about using the web as a tool for procrastination than it is about any particular site.

Sadly, I'm in the same boat, so have little to offer. The nanny software sounds like an interesting solution.
posted by frykitty at 9:27 AM on January 30, 2005


A minor correction to the crontab entries: A "*" in the minute field means "every minute" just like a "*" in the day field means "every day", so what's there will run at 22:00, 22:01, 22:02 and so on. Additionally, you'll have to write to /etc/hosts as root. You want:

0 20 * * * root /path/to/allowscript
0 22 * * * root /path/to/banscript


(Even then your browser will have cached addresses for those hosts so the whole idea might not work as intended, but that's a common cron mistake I wanted to point out.)
posted by mendel at 10:04 AM on January 30, 2005


Yeah, I did correct the root thing later. Sorry about the minute thing, that was pretty vacant. The cron tutorial I was looking at to refresh me has these lines:
00 4 * * 0 root echo "This command is run at 4 am every Sunday"* 4 * * Sun root echo "So is this"
So I was thrown off and thought minutes defaulted to 0 for some reason. Also, yeah, a good idea here might be to turn off your browser's DNS caching if it has it.
posted by abcde at 11:59 AM on January 30, 2005


A much simpler solution than command line madness - set this page to be your default home page:
Get Back To Work.

You'll learn that much more discipline by using this method, instead of having to completely turn off the channel of your soft addictions.
posted by elphTeq at 1:53 PM on January 30, 2005


I have a similar problem, though not probably as bad. You should be aware that while the technical solutions may work for a while (I haven't tried as absolute a one as blocking the host, but I have optimized as someone suggested using newsreaders etc), something else could well expand to fill that saved time. Bloglines/whatever is not really the cause of the procrastination - the cause is probably your work. For some reason (in my case it's approximately fear of failure, and I think this holds for a lot of grad students) you do not, at some level, want to work on what you have to. In the end, I think the real solution will be to deal with this. Now if only I knew how.
posted by advil at 2:06 PM on January 30, 2005


I feel your pain. I read Metafilter far too avidly when my PhD completion is most pressing (like right now.) When I am being utterly hopeless, I've given my network cables and/or wireless cards to coworkers, neighbors and friends to safeguard until I get my work done. I may have to do this again this afternoon, right after I lose one more poker game...
posted by dness2 at 4:31 PM on January 30, 2005


« Older I need some good, solid information about child...   |   Source of the phrase "we lose more ... that way"? Newer »
This thread is closed to new comments.