Live data from Hacker News

Ask HN: I lost my ability to focus for hours on coding. How to regain?

news.ycombinator.com

11–20 of 127 posts

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#11
Regarding the "some void and feeling of losing out(I do not know how to express this)" - "The Willpower Instinct" is a book that covers that exact feelings and how to address it. Unfortunately I am too lazy to find the exact location in the book for you.

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#12
Watch more porn, or get laid more.

I was having focus issues, because coding is fascinating but not inherently sexy to me. After working on a problem for a while, the enjoyment of the problem would become overshadowed by my sex drive, and I would start to find anything else more interesting. Ended up being my body's way of reminding me that I should make some babies before I died, so I was subconsciously distracting myself away from anything fascinating that wasn't the opposite sex.

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#13
post #4

This may sound stupid or trite, but have you considered moving into a management position? Social media and Youtube may be stealing your attention because you simply enjoy them more. If coding was more enjoyable, you'd be doing more coding at the expense of those distractions. But maybe you just don't enjoy coding your current project. A lot of projects are not intellectually or morally stimulating, and it's hard to…

It might be surprising, but dealing with people still requires focus :) Also, instead of code, you write docs - so many docs. Which, again, needs focus.

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#14
This is a common problem. The book Deep Work goes into it in detail, and has some research-based techniques to fix it. Basically it boils down to removing distractions, and determination, gradually building up your brain's ability to focus again.

https://www.amazon.com/dp/B00X47ZVXM

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#16
post #5

Use tools such as SelfControl.app, ColdTurkey.app, and Freedom to block websites. Some people will claim that is a crutch. Thats a great analogy because crutches help you get things done while you heal.

Focus is another one I really like on the Mac - it replaces websites with a different quotation each time:

https://heyfocus.com/

On Windows, I add websites to the hosts file as others have suggested: HN and Google News are the main ones, I gave up FB long ago.

Doing this still doesn't get you back on track coding / focusing, but it helps. The idea is to break your habit of visiting distracting sites - where these apps help - but also build a habit of work. The more you make it a habit, the easier it becomes over time.

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#17
I had a similar issue recently and during one of my many afternoons dicking around on the internet to avoid work I actually found a solution that worked surprisingly well: FocusMate.com

It's kind of like chat roulette (before it got weird) for study buddies. I'll admit the premise is a bit odd butt don't knock it until you've tried it. Essentially, you're paired with a random partner for a 50 minute mostly-silent video chat. You spend the first minute or two saying a quick hello and each definitively stating what you're going to accomplish in the hour and then you get to work (separately - they're very clear it's not for collaboration). When time is up you both report back on whether you did what you set out to do. And while you get to work the corner of your screen has a little live stream of your partner diligently working.

Not only does it help keep me "accountable" and working pretty efficiently for the full 50 minutes but it's also made me so much better/more realistic about estimating what can be accomplished in that time.

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#19
Could something else trigger your distractions and then spiral you into out of topic behaviours?

In my case, that's a chatty coworker. Every time he yanks me out of my flow, I get the urge to check social networks and have a really hard time going back to deep work.

Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?

#20
Use the Pomodoro technique and limit your social media checks (if any) to the scheduled breaks that the technique provides for you. In general, it's also highly desirable to enter a flow state as quickly as possible (this is what "focus" really is, after all) and there are ways to make this more likely, such as starting your session with easier, lower-stress tasks and moving on to harder stuff incrementally.
Post reply on HN