Jump to content

New things in NDepend 2017.0.1

Posted on:January 29, 2017 at 01:00 AM

“TD” abbreviation for Technical Debt term

NDepend is an excellent tool for tracking code issues in C# projects. It allows checking a massive amount of aspects thanks to CQLinq. When used properly will increase code quality a lot.

Newest version 2017.1 is equipped with technical debt calculation feature.

Technical debt

Since research on technical debt is what I do in free time, this feature in NDepend was especially interesting for me. Measuring TD gives the organization some hard numbers. Something that can be measured can be managed.

To test this new feature I used my well-known project that I monitor all over - SmartStoreNET. SmartStoreNET is opensource e-commerce project developer by a couple of folks in Germany.

My session (PL) demonstrating NDepend features was using SmartStoreNET as an example :) (slides available here).

Technical debt in NDepend

NDepend has in each rule a formula for TD calculation. The formula for Avoid methods too big, too complex looks like following.

Thanks to that we can have information like this for each rule:

That information is combined altogether per class view.

This gives us really a lot of useful information on the status of the project. Some may notice that debt is calculated with some predefined values. The authors had to balance the relative value debt between different rules. Of course, nothing stops you to alter the rules to your needs.

The TD overview is very well visible in a dashboard. For the project managers, this is what they want. One number for measurement.

The dashboard itself was enriched with more functionality.

It is possible to explore TD by rules or code elements.

Another nice thing in dashboard is grouping issues by element/namespace/assembly/rule.

NDepend can also calculate Annual Interest. Managers or tech leads can use that information to prioritize what to fix next. The bad thing is that interest grow, but the good that we can measure it now :)

Finally, NDepend can also track TD evolution. As you may know (or not) NDepend has a concept of snapshots. It is possible to compare 2 code bases and check the differences. In the newest version also the differences in TD can be compared and the trend is visible in the dashboard panel.

Summary

Newest NDepend brings code quality checking in C# projects to a higher level. Now it became a tool that reports not only code smells, but also a nice overview of how much it would potentially take us to fix those.