| Comments and documentation. I know it's not sexy, but adding lots of comments to the code will help to keep things organised, and will make your life next year sooo much better. For higher-level concepts, usage examples, declarations of intent and expectation I cannot recommend "official" documentation more. A lot of my career exists because I was forced by circumstance to write formal docs for my work. I refer to my own docs multiple times every day. Other people use my work because its documented. And when I have to return to code, i find myself adding ever more comments to help me digest it. Personally I've never looked at code and thought "I can't use this, too many comments, too much documentation". While I'm working I'm also writing (and rewriting) the docs. For casual scribbles I use paper. I throw that away from time to time to reinforce how ethereal that is. I have a motto now - if it's not documented, it doesn't exist. For me it matters 10x more than actual code, because it makes the code reusable, reliable and dependable. |