I sit down in front of the computer to do some work. I think:
"Before I begin, let's check HN real quick if there is something interesting on the frontpage. Probably there is not, so I'll start my work in a minute."
Half an hour later, I realize I went down some interesting rabbit hole of information or joined a discussion.
Now I need a break from the computer. I stand up and do some other stuff.
20 minutes later, I come back to the computer to do some work. I think: "Before I begin, let's check HN real quick ..."
What is this problem called? Is it typical procrastination?
Just a tip that may or may not be helpful for you:
I have personally gone through periods where I am extremely unproductive due to that exact process. For years I tried to fix it: using web extensions to limit the sites I can use, pomodoro, removing autocomplete results so I don’t enter a website through muscle memory, etc.
Results, however, were mostly temporary and not really successful in the long term.
What did work for me, as suggested in a book, was really thinking about myself, taking notes, and trying to find a pattern of what times in my life procrastination comes back in full force.
What I found out is that these periods happen whenever I'm avoiding a specific task, no matter how unrelated to the job at hand. So for example, if I need to have a difficult conversation with a partner and I start putting it off, that triggers my avoidant behaviour and I won't get anything done at work or in personal projects until I face the issue. Then the behaviour gets magically resolved and I feel super productive again.
Things that have triggered avoidance so far are as big as making up with a friend after an argument, and as small as having to go through phone customer service to solve an issue with my phone carrier's bill.
So I'd recommend you to stop and ponder for a moment if there's any important unrelated things you've been avoiding.
Procrastination is having a test due in a week and studying the night of.
This is the problem when you have too flexible of a routine that allows you to go from distraction to distraction where you forgot why you even sat down in front of the computer.
Some people might say that's ADHD, some might say laziness/lack of discipline. But the reality is, you allow yourself the freedom to do that. You don't have to.
Here's another way to think about it. For your "work" that must be done on the computer, is there any reason why other parts of your computer need to be enabled to do it? Could you turn off the internet to code? Turn on airplane mode to write? Disable web traffic to problematic sites to research? etc.
Give your device a job to be done. Don't let it be an "all in one" device or you'll constantly fall into the trap of getting nothing done. Set one intention and do not allow yourself to do anything else until you're done or put enough time into that thing.
On top of the noprocrast user settings already noted, there's stuff like blackholing HN (and other too-tempting sites) in /etc/hosts.
If you tend to do stuff in ~25-minute increments, there are various "pomodoro" strategies to get work done.
But your procrastination sounds typical enough that I wouldn't waste much time looking for an exact genus & species.
So yep, not super unusual.
Edit: see FAQ for specifics of how noprocrast works https://news.ycombinator.com/newsfaq.html
IMO what you are facing seems to be the same. You have issues starting work on whatever tasks you have because either it is not interesting, or it requires the initial chore of building up context even before you do a quantifiable unit of work. Focus on getting started, and the rest will become easy.
One of the primary reasons to procrastinate is to do something perceived as more enjoyable or easier than some nebulous task -- by thinking of the tasks you need to do in these small almost trivial pieces it can make the trade off advantage for alternative timewasters seem less fruitful. Plus you get the reinforcement of completing those small chunks.
I don’t have an answer, but I know of a small minority of SWEs that suffer deeply from this.
You may find this blog post relatable https://medium.com/@jimmypostwick_90910/a-day-in-the-life-of...
But something that helps with focusing is doing tasks with someone else around. This is called social facilitation [0]or body doubling - I've been building out a site to help with just this sort of thing! [1]
Less helpful are tools. But more helpful than nothing. I use Chrome plugin 'Intention' and block sites like HN for certain hours of the day on my router.
I know I've got it bad because of how many times I'll see the HN (or whatever site) block screen, go back to my work, and ONE MINUTE LATER tab back over and refresh without thinking. It's a reflex.
And yeah sometimes I just disable everything and waste time. But sometimes the roadblocks work and get me back on course.
If you have ADHD or are otherwise distracted easily then block hacker news at the DNS level. This will suck for 2 weeks but it works.
IMO, we can handle this better if we can alleviate our FOMO. I wrote about this on HN yesterday [1]
A feature like noprocrast [2] is not very useful if people will (literary typed) "fear missing out" on something (comment, news, tool...). Is it really healthier to do 10 min every hour that a continuous hour every day?
[1] https://news.ycombinator.com/item?id=33746151
[2] https://news.ycombinator.com/newsfaq.html#:~:text=In%20my%20...