Coffee Warning

by Ville Laurikari on Thursday, April 2, 2009

At the company I work for, we have a tool which builds our code automatically every night on all the platforms we support.   Most of the code is written in languages where compilers print warnings generously when they encounter dubious code.  Typically, we want to keep the code free of warnings; if there is a lot of warning noise, you will not notice the important warnings which are signs of actual bugs.

Recently, I finally got around to doing something which I had been planning on for a long time.  I threw together some small scripts to draw a graph of the number of warnings in the automatic builds.  On March 16, I put the graph up on a TV screen next to the coffee machine.

Here’s what the graph looks like now:

In the next couple of weeks, we saw all this improvement even though nobody told anyone to go and fix some warnings.  To be honest, I’m responsible for the huge drop in the warning counts Solaris — I simply disabled some warnings which were just noise, and fixed a few hundred warnings in about 1.27 seconds with M-x query-replace in Emacs.

Anyway, this scheme seemed to cross some important psychological threshold and things started happening.  A one-shot email or gripe on the internal forums about the warnings would certainly not have had this effect.   Showing the data in a less visual form, such as a table with numbers and dates on it, or in fact anything that requires you to think, would certainly not have had this effect either.  By having the graph next to the coffee machine, everyone is exposed to the information at least on a daily basis in a very accessible and non-annoying way.  It works.

We have other ingredients working to our favor as well.  First, we all agree, more or less, that the sheer number of warnings on some platforms is a problem that needs to be fixed.  Second, warnings can be fixed one at a time without taking too much time of other projects.   Third, we drink a lot of coffee.

There’s obviously no “just make it into a graph and things magically start happening” rule here.  But, a graph by the coffee machine might just be the last thing missing from the equation, so it might be worth a try.

If you liked this, click here to receive new posts in a reader.
You should also follow me on Twitter here.

Comments on this entry are closed.

Previous post:

Next post: