NDepend

Improve your .NET code quality with NDepend

Code Metric Visualization: Lines of Code and Code Coverage

One of the features of NDepend that we get a lot of positive feedback about is its data visualization, and it’s really no surprise. The code metric visualizations allow teams and managers to quickly see what is happening in their code base. With NDepend’s custom code metrics, developers can generate visual reports of what matters to facilitate teamwork as well as keep management in the loop.

We have written before about how a company can use NDepend’s visualizations as a sort of “radiator” to track changes in the source code over time. We also have examples of companies (such as Stago and Siemens Healthcare) using it to great effect in helping architects and developers communicate effectively.  This resulted in producing better quality end products while still meeting deadlines.

Not only is it very informative, but the treemap view is also pretty aesthetically pleasing. We wanted to show it off and at the same time give a glimpse of how NDepend has changed over the years. We are all about making your code beautiful and following best practices, so now you can see how well we follow our own rules.

We decided to compare Lines of Code (LoC) against code coverage of NDepend in its own treemap view. We ran an analysis on both the current version of NDepend as well as a build from 2013.

In this view, red means zero coverage, orange / yellow means not enough, and green means full coverage. As you can see, the source code for NDepend has grown in both lines of code and code coverage. Back in 2013, not even half of the source code was automatically tested but the latest version is over 80% covered by testing. Still, there are some red areas that we are improving on!

(click image for large version)

code-coverage-vs-lines-of-code-code-metric-visualization-ndepend

My dad being an early programmer in the 70's, I have been fortunate to switch from playing with Lego, to program my own micro-games, when I was still a kid. Since then I never stop programming.

I graduated in Mathematics and Software engineering. After a decade of C++ programming and consultancy, I got interested in the brand new .NET platform in 2002. I had the chance to write the best-seller book (in French) on .NET and C#, published by O'Reilly and also did manage some academic and professional courses on the platform and C#.

Over my consulting years I built an expertise about the architecture, the evolution and the maintenance challenges of large & complex real-world applications. It seemed like the spaghetti & entangled monolithic legacy concerned every sufficiently large team. As a consequence, I got interested in static code analysis and started the project NDepend in 2004.

Nowadays NDepend is a full-fledged Independent Software Vendor (ISV). With more than 12.000 client companies, including many of the Fortune 500 ones, NDepend offers deeper insight and full control on their application to a wide range of professional users around the world.

I live with my wife and our twin kids Léna and Paul in the beautiful island of Mauritius in the Indian Ocean.