There is an -imho-  disturbing tendency amongst developers when it comes to applying coding and style standards, unit testing, duplication analysis and the like. The typical mindset seems to be “if my colleagues don’t do it, I won’t, either”. I know, I’ve been there as well. In fact, I am still there. But if you consider that most, if not all, of the tools we use for the abovementioned tasks can run perfectly fine on any workstation, why not set up a NAnt script? Or even your own local buildserver? The benefits seem obvious but for completeness’ sake, here are a few:

  • Creating and running Unit Tests allow you to be more confident in the quality of your code and therfor more productive. In addition, if your colleague changes anything, you will be able to catch possible errors before getting slowed down by them at a later stage.
  • Running analysis tools and acting upon their results will guide your development effort so you produce cleaner, leaner and better code.
  • Running integration tests before you check anything in will cause fewer merge conflicts and fewer errors caused by your code.

In conclusion, the code you check in will be of higher quality, practically bug-free and unobstrusive (that is, your colleagues will barely know it’s there..not from errors popping up anyway).

Chances are high that your efforts (or lack thereof, as you tend to spend far less time in fixing bugs) will be noticed. If your colleagues ask, give them your most enticing smile as you fire up your favorite browser and show them the build and analysis reports you create. Bask in the glory, enjoy the admiration.

Then, get everyone else to do it.

Personally, I have taken up the task of following my own advice by setting up a build and reporting “server” on my own workstation. If there will be any “broken windows” in the codebase, they won’t be my fault. Mostly.


P.S. The “broken windows” reference comes from the excellent book The Pragmatic Programmer by Andy Hunt and Dave Thomas. Yes, this is a blatant advertisement, but the book is more than worth it’s cost. It’s changed the way I look at software development and I’d strongly suggest getting your own copy.

If you liked this post, please click on one of the advertisements below. Thanks!

0 Responses to “Don’t be like Everyone Else – Check your Code”

  1. No Comments

Leave a Reply