A lot of this resonated with me. Thanks for posting it. I've been struggling in my career as a software engineer for several years now. I used to love it and didn't need any "tricks" to get myself to do the job. I have countless theories as to what happened but don't know for sure.
I certainly struggle with the dopamine hit problem. I have a little will power in the morning and then things drop off rapidly. I can force myself to do urgent things like meetings or something like fix production going down. Anything else though is very difficult to chug through. I won't let myself play video games or watch movies during work hours out of some deep seated moralistic responsibility. This doesn't help me work though. Instead, I'll let myself procrastinate on things that I find "acceptable" for people on work hours (but for far less time than what I do them). This is primarily browsing news sites and eating. I can't stock snacks in my home or my desk at work as I will just compulsively devour them if I have resistance to the task at hand. I then also like you say, feel energy drained after something like browsing the web compulsively.
It then sucks seeing other engineers in the field, with far less experience than myself, just pumping out code hour after hour. I've tried different industries, jobs and even moved cities in an effort to fix things. If I don't like programming anymore, I don't know what else I would do that pays even half as much. I've tried engineering management which is a lot more urgent timed stuff with more admin like work. I was able to force myself to do the job but not super well and I faced weekly negative feedback for mistakes I was making which would also zap my energy to perform.
I find a lot of the "tricks" posted in this thread however to be gimmicks. I know that's a bit cynical but to explain, I try them out to keep an open mind, but then within days or a week, they seem to stop working. It's as if my brain is sabotaging itself. Like it's saying -- oh that technique worked yesterday, we can't have that, so you should just not have the will power to do it today --. Makes it feel like there's a deeper underlying issue that needs solved but no amount of contemplation on this seems to help.
I like to think that the right programming role exists for me somewhere, but it's super hard to study for interviews after a day's work. I feel like I have 100 will power points a day, I spend 200 of them trying to force myself to work, and then have nothing left for when the day is done.
Sorry for the long rant but it was refreshing hearing your story and seeing that I'm not the only one with these symptoms.
I might be off base here, but the "I feel like I have 100 will power points a day, I spend 200 of them trying to force myself to work, and then have nothing left for when the day is done" line struck me. This is something my mom has always had trouble with. She would spend the ENTIRE day talking about, planning, and getting ready to go to the gym but she would rarely actually go.
To me, it seems that the act of preparing/motivating yourself to do something can be more tiring or drain more energy than doing the work itself. I used to try to wait to do my exercise for the day until I felt like it, which of course rarely ever came. Then I felt bad about myself for not working out and the problem kept getting worse. Eventually I realized that the only option is to ignore how I'm feeling when I first wake up and workout anyways, no matter how hard it is to start (see Mel Robbins' 5 second rule for getting started or getting out of bed). A couple of sets or laps in I usually feel the motivation kick in. This seems to be true of many things, and reminds me of this graph that explains how the things our brain wants to do (easy dopamine / instant gratification) leaves us net-negative over time (depression) vs. the things we should do (delayed gratification) leave us somewhat unhappy in the very short term (ie. when you are getting started each morning) but net-positive (happy!) in the long term.
It seems like once you understand this and can act on it (some people even do it subconsciously or as a result of how they were raised), you are part of a small percentage of the population that can do big things in this world. Success is heavily dependent on your consistency.
I used to work an office job, and would try to go home and work on my side projects or course work. It was always quite difficult to do. I eventually learned that I was giving myself the option to do the side project after work, and when given the choice I almost always chose to do something else (like watch YouTube and play video games). At the time, I absolutely hated my job and was completely drained at the end of the day so I thought I needed time to relax before starting my other work. Of course once I started playing a video game I never moved on/recovered and didn't start my side project work. So instead of giving myself the option to do the work, I made a rule for myself that when I got home from my job I would start working on the side project, regardless of how I felt. No motivation was needed now, because it was the rule. Doing the work was the only choice available, there's no alternative.
I eventually quit my job and still the motivation to do my side project isn't really there. I finally realized it will never come. Even if you didn't have your job it's unlikely that you would want to study for interviews, but you may (monetarily or otherwise) be forced into a position where it's required, and thus you do it. It may be beneficial to create this position artificially for yourself now. Every day when you come home from work you do 3 leetcode questions (just an example, maybe instead it's writing an answer to a potential interview question or something like that). That's the rule, don't do anything else until those are completed. Somedays, you will feel motivated after finishing those 3 questions and will continue on to other productive things. Other days, maybe you don't want to do anymore after that. But even those 3 questions over an extended period of time will put you much further ahead than you are now. At the moment, you are slowly drowning by doing nothing.
As a general rule, I am personally able to engage myself (to a reasonable extent -- if I hit a hard task or problem sometimes I feel the urge to distract myself) in the work after getting started. The getting started step is the part that trips me up. If that's also the case for you, then I would seriously try to create structure for yourself. Discipline will get you started with the work, and the motivation should come after doing it for 20 or so minutes. If you feel yourself slipping for multiple days in a row then you have to reset yourself and start again as quickly as possible. You build more and more resistance (more stress, task seems more daunting) as time goes on and you're not doing anything.
I certainly struggle with the dopamine hit problem. I have a little will power in the morning and then things drop off rapidly. I can force myself to do urgent things like meetings or something like fix production going down. Anything else though is very difficult to chug through. I won't let myself play video games or watch movies during work hours out of some deep seated moralistic responsibility. This doesn't help me work though. Instead, I'll let myself procrastinate on things that I find "acceptable" for people on work hours (but for far less time than what I do them). This is primarily browsing news sites and eating. I can't stock snacks in my home or my desk at work as I will just compulsively devour them if I have resistance to the task at hand. I then also like you say, feel energy drained after something like browsing the web compulsively.
It then sucks seeing other engineers in the field, with far less experience than myself, just pumping out code hour after hour. I've tried different industries, jobs and even moved cities in an effort to fix things. If I don't like programming anymore, I don't know what else I would do that pays even half as much. I've tried engineering management which is a lot more urgent timed stuff with more admin like work. I was able to force myself to do the job but not super well and I faced weekly negative feedback for mistakes I was making which would also zap my energy to perform.
I find a lot of the "tricks" posted in this thread however to be gimmicks. I know that's a bit cynical but to explain, I try them out to keep an open mind, but then within days or a week, they seem to stop working. It's as if my brain is sabotaging itself. Like it's saying -- oh that technique worked yesterday, we can't have that, so you should just not have the will power to do it today --. Makes it feel like there's a deeper underlying issue that needs solved but no amount of contemplation on this seems to help.
I like to think that the right programming role exists for me somewhere, but it's super hard to study for interviews after a day's work. I feel like I have 100 will power points a day, I spend 200 of them trying to force myself to work, and then have nothing left for when the day is done.
Sorry for the long rant but it was refreshing hearing your story and seeing that I'm not the only one with these symptoms.