Chapter 52. Let Your Project Speak for Itself

Daniel Lindner

image with no caption

YOUR PROJECT PROBABLY HAS A VERSION CONTROL SYSTEM IN PLACE. Perhaps it is connected to a continuous integration server that verifies correctness 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 fountain, 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 ...

Get 97 Things Every Programmer Should Know now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.