When you’re making changes to a system, for the love of all that’s programmable, please be thorough.
If you’re changing a function, make sure you’ve cleaned up any variables that aren’t being used anymore (your IDE might be able to spot these for you, in which case there’s not a lot you can use for an excuse.)
If you’re changing a class and it’s internal framework stuff that won’t be used by anyone outside, make sure you remove functions if they’re not being called anymore.
If you’ve refactored global configuration variables or settings, make sure you’ve deleted all trace of them if they’re really gone.
If you don’t do these things, the next person to come along is going to totally miss her estimate on account of not realizing how many land mines need to be stepped around, and each one means more time added to the project, either in a big chunk right away by dealing with what you should have done already (and the testing and QA overhead that goes with it,) or in little increments every time anything around your old work needs to be touched (“what’s this? Oh, I don’t think it’s used, but I’m not sure…”)
Ask me know I know this…
And do all of these things right away. Because if you wait, even a little bit, you’re going to find yourself in the same position as the new guy.
Ask me how I know that (in a smaller voice, at least in recent memory.)
The “I thought we might need to bring it back” defence doesn’t work in a source control environment. Every line of code you ever submitted is still there in the repository. So why not keep the really embarrassing stuff out of the head?
(And don’t get me started on how documentation lags the code… Yeah, it’s been a fun long weekend refactoring.)