I must say I am conflicted to write on this subject. On the one hand I am a person who has a humanities background turned to coding (bachelor's on philosophy; master's on sociology) but on the other hand I am burned out now and unwilling to do anything code related thanks to previous employers so my outlook isn't a nice one. The problem I experienced was most of the companies want a bachelor of science or an engineer…
I've been programming for the vast majority of my life, professionally for something like 30 years. I've done other jobs as well. My general advice to people thinking of becoming a programmer: Go ahead if you like programming. If not, then there are almost certainly better jobs than this. Don't get me wrong. On paper it's attractive. Quite high salary. Casual dress. Often flexible hours. No heavy lifting. High demand…
This is an amazing skill I only learned during a PhD, and only after burning out half way though.
Obviously, step 0 is clear boundaries and reasonable work hours. Clock out at 5 or 6 (or 7 or whatever -- point is, put in your 40 hours and leave).
After that, things get more difficult.
For me, the answer was to work out directly after work (so before the commute home even!) and to listen to an interesting audiobook/podcast during my workout.
That way, when I got home, I would have something on my mind other than work. Fortunately, my personality is such that as long as the audiobook/podcast was interesting, that's what I will focus on/think about the rest of the night.