Friday, September 25, 2009

On doing it right the first time

Everyone who writes any sort of code has been asked to do a one-off - "just do it quick, it'll never be anything but a prototype". Even serious projects have this (see http://code.google.com/p/virtualagc/source/browse/trunk/Luminary099/LUNAR_LANDING_GUIDANCE_EQUATIONS.s?r=258, the comments for lines 179 and 180). The problem with this is that it's never just a one off. Every line of code we write gets used again and again because it's becomes easier to copy and paste something than to write it from scratch. If we don't do it right the first time, there's never time to go back. So how do we get the time to do it right? Simple. Don't give in on time estimates. When they say it's just a quick example, can't it be done in an hour or two, say no. Explain why you won't cheat the process. The only way we achieve the standards we want is to refuse to accept anything that doesn't meet those standards. Set a minimum bar and don't go below it. In the long run, it makes our work better, and makes us better teammates to those who depend on us. It may not be obvious at first, but the extra time we spend up front comes back to help out down the road.

0 comments: