As title says. Comment below with any stories or observations on how productivity (or the lack of it) shaped your work!
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.