Reading There’s no shame in code that is simply “good enough” (and the discussion on hacker news), I find myself strongly agreeing. I have this system I built about 3 years ago at craigslist. Since then it has been extended in various ways and now runs on about four times the hardware it did back then. And it handles far, far more data.
In other words, I’m still evolving it (in small steps) and helping it to grow and change to suit our needs. But every now and then, while reading through the code, I get the urge to “improve” it in some way. Often that means adding a new abstraction “just in case” I need in the future. Or there’s that one script that runs from cron, which is written in bash. I’d love to re-write in Perl. But that’d be more work for virtually no benefit.
Why do I not just make these changes? Two reasons:
- the stuff works and is stable
- every time you change something you may also break something
The fact that I can look back on code I wrote a few years ago and identify ways that I’d do it better is good. It means I’m still learning. But the fact that I can successfully resist the urge to change the code is even better.
The quest for perfection is tricky. You can spend a lot of time chasing it and there’s no telling if you’ll every actually get there. And even if you do, what other things did you put aside in the process?
I think this mentality can apply to a of things in life. One of my hopes for 2012 is that I can better see that.