10 ms·
Focus.py
- pacomerh 14y agoIt's funny how a distracting website recommends you tools to avoid being distracted. Suppose I'm using this tool to block HN, now I feel like I'm missing out on a new tool! Geez.
- beilabs 14y agoI don't find HN distracting in the least, if anything the content here compared to sites like reddit is much more focused and often applicable for my startup. emacs /etc/hosts 127.0.0.1 reddit.com facebook.com That has been in my host file for some time now on my work machine.
- eblume 14y agoPersonally I use Chrome Nanny[1] for this sort of thing, but it's a pretty interesting idea. 1: https://chrome.google.com/webstore/detail/cljcgchbnolheggdgaeclffeagnnmhno https://chrome.google.com/webstore/detail/cljcgchbnolheggdga...
- DannoHung 14y agoHow do you keep yourself from just popping open the settings page and disabling the plugin?
- rplnt 14y agoIt's not that you are unable to control yourself from visiting these sites. You just do it subconsciously. When you see some sort of warning you are reminded that you really don't want to go there.
- ideamonk 14y agoNice effort. Having tried RescueTime and more crazy tools last year, I realized it's in the doing. If you enjoy it nothing can distract you. If you really don't enjoy it from inside (i.e. if your ends are not aligned with the going), nothing can help you. It's better to alter your mindset about your work. Spending 3 days on that = lesser distractions for long time.
- Arelius 14y agoYour statement is a bit unclear, in particular, this part "I realized it's in the doing." What's in the doing? > It's better to alter your mindset about your work. Elaboration on this would be interesting.
- vshade 14y agoWhen I'm really enjoying what I'm doing, I can go for hours wihtout getting distracted by the internet. If what you are doing is more interesting than browsing the web, you will not interrupt it, how many times when you are reading, playing, or just talking you get distracted by the internet?
- goblin89 14y agoAccording to temporal motivation theory (TMT), perceived utility of a task diminishes with growing temporal distance to the reward. [0] The reward of working is usually distant and sometimes low in expectancy, as is the punishment for not working. At the same time, rewards of socializing (as one example) are almost immediately available anytime. The value of working is originally higher—you get paid for that, after all—but its utility after expectancy and time discounts may well be lower. It would rise as potential reward or punishment gets closer, but we will procrastinate until it beats the utility of posting comments on HN. So, in order to fix that, we would like to reverse the ratio of utilities. One solution is to artificially restrict access to distracting activities. In terms of TMT, their utility would be lowered because of some effort necessary to overcome the restrictions. However, over time we need less and less effort, and the utility is up again. Conversely, ideamonk's suggestion—enjoying the process of doing—effectively raises the utility of the task so that distractions can't compete. It might take effort to learn that, but the effects are arguably more pleasant and permanent. [0] Utility = (Reward Expectancy × Value) ÷ Delay. See Integrating theories of motivation by Steel & König and The Nature of Procrastination by Steel.
- SkyMarshal 14y agoFat-finger downvoted you, meant to upvote, sorry. Hope someone can undo.
- fsckin 14y agoCouldn't this use /etc/hosts instead and be instant to change without the need for a DNS server?
- user23409 14y ago'cept if it crashed you'd be left with an /etc/hosts in a bad state or possibly corrupted.
- frisco 14y agoFile writes can be atomic. If it's left in a bad state, open vim and fix it.
- Argorak 14y ago/etc/hosts doesn't handle subdomains, for example. Sure, you could list all of them, but if I just want techcrunch blocked, its not the way to go.
- evmar 14y agoThis, like other github themes, has bad CSS that makes the monospaced text come out as serif on Linux. I know the github crew uses Macs but it makes me a little sad to see they don't test on the system that spawned their namesake. :(
- jfoucher 14y agoLooks ok on Ubuntu: http://cl.ly/Ge6g http://cl.ly/Ge6g
- taitems 14y agoThe hash links for headings aren't working either. The page doesn't budge.
- dekz 14y agoThat seems to be because the headers don't have their attached anchor links. Not a linux only issue.
- nooooooo 14y agoThe font-family for the monospaced text is "monospace, serif". Any decent Linux system and/or browser would define "monospace" appropriately. Sounds like the problem's on your end.
- readme 14y agoUsing Linux Mint here and it looks fine. Maybe you should install some fonts.
- demetris 14y agoThe problem comes from this: code { font-family: "Lucida Sans", Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; } Which is simply a poorly made rule, regardless of browser and OS. If you don’t have any of the specified fonts, your browser will use its general default font, which is usually either “serif” or “sans-serif”.
- 14y ago
- Bjoern 14y agoI wrote myself a similar thing a couple of years ago but just leveraging the /etc/hosts file with some scripting. https://github.com/rennhak/ProcrastinatorsHelp https://github.com/rennhak/ProcrastinatorsHelp But believe me, if you want to doodle there is nothing going to stop you.
- pbiggar 14y agoIt's amazing that we, who like to think of ourselves as do-ers, need tricks to keep us focused on the goal. Not that I'm criticizing: I use no less than 3 similar tools at the same time, and I still have trouble. What is wrong with us!
- kmfrk 14y agoI use Freedom. (Costs money.) Works really well: http://macfreedom.com/purchase http://macfreedom.com/purchase.
- khakimov 14y agofor fun I did this https://github.com/khakimov/freodom https://github.com/khakimov/freodom (yea, simple 127.0.0.1 in /etc/hosts), you can add this feature in your project: - Automatically changes status to DND (skype/adium)
- spullara 14y agoHow is this at the top of HN? Apparently people that need this stuff sit on HN and vote it up. If you don't want to go to these sites I have some advice: Don't go to them.
- zorbo 14y agoSome of us need a helping hand to keep our discipline.
- pbiggar 14y agoIf it were as easy as just saying "Don't go to them", do you think anyone would vote for this?
- mibbitier 14y agoCommenting online becomes addictive. It becomes a horrible time sink and a useless waste of time. Either arguing with people who don't understand anything, or endlessly circle-jerking with people who have the same viewpoint as you. Some even fall into the trap of believing their "karma" score somehow means something. All it means is how much time you waste online commenting. Once you start commenting online, you can't easily stop. So it's not as simple as "Don't go to them". </recovering addicts view>
- Swizec 14y agoKarma is a score. That means it's a game. "winning" games is fun. Thus increasing your karma score is, well, fun. Not to mention all the fringe benefits a decent karma score can bring you ... well not really the karma score itself, but the activities you do to get said score. It's really just putting "How useful you are to the community" into a cold hard integer. Being useful/known/etc. in the right communities has been a pretty damn important thing since forever. As always, what matters is what you do with all of this. Just having it by itself doesn't mean a thing.
- yashchandra 14y agoCannot agree with you more on this. Exactly my feeling.
- adamsilver 14y agoThat's some pretty Python code...
- tferris 14y agoGreat idea. Would like to have it precompiled, I don't have Python.
- pbiggar 14y agoAm not sure where to approach this question from. How come you don't have python? Surely the effort of installing python is less than the effort to precompile this package?
- tferris 14y ago> How come you don't have python? It's just not installed on OSX and I have no use for Python and I am not familiar with Python. I could just install it with 'brew install python' but I still prefer a clean and slim command line interface for this application. EDIT: I understood from reading the thread that for better customizability it's better to have some scripting environment
- chrishenn 14y agoOSX comes with (an old version of) python installed already.
- potomak 14y agoThis could work great in conjunction with Tomatoes[1] [1] http://tomatoes.heroku.com http://tomatoes.heroku.com
- TeMPOraL 14y agoI'm not sure if everyone noticed, but the primary interesting thing here is NOT that it blocks off domains at certain times (everyone and their dog wrote such scripts for themselves). The nice thing is that each rule is defined as a function, which means that you can put a bit more complex rules inside, or just add some logging and track every name resolution against given domain. Which actually brings me to question: aren't domain-IP pairings cached by the browser?
- _ikke_ 14y agoYes, but it modifies the response to have a very low TTL so that it's cached only for a show while (in as far as browser actually get the query response).
- drivingmenuts 14y agoPotential replaceement for bind behind a firewall? Question may be kind of silly - I admit, I am not a DNS expert.
- drivebyacct2 14y agoseems like there are easy ways of finding the pid.
- toxik 14y agoThis is a great idea, BUT it'll slow your system so no thanks. My tip to you guys is to turn off Internet access until you need it, close the browser. When you open Reddit, HN, Facebook or whatever - close it deliberately. Practice that. Move the cursor to the X, push it and MEAN IT.
- tutu12777 14y agoNsnsnsns
- ya3r 14y agoI really like the part where the author made it really hard to stop it! If you know what I mean.
- jeez 14y agoOn a similar note, can anyone suggest tools like rescuetime for firefox? The few apps that the Firefox Addons website suggests are all outdated (not compatible with ff4+). Wouldn't a time tracker app with built-in pomodoro timer and website blocker be the ultimate tool? :) Maybe we could toss in functionality to take screenshots every few seconds and show it back to us at the end of the day.
- krat0sprakhar 14y agoHow can I make this work on Windows? My office laptop runs win7.
- arethuza 14y agoIt certainly doesn't work "out of the box" - looking at the error messages and source code there a are file references to /etc/resolv.conf etc. - which aren't there in Windows. Might work with a bit hacking about though.
- darklajid 14y ago"After you identify the process listening on port 53, run sudo kill -9 with the process id." -9 as in KILL? I don't do Python, so I cannot comment on the quality of the project. But this FAQ should be changed. People that know how to stop a process don't need a FAQ entry. People that don't know how to do that shouldn't be trained to think that this is a sensible way to stop a program.
- eternauta3k 14y ago> People that know how to stop a process don't need a FAQ entry Yes we do. Just because I know kill doesn't mean I want to run through the source code looking for the way to exit. Specially when there isn't one.
- haarts 14y agoJust a heads up for Mac users: changing the /etc/resolv.conf didn't work for me. Changing it in System Preferences -> Network did work.
- cdaven 14y agoI once spent a couple of hours writing a bash script that edited my /etc/hosts file (e.g. resolve facebook.com to 127.0.0.1), and then ran that using crontab to allow some breaks during the day. It was fun, but then I had to go back to work. ;-)
- yaix 14y agoHard to read the page. A third of my netbook screen is covered by the style="position:fixed;" header.
- flazzarino 14y agotechnical countermeasure to a human behavior issue?
- deleted 14y ago[deleted]