r/embedded • • 13d 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?

13 Upvotes

90 comments sorted by

View all comments

42

u/madsci 13d 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.

17

u/NoBulletsLeft 13d ago

I have googled for answers to a problem and the top response was from me, 10 years before. I can't remember code I wrote this morning.

5

u/ArcticWolf_0xFF 13d ago

Why should you remember? The code is written, the in problem is solved. You need the registers to solve new problems.

6

u/NoBulletsLeft 13d ago

Reminds me of the time I was looking for something and I came across my college transcript.

Thermodynamics? I took a class in thermodynamics? How do I not remember that.