I am reading Agile PPP for C#, and at some point Uncle Bob presents interesting metrics for design quality:
These are:
The most intriguing part is this (directly from the book):
The metrics we describe have been successfully applied to a number of projects since 1994.
Several automatic tools will calculate them for you, and they are not difficult to calculate by hand.
It is also not difficult to write a simple shell, Python, or Ruby script to walk through your source files and calculate them.
For an example of a shell script, you can download
depend.sh
from the freeware section of objectmentor.
I couldn't find this depend.sh
script, and I'm not sure if I agree that these metrics are easy to calculate by hand, or via some script (I would like to use Python for that, if that was the case).
So, the questions are:
The tool NDepend computes these metrics and it makes easy to write your custom metrics through C# Linq Queries.
It is integrated in Visual Studio and also generates report with Uncle Bob's metrics diagram.
A 14-day trial full featured edition is available for download.