Code Rot
I'd like to think that I do good design. But even so, things change. The needs of the system changes, and the system responds. So it's really unavoidable that you get into situations where code is old and while it's working, it's not working well. You've got Code Rot
Yesterday it became clear that the large system I'm working on had a fundamental limitation due to the size of the dataset it's working with. I couldn't let it remain like it was. So I knew it was time to dive into the code that was at least a year old and fix it. But it wasn't going to be a simple fix - it was going to be a massive re-write.
Amazingly, I re-wrote the entire system in less than 24 hrs. The reason it was so easy was that I knew there were a lot of simplifications that could be made to the way in which events were handled in the code. These simplifications meant about a 30% memory savings as well as lots of speed gains as things weren't done over and over again for similar data. In the end it's amazing how nice and clean it is.
It'll probably last another year! 🙂