97 Things Every Programmer Should Know

(Chris Devlin) #1

(^104) 97 Things Every Programmer Should Know


Let Your Project


Speak for Itself


Daniel Lindner


YOUR PROjECT PROBABLY HAS A VERSiON CONTROL SYSTEM iN PLACE.
Perhaps it is connected to a continuous integration server that verifies correct-
ness by automated tests. That’s great.


You can include tools for static code analysis in your continuous integration
server to gather code metrics. These metrics provide feedback about specific
aspects of your code, as well as their evolution over time. When you install
code metrics, there will always be a red line that you do not want to cross. Let’s
assume you started with 20% test coverage and never want to fall below 15%.
Continuous integration helps you keep track of all these numbers, but you still
have to check regularly. Imagine you could delegate this task to the project
itself and rely on it to report when things get worse.


You need to give your project a voice. This can be done by email or instant
messaging, informing the developers about the latest decline or improvement
in numbers. But it’s even more effective to embody the project in your office
by using an extreme feedback device (XFD).


The idea of XFDs is to drive a physical device such as a lamp, a portable foun-
tain, a toy robot, or even a USB rocket launcher, based on the results of the
automatic analysis. Whenever your limits are broken, the device alters its state.
In case of a lamp, it will light up, bright and obvious. You can’t miss the message
even if you’re hurrying out the door to get home.

Free download pdf