NDepend

NDepend is a tool that can read .net assemblies and calculate all sort of code matrices from them – and it’s an absolutely amazing tool.

The amount of information you can get from it is overwhelming, there are 82 built in code metrics (according to the web site, I didn’t count) and least 4 major kinds of visualizations and an SQL-like language you can use to query arbitrary details about your code.

Now, I have to warn you, this tool has a pretty steep learning curve, it is downright intimidating (did I mention an SQL-like language to query your code?) but this tool can produce so much information that I really don’t know how it can be made easier without losing some of it’s unique capabilities.

But once you learn how to use it NDepends is surprisingly easy to use - and the help on the web site is very helpful.

I am doing some major refactoring of yaTimer (because parts of yaTimer that were designed only run in a desktop application now also run on the web as part of yaTimer Central) and NDepend proved to be extremely valuable – if I didn’t have NDepend I literally would not have been able to do such a good job.

For example, without the dependency mapping feature (between namespaces inside the same assembly or even individual classes) I just couldn’t have found and eliminated unwanted dependencies – there is just no other way I could have got the dependency maps (I don’t have the time to spend days manually going over every class looking for dependencies), not to mention I rerun NDepend after every compilation to see my changes – just try to do this with a manual process.

If you ever refactor .net code you have to take a look at NDepend.

Full discloser: I got a free NDepend license.

Update October 20: after reading Patrick Smacchia's comment and re-reading this post I understood I've made it sound like NDepends is hard to use - and it's not, it just requires some learning, and investing the time to learn to use this tool is worth it (and I've added the paragraph starting with "But Once" above)

posted @ Thursday, October 14, 2010 5:42 PM

Comments on this entry:

# re: NDepend

Left by Patrick Smacchia at 10/19/2010 3:28 PM

We released recently some kind of Context-Sensitive help in NDepend that hopefully, will help make the tool easy to learn.

# re: NDepend

Left by Nir at 10/20/2010 1:27 AM

Patrick - I just understood I made it sound like NDepends is hard to use, this is not what I wanted to say and I've updated the post to clerify it.

Your comment:



 (will not be displayed)


 
 
 
Please add 1 and 6 and type the answer here: