Static analysis tools allow us to measure code quality and better understand the design and architecture of software. There are things about source code that are not visible to eye in our day-to-day work: dependencies between components, cyclomatic complexity of methods, hidden and indirect dependencies. There are dangers that a method or a type will become overly complex and induce maintenance nightmare without us even noticing it.
Today’s post is about NDepend, a static analysis tool developed by Patrick Smacchia. NDepend measures software quality by extracting metrics, gathering and reporting statistics and visualizing architecture.
Here’s what NDepend does:
Since both Patrick and I like static analysis and are interested in measuring software quality, Patrick suggested that I try out NDepend on one of my projects and share my experiences – and I gladly agreed. I’ve heard about NDepend long ago, and even before I joined Microsoft I blogged about static analysis tools and publicly promised to take a look at NDepend someday, which I felt was a very interesting tool with unique capabilities. Well, since Patrick recently contacted me himself :), there can be no better opportunity to download NDepend and give it a try. Here I’ll provide my first impressions.
I went to www.ndepend.com and started to look around. I liked the site and the fact that there were screenshots and some nice 3-min overview videos. Seconds after clicking on a big download button, NDepend was on my desktop. It comes with two executables – command line NDepend.Console.exe (for the build automation) and the UI VisualNDepend.exe. Of course, I started the VisualNDepend first and it presented me with a nice start page:
The next thing is to create a new NDepend project and add the assemblies to it that you want to analyze.
After the analysis ran, it displayed a very comprehensive report about my project. Even glancing over this report already provided a lot of useful information to me:
After examining the report, I came back to the main application to find that it presents all the information contained in the report, but interactive:
I have to say that the UI looks great, but at first seems rather overwhelming and I felt like sitting in a Boeing cockpit. But hey – you can’t expect a complex static analysis tool to have a notepad-like interface – it has to expose its features somehow. Surprisingly, you get used to the UI really quickly and I found my way around really easily.
All you have are the following things:
Hopefully this can provide a basic overview of NDepend, what it’s for and what it does, as well as its main features. I was very impressed with the tool, really liked it and looking forward to use it more for better architectural insights and better code quality.
PingBack from http://blog.openquality.ru/software-quality-news-1008/
I have not found a link to GuiLabs C# Editor binaries, neither to its source code or repository. Have you ever published it?
http://stackoverflow.com/questions/523212/is-there-any-ide-or-visual-studio-mono-sharpdevelop-plugin-for-braceless-c
NDepend is a brilliant tool.
I discovered it reading a new C# multicore programming book: "C# 2008 and 2005 threaded programming", by Gastón Hillar, Packt Publishing - http://www.packtpub.com/beginners-guide-for-C-sharp-2008-and-2005-threaded-programming
The book talks about NDepend as a great tool for analyzing several aspects of C# code realated to multithreading safety. Great value.
The book is great too.
Hi Jader,
sorry for the delayed reply. I've just posted the sources and binaries here:
http://blogs.msdn.com/kirillosenkov/archive/2009/09/08/first-videos-of-the-structured-editor-prototype.aspx
Thanks,
Kirill