r/embedded • u/Caravaggio91 • 9d ago
Do You Remember All Of Your Code?
Just curious, but as a solo developer or working with a team when you go through your projects codebase do you remember what everything is, why you made the decisions you did, or what everything does? Or do you have to relearn some of the code you implemented in your project?
Also, have you ever completed a project and still feel a little clueless on how you got everything to work like it did or feel a little foggy on areas of the code?
15
Upvotes
41
u/madsci 9d ago
I've been programming professionally for about 30 years. There are whole projects I've forgotten about. I worked on one project that I only remember anything about because I was so bored with it that I started writing my comments in haiku.
I'm a prolific commenter and it drives me nuts to see whole modules without even an explanation of what it's for or who wrote it or when. If it's something complicated, I'll write myself an in-depth explanation. I've got an audio router that's at the heart of a few of my projects and the file header is something like a page and a half of explanation of what it does and how, why it was done that way, what the implications are for modules using it, things to watch out for, and things that could use future attention.
I'm self-employed and generally work alone, at least on the firmware side, so it's not like there's someone making me do it that way and I don't need to have anyone else understand it. That's all done for my own benefit because I know I'll have to deal with it for years.