Most everything in writing software is about finding balance and making the right tradeoffs. We must understand the impact of our decisions on our work and seek to minimize cost while maximizing value. Sometimes we have to write a crappy implementation to get it to our customers but let’s acknowledge that we are doing it and give ourselves permission to go back later and clean it up.
One thing that I have discovered about software development is that it is not pay now or pay later. I used to believe that doing things right would pay off in the long run but cost more in the short run. Having worked with outstanding developers who write clean code and do it faster than 99% of the developers I’ve met, I realize it is really about our habits and what we do under stress.
If we make quality our habit then it will always be faster for us to write quality code then to write crappy code. How do we do this? First we need exposure to the right development practices that promote quality without undue burden. The development practices that I promote in my Agile Software Development Essentials class are easy to learn and require no extra time to do yet they have a huge impact on the quality of the code we produce. Then we must keep these principles and practices top of mind so they become our habits.
They say it takes 21 days to form a new habit. In my experience it takes at least a few months to really get good at using these practices. It’s not learning new practices that are the hard part; it is unlearning our old way of doing things. If you are an old guy like me then this may take some time but it is worth it.