Sometime around 2006 I’ve run across NDepend. The tool was already cool back then, but nowadays it is just outstanding!
From their website:
NDepend is a tool that simplifies managing a complex .NET code base. Architects and developers can analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code.
I’ve been using FxCop for quite a while now, and I’ve run NDepend a few times over the last two years, but like I mentioned yesterday in my "Learning in Spiral" post, I was probably not ready to interpret the rich information the tool gives me. In fact, I’m still not ready. The tool provides a ridiculous number of metrics about the code (I say "ridiculous" just because that’s how I feel for not fully understanding all that information). 🙂
What’s cool is that I keep researching on software design, so every time I go back and look at NDepend reports I end up learning something else about my code base. Also, the tool provides links to information that explain a lot of the metrics being reported.
I won’t even bother including any NDepend snapshots here because there’s a lot of it at the product’s website. There’s also a number of online demos, so make sure to check it out! The video helps clarifying how we should interpret the metrics, and how we can use the tool in order to learn specific things about our code base.
The way the tool allows me to visually learn things about my code base is just amazing. I’m going through a process of refactoring and improving some parts of our framework, and NDepend gives me really insightful information regarding dependencies, from a top level view (assembly dependencies), all the way down to members; in other words, one can easily go all the way down to, say, a method or property, in order to find out why Assembly X depends on Assembly Y. I’ve been finding some dependencies in some assemblies that should probably not be there, and thinking how I could improve that.
This book has some great chapters that have helped me improve my understanding of coupling, dependency management principles, etc., so when I go back to NDepend, the things I see make a lot more sense than before:
|Agile Principles, Patterns, and Practices in C# (Robert C. Martin Series)
by Robert C. Martin, Micah Martin
Also, NDepend has integration with .NET Reflector, which is another one of my favorite tools.
At this point, I have to say NDepend is a must-have tool for any developer who cares about code quality. Even if you get overwhelmed by the amount of metrics it gives you, just stick with it, because it may take a while for things to sink in, but when that happens, if you’re like me, you won’t be able to shake that "wow" feeling. 🙂