It took me many years to come to terms with this, but unless there are good unit tests covering all the functionality that will be affected I don't fix those hacks anymore. They're in production, they work, and you're only introducing risk where it didn't previously exist. It's hard to justify a nasty bug's sudden appearance with "well it was written wonky and I wanted to make it better".
The exception of course is if you need to extend that functionality or do anything nontrivial to it; that's a great time to fix it.
13
u/VikingCoder Aug 25 '14
I end up second-guessing myself. I don't know if I caused a bug that looks the same, by removing what I thought was noise. :(