PS: I'm working on a thesis on productivity in software development. If you have a few minutes, please share your experiences & what works (and what doesn't) in my survey: https://forms.gle/4B9GAtXD1nahwvn48
Aside from that, I think the thing that's helped me the most is simply over-commenting, everywhere and all the time. I leave a quick note for other devs (and myself) for every helper func, even if it looks trivial to me. And for anything complex, I try to leave detailed line-by-line comments that any junior dev can pick up. This not only helps others pick it up, it helps me myself a few weeks from now, and it also helps prevent runtime issues through what is basically as-you-go "rubber ducky" debugging, forcing me to verbalize my rationale for writing something a certain way.
And of course ChatGPT has been a moderately big help. It's not quite a replacement for another experienced dev, but it's certainly taken over 90% of my Stackoverflow and Google usage – if only for its much better natural language parsing abilities.
With these tools in place, the code mostly just writes itself if you can give me time to focus and not force me to join pointless meetings and scrum planning sessions. I can only be productive if I can sit down and focus without pointless rituals where my input isn't even needed or asked for.
It’s an easy thing to do, but IMO helps software quality tremendously. 60% of times I just read my changes and commit them as they are. In 25% of commits I spot something minor like typos in comments, and fix. Most importantly, for the remaining 15% of them I notice some important issues which need to be fixed.
Reading git log later, or delegating to other people, doesn’t work because timing. I commit my changes immediately after making these changes. This means I still remember what the code in question does, and why I changed what I did.
SVN was a step forward, but GIT is the bees knees. I've used it to keep a workstation without networking up to date and synced with GitHub. The whole ecosystem is amazing.
Studying topics from first principles instead of corporate documentation
Learning the history of programming and computing
Moving beyond competency and becoming highly proficient at the command line
Understanding git backwards and forwards
Being able to explain every concept in computing from the lens of the broader field of engineering
Being able to write regular expressions without consulting too many resources
Effectively composing Unix programs to get a larger task done
Reducing every task to the absolute basics, to demonstrate a “proof-of-concept”
* I’m not claiming to have mastered any or all of these, but they do serve as my “North Star” guidances when figuring out which direction to advance in this career
Relatedly, learning to use Emacs with power and precision has been a boon to me, though the Emacs skill ceiling is absurdly, absurdly high and there's so much I've yet to learn. Programming the editor to do repetitive work for me, not just using packages and customizations, is key.
Literate programming has been a tool in my toolkit for documenting my thoughts as I solve an interesting problem. These days I use org-mode, but noweb has been useful in the past.