In my day job as a software developer, we’ve recently resurrected a two year old project and started using it again. I’m fairly proud of the application because when we developed it, we really took the time to do everything right. The REST interfaces are logical and consistent, there is good object oriented design, great test coverage, a full set of integration tests that can also perform load testing, and it’s scalable and fault tolerant.
When we first built it, we had only a small team of developers, but we also ensured that we automated everything, tested everything, and kept everything DRY and efficient, so that even though the team was small, we were able to accomplish a lot.
When we resurrected the project, we weren’t sure how many people would be working on it or for how long. In our rush to demo something to management, we abandoned our principles of “do it right” and settled for “get something done fast”. But a few weeks later, we were mired in a morass, unable to reliably get a dev stack working, or get two new components reliably integrated, or even to have repeatable results of any kind. Pressure was mounting as we were overdue to demo to management.
Finally I came into work this past Tuesday (with the big demo scheduled for the next day). I’d completely had it with the ongoing game of whack-a-mole that we were playing with new bugs cropping up. I decided that I wouldn’t try to fix any bugs at all. Instead, I would spend the day DRYing up our error handling code so that all errors were captured and logged in a consistent way. I didn’t even care about whether we made the demo or not, I was just so sick of how we were working.
A couple of hours later, the error handling code was vastly improved with just a little work, and suddenly all of the errors we were facing were abundantly obvious and easy to trace back to their origin within a few minutes. I was able to fix those errors before we left for the day, and we were back on track to deliver our demo to management on Wednesday.
It was a great reminder that even when you think you’ve just got a couple of short term deliverables, maybe with pressure to get them done fast, that it’s almost always faster to do it the right way than to take shortcuts.
It turns out that Abraham Lincoln didn’t utter the famous quote about spending four of six hours sharpening an ax. That turns out to be from an anonymous woodsman, and the unit of measurement is minutes, not hours. But the general concept goes back about 150 years.
A woodsman was once asked, “What would you do if you had just five minutes to chop down a tree?” He answered, “I would spend the first two and a half minutes sharpening my axe.”