In 2022, for a huge #Perl project, I spent an entire week understanding, debugging, testing, and refactoring a massive chunk of very badly written code. By the time I was done, it was much cleaner and easier to understand.

With that, I made a major discovery. The code wasn't used. I could have simply deleted it.

@ovid I had to review a massive chunk of Ada a few years ago and came across some code that couldn't possibly have ever worked. The author refused to fix or remove it because it wasn't currently being used! Yes, let's just leave the broken stuff for someone else to trip over! 🤦‍♂️

@hisdeedsaredust

Reminds me of one contract where the client had a developer who would revert bug fixes to his part of the codebase because it was "his code."

No one was allowed to develop for it and it was so badly written that the company wouldn't let the developer go.

However, that code was not related to our contract, so we couldn't do anything about it.