Don't surf the net. Don't read HN. Don't fire up a game. Those things are going to make you switch mental context twice (once each way). Instead, close your eyes and take a few deep breaths.
(Says the guy who, instead, sees what's new on HN...)
You need better programming language ?
Per my experience, choosing a "productive language" matters.
For example, working with Javascript/Typescript is not productive, because it's easy for me to lose focus on other things.
Don't surf the net. Don't read HN. Don't fire up a game. Those things are going to make you switch mental context twice (once each way). Instead, close your eyes and take a few deep breaths.
(Says the guy who, instead, sees what's new on HN...)