Comment by brailsafe
I've been wondering this myself lately, there's a (very) subtle difference between this and burnout, whereby I'm sometimes productive, but I screw a lot of time away "trying" to do work when I'm not mentally engaged enough to actually do it. Burnout happens when I have no agency and am not productive enough for a long time, and then hit a wall where I literally can't imagine programming anymore. I also personally had a family member die and got laid off around 2016, and that definitely helped me burn out around that time. What's different since then is that while I'm now in a software career again, I've learned that it doesn't matter... at all, and I shouldn't try too hard to convince myself that it should. In 2016 I was of the mindset that if I was doing it for work, I should be doing it on my spare time too, and that's sufficient to cover my hobbies, but now I realize that's basically stupid and represents a lack of imagination and diversity that a healthy life should have. It turns out that not leaving the house and staring at a screen for a majority of ones time is fucking miserable no matter how much you're making doing it. Dramatic life events are good for learning that there's so much more that matters, and most products and most code basically don't. Should a CPA go home and maintain enthusiasm for filling out forms and engaging with bureaucracy, submitting taxes just for the hell of it?
So I do small bits of staring at screens in my spare time, but non-work time is so scare that I consider it too expensive to waste telling computers what to do, and this does help preserve some capacity to do it when it's necessary.
I don't know why this has been downvoted. It takes courage to put your struggles into words, and even if those struggles don't resonate with you is no reason to diminish them. Your experiences are just as valid as anyone elses. All the best in your journey!