When you are coding, or when you are working? I'm asking because perhaps you just don't enjoy your job. Can you still code for some hours when you're working on side-projects or learning new things? I have no useful tips to add beyond what's already been mentioned here. The only thing I can suggest is to clarify if your _job_ might be the real problem.
Ask HN: I lost my ability to focus for hours on coding. How to regain?
91–100 of 127 posts
Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#92Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#93I have a similar problem which is ruining my life. Not only I cannot focus on my work, I cannot focus on anything. I'm throwing my degree and my life down the toilet. There's no light at the end of the tunnel right now. It's the worst feeling I've ever experienced. I know what I should do but I can't.
Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#94This 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
In my experience: its hard to get started, but when I'm in the flow I know that I can do this. Start with simpler tasks (small wins).
Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#95When you are coding, or when you are working? I'm asking because perhaps you just don't enjoy your job. Can you still code for some hours when you're working on side-projects or learning new things? I have no useful tips to add beyond what's already been mentioned here. The only thing I can suggest is to clarify if your _job_ might be the real problem.
Most programmers don't spend any amount of time on side projects. Maybe the all, like me, weakly aspire to, though.
And many people do program outside of work. Not necessarily big projects, but things like AoC, ProjectEuler, or just learning a new language/framework.
But yeah - I believe more programmers don't rather than do.
Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#96if you are asking it here, I assume you did some online research too and I believe that you already know all the solutions. For most of the people the problem is not sticking with these solutions and not being patient enough to get the result. I’m married, above 30 with a lot of things going on in my life. And often my co-workers make joke about me going into ZEN mode when working. Don’t look for a magic tricks. It i…
There's something about the phone that just keeps me distracted. So, I just don't bother with it.
Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#97Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#98Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#99Re: Ask HN: I lost my ability to focus for hours on coding. How to regain?
#100Heavy metal helps for me. Try Iron Maiden, Metallica, Dream Theater, Moonspell, Therion, etc. all this works for me. And stop visiting those websites of course ;-). Make accessing them harder, you could add the problematic domains to /etc/hosts to resolve to 127.0.0.1 or something like that.