Editorial Note: Thanks to everyone who voted for a Developer Hegemony Cover. I’ll tabulate the official results soon, but it looks like the dark cover is the clear favorite!
Second Editorial Note: I originally wrote this post for the NDepend blog. You can check out the original here, at their site. While you’re there, take a look at the new version of NDepend.
A while back, I wrote a post about the importance of trends when discussing code metrics. Metrics have impact when teams are first exposed to them, but that tends to fade with time. Context and trend monitoring create and sustain a sense of urgency.
To understand what I mean, imagine a person aware that he has put on some weight over the years. One day, he steps on a scale, and realizes that he’s much heavier than previously thought. That induces a moment of shock and, no doubt, grand plans for gyms, diets, and lifestyle adjustments. But, as time passes, his attitude may shift to one in which the new, heavier weight defines his self-conception. The weight metric loses its impact.
To avoid this, he needs to continue measuring himself. He may see himself gaining further weight, poking a hole in the illusion that he has evened out. Or, conversely, he may see that small adjustments have helped him lose weight, and be encouraged to continue with those adjustments. In either case, his ongoing conception of progress, more than the actual weight metric, drives and motivates behaviors.
The same holds true with codebases and keeping them clean. All too often, I see organizations run some sort of static analysis or linting tool on their codebase, and conclude “it’s bad.” They resolve only to do a better job in a year or two, when the rewrite will start. However good or bad any given figure might be, the trend-line, and not the figure itself, holds the most significance.
Trend Metrics with NDepend
In that last post, I touched only on the topic, but not the specifics. Here, I’d like to speak to how NDepend helps you with metrics. I suspect that a lot of people know NDepend for its memorable visualization aids and its code rules and queries. I don’t see as much discussion about the valuable trend tools, perhaps because they were release comparably recently. In either case, I want to talk today about those tools.