I put on my headphones and blast music by Two Steps From Hell (Thomas Bergersen, Nick Phoenix).
Edit: A lot of people saying you might have ADHD. I wouldn't jump to that conclusion or worry about that. Don't spend time chasing down a diagnosis unless you really, really need the medical assistance. It's probably our modern attention economy: the Web has trained our brains to seek diversion after a few minutes. Call it ADHD if you will, but then pretty much everyone who spends time online has it. It's healthy and "normal" to take a breather / quick break every so often. It lets the mind decompress. The trick is training yourself to do it only when that break won't interrupt a deep stack in your brain that you have to spend a lot of time rebuilding later.
> Call it ADHD if you will, but then pretty much everyone who spends time online has it.
While everyone may experience times that are similar to what is described as ADHD, it only affects about 5% of the general population (and about 8-10% in our industry based on the stackoverflow developer survey).
OP if the meds helped and you find long concentration hard, it could be worth investigating. Worst case you confirm it’s not.
If it is, this isn’t the only place it will affect. And it won’t be recent you’ll have been dealing with this since before you were 12.
Despite its name ADHD isn’t an issue with attention, it’s an executive function disorder. The bigger challenges are with starting, stopping and switching tasks.
Someone with ADHD can be perfectly capable of completing a task, but their brain will not let them do it. No matter their strength of will.
This is a double edged sword with hyperfocus, where you get into a task that you go deep on, and it’s damn near impossible to pull you out of (in some cases, you might not even want to be doing it anymore).
> It's healthy and "normal" to take a breather / quick break every so often.
Yep, Pomodoro is based on this. Depending on the task everyone needs a break.
Edit: A lot of people saying you might have ADHD. I wouldn't jump to that conclusion or worry about that. Don't spend time chasing down a diagnosis unless you really, really need the medical assistance. It's probably our modern attention economy: the Web has trained our brains to seek diversion after a few minutes. Call it ADHD if you will, but then pretty much everyone who spends time online has it. It's healthy and "normal" to take a breather / quick break every so often. It lets the mind decompress. The trick is training yourself to do it only when that break won't interrupt a deep stack in your brain that you have to spend a lot of time rebuilding later.