Pro tip: Keep a log of your work in a text file. I write a few bullet points for each day and on Friday write a "Next Week" section for my todos on that following Monday. Helps reduce the cognitive load of trying to remember what the hell you were about to do next.
Even if documentation can be time-consuming, it is such a lifesaver and makes the whole process of coding much smoother. It means not as much time wasted backtracking. If you think there is any part of your code you won't understand when you coming back to it, document, document, document.
Sometimes I write some multiline psuedocode comments or/and an explaination of specific choices, especially those invisible choices you make while debugging that aren't apparent when your just reading through your code.
Good thing to do is make code that is generally readable too lol.
I always leave my project in a state where it doesn't compile or run (not commits, obvs) so I'm forced back into understanding exactly what I was doing when I left off to fix the error.
My coworker with whom I m assigned on a project was off on thursday and friday and I m off on monday. Good luck understanding my autistic ass code. Tee hee
Maybe I'm getting alright at in-code documentation because when my code breaks after months of me not looking at it, I can return and get up to speed in a few minutes.
(or maybe these people are working on much more advanced stuff)