Highlight technical debt in your C# project

technical debtGoogling around the web, I chance upon an interesting idea to deal with technical debt, dealing with it as you normally do with your code under test.

This idea comes from Jason Roberts, a C# developer and Microsoft MVP, and is quite simple: use some special attributes to decorate parts of your code that needs a refactor.

Using the [TechDebt] attribute, you can mark methods, properties, classes, and so on to classify the work to do, specifying the pain generated by those lines of code and the effort needed to fix it.
To get a report of the total technical debt scattered in your project, you can finally write a test that loads your assembly and shows the sum of all.

I think this is a small but interesting tool to visualize what’s wrong in your code, an effective memento to refactor your code.

The author wrote about this idea in his blog, where you can find also the GitHub link to the project and the NuGet package to download.

Leave a Reply

Your email address will not be published. Required fields are marked *