New SourceMonitor 2.0 Code Metrics Tool

If you've read my article on Code Review and Complexity, you'll know that I recommend using metrics to help monitor the relative quality of source code. I really like the simplicity and speed of Campwood Software's SourceMonitor, a freeware tool written by Jim Wanner. I just noticed that he's released SourceMonitor 2.0 for download, and I'd highly recommend taking a look at it...especially if you've never looked at or captured code metrics. Some of the improvements that I'm looking forward to include:

The ability to selectively include subdirectories in a project

Support for C# 2.0 language constructs

The Kiviat diagram...a lot of useful information at a quick glance

The Kiviat diagram below is from some sample code I generated awhile back. I can quickly tell from this diagram that I should check to see if I've commented my code properly and take a look to see which method(s) are driving my complexity and depth outside typical limits (which are configurable). Fortunately, SourceMonitor makes it very easy to find and review the complex code.

One aspect of code analysis that is important throughout the operational lifecycle of software is comparative size. That is, how much code has changed (deleted, added, modified, unmodified) relative to a prior version.

Take a look at EZ-Metrix if size measurement and comparisons are important to your software-intensive business.