I was recently given a copy of the latest version of NDepend Professional so that I could review it. I have to say that this tool is worth it’s weight in gold. I used one of the earlier versions of this product and loved it then too…but this version is way better! The tool was easy to install and get running. And in a matter of minutes I had a report generated on the code base for my book. I honestly wish I had this tool integrated into my build process from day one as I would have seen some bottle necks that I will now go back in and fix! Here are some quick metrics for those interested:
Application Metrics
Number of IL instructions: 61021
Number of lines of code: 6878
Number of lines of comment: 3764
Percentage comment: 35
Number of assemblies: 2
Number of classes: 388
Number of types: 512
Number of abstract classes: 0
Number of interfaces: 107
Number of value types: 2
Number of exception classes: 0
Number of attribute classes: 0
Number of delegate classes: 0
Number of enumerations classes: 15
Number of generic type definitions: 20
Number of generic method definitions: 10
Percentage of public types: 73.05%
Percentage of public methods: 85.6%
Percentage of classes with at least one public field: 0.2%
I have always loved this image. It is nice in that it shows how much code in the code base is dedicated to a given area. It also shows at a quick glance where things are located in relationship to one another.
![VisualNDependView[6] VisualNDependView[6]](http://blog.socialnetworkingin.net/images/blog_socialnetworkingin_net/WindowsLiveWriter/NDependReportforFisharoocodebase_AB79/VisualNDependView%5B6%5D_thumb.png)
In this next image it looks like the code is almost entirely in the green zone. Not sure how this is determined…but I am guessing that green is good?
![AbstractnessVSInstability[6] AbstractnessVSInstability[6]](http://blog.socialnetworkingin.net/images/blog_socialnetworkingin_net/WindowsLiveWriter/NDependReportforFisharoocodebase_AB79/AbstractnessVSInstability%5B6%5D_thumb.png)
here I think I would prefer that the web side of things entirely go through the core but that is not entirely possible. The only thing here that really bugs me is the reference to System.Data.Linq. I will need to go in and see if this is actually used…or just referenced. I can’t imagine that the web is directly accessing data!
![ComponentDependenciesDiagram[6] ComponentDependenciesDiagram[6]](http://blog.socialnetworkingin.net/images/blog_socialnetworkingin_net/WindowsLiveWriter/NDependReportforFisharoocodebase_AB79/ComponentDependenciesDiagram%5B6%5D_thumb.png)
I generated a report with all of the other stats in it and saved it to a PDF here: http://blog.socialnetworkingin.net/NDepend%20Report%20-%20Fisharoo.pdf Some of this won’t look as good as what you would get from the NDepend tool…but you will get the idea of how much information they provide. Now I have to go and clean up some of my code so that I feel better! <GRIN>