News for hackers. Stuff that matters.
Re:Alex Payne — My Get-Back-To-Work Hack by btw0 on Tuesday September 15, 2009 @10:21AM (#823872)
I wrote a shell script that controls and logs your internet usage, hope someone will find it useful.

netctrl script: http://gist.github.com/187318

Basically you set up a cron job (use "netctrl -c") to take your computer online and offline at sometime automatically, and when you want to use internet when you are not supposed to, you have to specify a reason to do so (use "netctrl -u"), and the reason is logged.

Re:Alex Payne — My Get-Back-To-Work Hack by mrlebowski on Tuesday September 15, 2009 @01:29PM (#824270)
This is exactly what I would love to use, sadly won't work with Vista :(
Re:Alex Payne — My Get-Back-To-Work Hack by pxlpshr on Tuesday September 15, 2009 @10:04AM (#823838)
Pretty cool app I found for Mac. http://getconcentrating.com

Concentrate helps you work and study more productively by eliminating distractions.

To start, create an activity (design, study, write, etc) and choose actions (shown below) to run every time you concentrate. When ready, just click “concentrate." All your distractions will disappear and a timer will appear to help you stay focused.

Re:Alex Payne — My Get-Back-To-Work Hack by mrtron on Tuesday September 15, 2009 @11:29AM (#824005)
I use it - even tried to buy it but my credit card was rejected.

Works great for me. The only added feature I would like is to be able to schedule activities, ie. 9-5 daily block distractions.

Re:Alex Payne — My Get-Back-To-Work Hack by jreposa on Tuesday September 15, 2009 @09:58AM (#823825)
So, everytime I take a break and actually don't mind wasting time on reddit, I have to comment out parts of my /etc/hosts ?
Re:Alex Payne — My Get-Back-To-Work Hack by tiredandempty on Tuesday September 15, 2009 @10:38AM (#823898)
you can have two /etc/hosts (hosts - hosts.restricted), and a script switches each.

implementation is left as an exercise for the reader.

Re:Alex Payne — My Get-Back-To-Work Hack by run4yourlives on Tuesday September 15, 2009 @12:03PM (#824090)
Or you can just install rescue time. I think this is a new feature now.
Re:Alex Payne — My Get-Back-To-Work Hack by jreposa on Tuesday September 15, 2009 @11:03AM (#823939)
If you have TextMate and want to be able to disable and enable those /etc/hosts lines quickly, see the Screenr HOWTO:

  http://screenr.com/Sg7
After seeing Alex use Screenr, I just had to try it out myself.

short version:

  1. mate /etc/hosts
  2. select the lines you want to comment out
  3. command forward-slash (⌘/)
  4. save and authenticate if necessary
Re:Alex Payne — My Get-Back-To-Work Hack by yan on Tuesday September 15, 2009 @10:35AM (#823894)
You can write a slightly more complicated index.php than he does to time how long it's been since you last checked a distraction, and give you an allowance of, say, one distraction per hour. If you're allowed, the script can just proxy all requests for half a minute.
Re:Alex Payne — My Get-Back-To-Work Hack by edw519 on Tuesday September 15, 2009 @09:31AM (#823771)
My Keep-Working Hack: 2 computers. One for work. One for internet. In different rooms. An egg timer. 48 minutes of work. 12 minutes of break.

http://successbeginstoday.org/wordpress/2006/09/the-power-of...

http://www.paulgraham.com/distraction.html

Re:Alex Payne — My Get-Back-To-Work Hack by dcurtis on Tuesday September 15, 2009 @11:39AM (#824036)
What? Do you really do this? It would drive me insane. Every 48 minutes you're interrupted by an alarm forcing you to stop what you're doing, get up, lose your train of thought, and then start over again?

Also, you can't reliably separate the work computer from the internet one if you want to search the web for help/resources. How do you manage that?

Re:Alex Payne — My Get-Back-To-Work Hack by edw519 on Tuesday September 15, 2009 @01:26PM (#824264)
From your own web site, http://30dayflight.com/ ...

It is impossible for me to achieve the minimum level of awesomeness that I require of articles before I publish them within just a few hours in a single day, so I'm going to switch to a 3- or 5-day publishing timespan. This will hopefully keep me from going totally insane.

For someone who so goes "insane" and finds things "impossible" so easily, perhaps you should open your mind to the success strategies of others before you criticize them so hastily. Looks like you need to be doing something differently if your 30 day website is already 4 days behind on Day 7.

Re:Alex Payne — My Get-Back-To-Work Hack by jonursenbach on Tuesday September 15, 2009 @03:24PM (#824542)
Wow, relax. He just asked you a question.
Re:Alex Payne — My Get-Back-To-Work Hack by dcurtis on Tuesday September 15, 2009 @10:27PM (#825201)
Sorry, I did not mean to offend you.
Re:Alex Payne — My Get-Back-To-Work Hack by caffeine on Tuesday September 15, 2009 @09:40PM (#825154)
I use the same thing I did to quit smoking. Sort of an OCD-like 'As Good As It Gets' technique.

Step 1. Whenever I feel the 'urge' to read e.g. HN, I close my eyes and quit my browser. Then I breathe slowly and deeply three times, holding it for about 5 secs.

Usually that does it, I regain my senses and go back to work. If it doesn't work:

Step 2. I have to stare at my screen and say, out loud, "I'm the man. I'm getting shit done. I'm King fking Kong." I try to do a victorious or chest-beating gesture as well. Usually I get a little mini-dopamine rush, and then off I go.

I rarely get to step 3. But if the first two steps don't work

Step 3. I'm not allowed to do any work for the next 120 minutes, at all. I can do whatever I want, but nothing useful or productive.

That last one is nuclear. Think about it - if every time you look at that HN toolbar button, you know you're going to lose 2 minimum hours ... would you click it?

It also helps to have free time later to enjoy HN at one's leisure (something that is obviously not the case with smoking..)

Re:Alex Payne — My Get-Back-To-Work Hack by mattm on Tuesday September 15, 2009 @01:40PM (#824294)
I do something similar usually stopping around 45 minutes. I've gone to this method over a couple years of trial and error and it seems to be ideal for me. I have also come across studies which show that people can only focus on something for about 40-50 minutes before losing interest. So a short break is needed after that time period to refresh.

Also I have noticed that I tend to accomplish something worthy (eg. fixing a bug, implementing a small feature) at around the 45 minute point so it is good for motivation as I can take a break knowing I have accomplished something.

Re:Alex Payne — My Get-Back-To-Work Hack by gila on Tuesday September 15, 2009 @09:55AM (#823820)
An alarm would ruin my train of thought so much, this idea probably works better for those of us that can't control our procrastination.

I know I have used my hosts file (windows and *nix) to block those domains that server such good distractions.

Re:Alex Payne — My Get-Back-To-Work Hack by unalone on Tuesday September 15, 2009 @10:03AM (#823835)
That works for those of us with two computers. I wish there was a way of routinely disabling the Internet, rather than having me manually do it.
Re:Alex Payne — My Get-Back-To-Work Hack by gizmo on Tuesday September 15, 2009 @11:15AM (#823970)
Complete overkill, but my router enforces a daily limit for sites I visit too often. It's not that difficult to set up. Make a iptables chain, route all traffic that matches certain ips to that chain, add a --limit and --limit-burst counter to that chain, deny by default, allow when below said limit.

For bonus points, make all http connections redirect to your favorite todo list when you've exceeded your limit, and deny all ssh access (to the router) during working hours.

Setting it up was complete procrastination of course, but it works better than any manual block list. By slightly lowering my daily time waste allowance I can reduce the time I spend on sites like these.

EDIT:

Blocking with hosts is terrible, because you don't want to block sites permanently, and if you continually enable/disable the block list your muscle memory will unblock a site even before you realize you should be working. Cron job limits don't work when you don't have very strict working hours. Basically, you want to take a break for a few minutes every hour or so, and you need soft limits to enforce that.

Re:Alex Payne — My Get-Back-To-Work Hack by vilya on Tuesday September 15, 2009 @12:16PM (#824115)
If you're on a Mac, check out Freedom: http://macfreedom.com/

It does exactly what you want. I think I first heard about it on a HN thread a while ago...

Re:Alex Payne — My Get-Back-To-Work Hack by unalone on Tuesday September 15, 2009 @12:20PM (#824120)
Problem with Freedom is I have to manually activate it. I never do.
Re:Alex Payne — My Get-Back-To-Work Hack by webwright on Tuesday September 15, 2009 @05:47PM (#824847)
http://blog.rescuetime.com/2009/08/19/turning-off-the-distra...

We're actually pretty close to this (just soft-launched our windows version-- mac version hot on its heels). Starting with focus "toggling" ("Shut of the bad parts of the internet for 30 minutes") and moving on to nudges ("let me know when I exceed 30m of news time") and blocking ("block social networking if I exceed X hours or X %").

Disabling the internet is a baby/bathwater thing for a lot of people, I think. There's too much value there to turn it off completely (research, etc).

Re:Alex Payne — My Get-Back-To-Work Hack by pavel_lishin on Tuesday September 15, 2009 @10:14AM (#823855)
I'm pretty sure there's software out there for every OS that will do this.

Alternatively, you can unplug a cable / disable WiFi.

Re:Alex Payne — My Get-Back-To-Work Hack by unalone on Tuesday September 15, 2009 @10:46AM (#823908)
There is, but I want something automated. I lack self-control.
Re:Alex Payne — My Get-Back-To-Work Hack by rsheridan6 on Tuesday September 15, 2009 @11:03AM (#823941)
I intend to write something to do this soon, at the request of my wife. Basically, you need a cron job or something similar that edits /etc/hosts - shouldn't be too difficult.

But it would work better for people who don't know enough to manually edit /etc/hosts.

EDIT: the /etc/hosts thing would be to block specific sites, but it's just as easy to take the internet connection down completely with ifconfig or whatever your system uses.

Re:Alex Payne — My Get-Back-To-Work Hack by run4yourlives on Tuesday September 15, 2009 @12:52PM (#824191)
rescuetime does this.
Re:Alex Payne — My Get-Back-To-Work Hack by reedlaw on Tuesday September 15, 2009 @10:05AM (#823841)
How about just get back to work instead of spending time on this hack? That would save you at least 15 minutes.
Re:Alex Payne — My Get-Back-To-Work Hack by jacquesm on Tuesday September 15, 2009 @10:19AM (#823866)
I think to call this a 'hack' is to devaluate the term.
Re:Alex Payne — My Get-Back-To-Work Hack by wave on Tuesday September 15, 2009 @11:13AM (#823963)
Instead of blocking the distracting sites permanently, using iptables might work little better by restricting access by time of day or duration.

[edit] I found the following: http://news.ycombinator.com/item?id=192953

Re:Alex Payne — My Get-Back-To-Work Hack by 3pt14159 on Tuesday September 15, 2009 @09:50AM (#823808)
I use rescue time. It is amazing. Having fun to do work also helps. Well that is it for this comment, I need to get back to work.
Re:Alex Payne — My Get-Back-To-Work Hack by jonknee on Tuesday September 15, 2009 @01:22PM (#824257)
I wish it would work with Snow Leopard. Crashes on startup for me (even the special Snow Leopard version they posted).
Re:Alex Payne — My Get-Back-To-Work Hack by thirdstation on Tuesday September 15, 2009 @04:16PM (#824643)
I think about money going into my bank account. Makes the distractions seem more expensive (I'm currently salaried and it still works).
Re:Alex Payne — My Get-Back-To-Work Hack by figital on Tuesday September 15, 2009 @01:04PM (#824217)
I drag the favicon of my current project to the home button (to set it as my home page). Everytime I open a new browser window I am reminded of what I should really be doing.

When that task is finished, I change the home page to the next task.

Re:Alex Payne — My Get-Back-To-Work Hack by erso on Tuesday September 15, 2009 @01:54PM (#824331)
Every time I see something like this I'm reminded of the idea of trying stop drug addicts by maEvery time I see something like this I'm reminded of the idea of trying stop drug addicts by making drugs harder to get. Somehow, some way, you're going to get the drug.

The problem is not to restrict your access, but to change your desire. There's a much deeper problem if you require hand-slapping to stop you viewing sites like reddit while at work.

Re:Alex Payne — My Get-Back-To-Work Hack by tlrobinson on Tuesday September 15, 2009 @04:36PM (#824693)
Is there any way to do this without changing the user Apache runs as? I'm having problems with that...
Re:Alex Payne — My Get-Back-To-Work Hack by arohner on Tuesday September 15, 2009 @04:11PM (#824633)
My hack: run bittorrent during work time. Every site gets a lot slower. For me, the increase in latency makes distractions less enjoyable, but full access is still there if I really need it. On a few occasions, I've found important work-related stuff on HN.
Re:Alex Payne — My Get-Back-To-Work Hack by warfangle on Tuesday September 15, 2009 @11:39AM (#824032)
Psst. Why is al3x.net loading an external gif every 20 seconds? It's distracting to see my browser indicate that it's loading something when I didn't interact with anything :)
Re:Alex Payne — My Get-Back-To-Work Hack by dsplittgerber on Tuesday September 15, 2009 @11:44AM (#824047)
Spending hours or minutes working out yet another restriction on distractions instead of learning how to focus and concentrate properly? What good can this possibly ever do.
Re:Alex Payne — My Get-Back-To-Work Hack by mrduncan on Tuesday September 15, 2009 @09:46AM (#823797)
The best get-back-to-work hack I've ever had is to work on something that interests you. If you're able to do that, you won't need any hacks.
Re:Alex Payne — My Get-Back-To-Work Hack by sophacles on Tuesday September 15, 2009 @10:12AM (#823852)
That is disingenuous. In any job/work, even if you love it, there are tasks that blow. Documentation, bug hunting, administrivia, the boilerplate crap that crops up are all examples of this. Some or all of them are required, and since they are not fun, it is easy to get distracted and procrastinate. Some people are just prone to such things. Is it not better that they figure out how to not procrastinate, or that they search for the elusive (possibly mythical) work that has 0% sucky tasks?
Re:Alex Payne — My Get-Back-To-Work Hack by ptn on Tuesday September 15, 2009 @09:44AM (#823788)
Even better would be if when you tried to open a web that's a distraction, the browser opened your text editor.

I'm kinda dreaming...

Re:Alex Payne — My Get-Back-To-Work Hack by Timothee on Tuesday September 15, 2009 @10:31AM (#823886)
It's kind of what Alex's setup is doing by opening Things.
Re:Alex Payne — My Get-Back-To-Work Hack by _giu on Tuesday September 15, 2009 @10:07AM (#823846)
I use a proxy (Pivoxy) to block requests to distracting sites. not the most effective method, but it works pretty good for me.
Re:Alex Payne — My Get-Back-To-Work Hack by untitledz on Tuesday September 15, 2009 @11:00AM (#823936)
Re:Alex Payne — My Get-Back-To-Work Hack by prakash on Tuesday September 15, 2009 @11:18AM (#823983)
Why do all that, why not use freedom? http://macfreedom.com/
Re:Alex Payne — My Get-Back-To-Work Hack by Psyonic on Tuesday September 15, 2009 @04:09PM (#824631)
While this is no doubt useful, its hilarious that something that actually removes a feature from your computer is being billed as "the most wonderful software ever invented." (not by you, by someone quoted on their homepage.)
Re:Alex Payne — My Get-Back-To-Work Hack by mrtron on Tuesday September 15, 2009 @11:28AM (#824000)
Concentrate app for mac users breaks the procrastination cycle.
Re:Alex Payne — My Get-Back-To-Work Hack by mdg on Tuesday September 15, 2009 @04:45PM (#824711)
I do something similar. I use LeechBlock, an add-on for Firefox. I have it set to let me view sites, such as HN, before 7:30 (a reward for getting in early), during lunch (hopefully, that means between 11:30-Noon:30), and after 4:30 (brain is probably mush at this point anyways). LeechBlock even lets you redirect to a different site instead of a blacklisted one. I picked my companies web site. I must say, I have conditioned myself doing this. The urge to check time-sinks have dropped significantly since I have been doing this.

After reading this, I feel editing /etc/hosts is a better option.