Live data from Hacker News

Ask HN: How do you stay focused while programming/working?

news.ycombinator.com

1–10 of 54 posts

Ask HN: How do you stay focused while programming/working?

#1
I often find myself "needing" to take a mini-break after just a few minutes of concerted effort while coding. In particular, this often occurs after I've made a tiny breakthrough, prompting me to reward myself by checking Twitter or HN. This bad habit quickly derails any momentum. What are some tips to increase focus stamina and avoid distraction?

Re: Ask HN: How do you stay focused while programming/working?

#3
It's not exactly new and exciting, but I found that listening to calm, instrumental music helps me focus. Mostly Ambient. If you do not like electronic music, Stars Of The Lid or Bohren & Der Club Of Gore are very much worth checking out.

Also, https://mynoise.net/ has worked wonders for me.

In both cases, it seems that unstructured audio input, like, occupies the parts of my mind that would otherwise distract me.

Re: Ask HN: How do you stay focused while programming/working?

#7
Mini breaks are fine. Just blacklist certain things from your breaks if you find they're bad for you. I find "boring" breaks to be the best - sleep, looking at nature, chatting with a co-worker.

Discipline only goes so far. This doesn't happen if your motivation is high enough as you'd just lock back into the project once you've regenerated.

Treat motivation as a supplement. You might be looking at HN as your mind craves more motivation.

Think of people, not cash rewards. Who will this project help? Users? Stakeholders? If you have to think of cash, think of how you could spend it on making other people happier... donations to the poor, buying mom a gift, taking your child to a theme park.

You might also be motivated by creative impulses. Bookmark projects you admire. It can be roadmaps and devlogs. Open them up again when you're feeling demotivated or need a break.

Re: Ask HN: How do you stay focused while programming/working?

#9
post #6
post #4

Prescribed stimulants.

A lot of the good stuff is off the shelf. L-Theanine for focus. Creatine monohydrate for more RAM (thinking faster, less brain fog).

Huh, I've been taking 3-5g of creatine mono every day for ~5 years and have never heard of it having mental benefits until now.

Re: Ask HN: How do you stay focused while programming/working?

#10
you haven't demonstrated that you need focus, what you have tho is shown that you have a bad habit. Kill the bad habit, you are aware of it. So new Twitter or HN or any win. Replace it with something else, pump your fist. Have a win book, write down your win and move on to the next. If you have a todo list, cross it off. Best of luck.
Post reply on HN