I had a creepy experience this morning. One of my former students met me in the hallway and told me that he sees a lot of my code nowadays. He works in the same company that I left to start my Ph.D.
I left this company (in good terms) about two and a half years ago. I wrote that specific piece of code even before that. So the original code was written at least three years ago. It was not even code for one of my main projects. I contributed this specific class to a friend’s project. However, because IntelliJ put a file header with my login on it, it became “my code”.
Code never dies. I hope someone maintains this code. Surely I didn’t for the last couple of years. Code ownership, apparently, never dies too. Until someone will be kind enough to erase my login from the class comment, it will remain “my code”.
It’s tempting to finish this post by saying “Remember this next time you code”, but the truth is that no form of coding standard or documentation can remain valid forever. The only way around “code rot” is if the current developer is reminded to review and fix relevant codes automatically. As long as we lack such a tool, our codes will continue haunt us.
