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 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.
SourceMonitor truly exceeded my expectations!! Thanks a lot.
Nice review - what other metrics does this tool produce?
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.