Anton Zaides threw away some rusty buckets while cleaning up his in-laws’ yard. His father-in-law had put them there to catch water from overflowing gutters. Old code can look just as arbitrary until you see what happens when it rains.
- Ask which upcoming feature would be harder to ship with the code as it stands. Tie the cleanup to that work.
- Give someone a few days to read the existing code before committing the team to weeks of refactoring.
- If you’re proposing a replacement, include the edge cases the old system already handles in your estimate.
Before changing a piece of code no one likes, write down what people still rely on it to do. That list gives you something to test and may show that a much smaller change is enough.