I couldn’t resist this piece Tony Bowden picked up for two reasons:
- there’s a great kitchen analogy 😉
- you can never say enough about the merits of producing quality code
You may think that following these practices would take longer than just writing the code, as I did at first. But think of how much time you’ve spent wading through some “badly written” module – perhaps one that you wrote a few months back. That is the time we’re trying to save. By investing in the quality of the code now, we make it possible for that code to be maintained later.
Think of it this way. The fastest way to be done with dinner is to leave a mess in the kitchen. Every day, no matter how messy the kitchen is, you’ll always be done with dinner sooner if you don’t clean up the mess. On the other hand, dinner will take longer and longer to make, as you find yourself chiseling the dried crusty spaghetti from last week’s plates.
Over a month, the way to spend the least amount of time preparing dinner is to keep the kitchen clean. Indeed, the best chefs clean up the kitchen while they prepare the meal.
Professionalism in software development is not simply about getting done quickly. It’s about maintaining a level of quality that allows us to spend the least total time developing. To do that requires that we clean up the code while we’re writing it.