Going through blog posts that I’ve flagged for follow-up, I found a gem from 2006, “On Graffiti and Broken Windows” by Stuart Caborn. The psychological and sociological trends that Stuart references, from Malcolm Gladwells “Tipping Point”, as well as others I’ve read (such as “Freakonomics” by Stephen Dubner and Steven Levitt) all point to the value of taking the time to be tidy.
The examples in the books talk about repairing broken windows, laying down a groundsheet when painting, and the importance of good manners.
But, I’m a developer – how should I express “being tidy”?
- By always ensuring that I leave code tidier than when I found it.
- By making sure my check-ins always have fewer warnings than my check-outs.
- By taking care that my naming is clear and accurate.
- By adding tests to ensure my code works as advertised.
- By adding class diagrams to help other developers understand my code.
It’s not often economic to dedicate an entire increment/iteration/sprint into a simple code cleanup – the return on the cost isn’t high enough.
Ignore the mess for long enough though, and the level of pain starts to climb rapidly. I’ve worked on codebases where no-one has done a code cleanup in years, and it’s really really nasty.
Simply by making sure that things are always getting tidier, you help to stop any slide into mess, and you make your own life nicer to boot.
(Oh, the title: The Kiwi is New Zealand’s national bird, flightless and nocturnal. It’s also a reference to someone who was born here, or who has acclimated to our culture and lifestyle.)
Comments
blog comments powered by Disqus