We've been looking at tools lately that could an agile team get a better view of the quality of the software they are writing. On of those is NDepend, a tool that will inspect your assemblies, determine your code's dependencies and then calculate some metrics for you to analyze. The output will typically be a report, in HTML format. Since this step can be automated, We strongly suggest that you put this into your continuous integration process because from that point, you'll be able see the metrics for your software change with time.
On a previous project, we had integrated NDepend on the daily build and at the of each iteration, we would take a few minutes to look at the reports and note a few actions to be taken during the next one. It was a great way to maintain quality and I strongly recommend you integrate it on your next project.
Now where this tool really shines, is with the VisualNDepend application. This one allows you to visualize the metrics of your software, query your software's compiled code through a SQL like language, and perform comparisons between 2 different reports.
Here are a few examples of the queries you can do in CQL:
SELECT TOP 10 METHODS WHERE CouldBePrivate
SELECT TOP 10 FIELDS WHERE CouldBePrivate
SELECT TOP 10 TYPES WHERE IsClass AND NbChildren ==0 AND !IsSealed AND !IsStatic ORDER BY NbLinesOfCode
Here are a few snapshots of the tool when run on our own Umbrella library.
This image shows Umbrella being analyzed, with the mouse pointer on one method called "Truncate". NDepend shows metrics and information all on one easy screen.
This image shows the result of the execution of 1 CQL query and where in the assembly (in blue) are located the results. Once again, bravo for NDepend: quick, concise and visual.
The author of the product Patrick Smacchia gave an interview to the Visual Studio Talk Show, a french PodCast from Montreal; if you can, we strongly suggest you listen to it and hear what the author himself has to say about this great product.