This blog has moved to Medium

Subscribe via email

Bold Programming

This concept has been revisited in many Extreme Programming articles so I will not blab about it much, but I do want to raise the point – mainly because it is still not a universal practice.

A key feature of a good programmer is courage. A “cowardly” programmer will see a non-critical problem or an ugly hack begging to be refactored and will shy away from it on the grounds that it his not his concern at the moment and it will probably break the world and introduce bugs to the system. A “courageous” programmer (backup up with properly written unit tests, of course), will refactor the ugliness away, thus incrementally beautifying his code.

This overall process, reiterated over the product lifetime, will either produce a convulated codebase with loops, noodles and baggage (for the “cowardly” programmer), or will result in a clean, easy to use and modular code for the “courageous” one.

While refactoring is a time consuming activity at times, it is well worth the momentarily increased coding time, because the overall coding (including maintenance!) time for him and his entire team will be decreased significantly.

The existence of well written unit tests is crucial to this, for without it you really can’t know if you introduce bugs or not. With unit tests, you get a significant “courage boost”, allowing you to do major changes that affect many files – for the better – because you are reasonably certain that any change will indeed be detected.

On the other feature of a good programmer – laziness – in another time.