NDepend Blog

Improve your .NET code quality with NDepend

Maintainability Index: A Practical Guide for C# Developers

June 1, 2026 9 minutes read If you have ever opened a code analysis report and seen a score labelled “Maintainability Index” sitting next to one of your classes, you...
NDepend June 1, 2026

SOLID Design in C#: The Dependency Inversion Principle (DIP) with Examples

May 25, 2026 9 minutes read The Dependency Inversion Principle (DIP) is one of the five essential SOLID design principles in C# and .NET. These principles are guidelines for the...
NDepend May 25, 2026

SOLID Design in C#: The Interface Segregation Principle (ISP) with Examples

May 25, 2026 9 minutes read The Interface Segregation Principle (ISP) is the “I” in SOLID and one of the five essential SOLID design principles for object-oriented code in C#,...
NDepend May 25, 2026

Cyclomatic Complexity in C#: Everything You Need to Know

May 25, 2026 9 minutes read Cyclomatic Complexity (or CC) in C# is a code metric that counts the number of linearly independent execution paths through a method. Concretely, it...
Erik Dietrich May 25, 2026

SOLID Design in C#: The Single Responsibility Principle (SRP)

May 25, 2026 9 minutes read The Single Responsibility Principle (SRP) is one of the five essential SOLID design principles that guide object-oriented programming in C# and .NET. It is...
NDepend May 25, 2026

Lack of Cohesion of Methods: What Is This And Why Should You Care?

May 14, 2026 2 minutes read Lack of cohesion of methods (usually shortened to LCOM) is one of those things that sits fairly high up on the software hierarchy of...
Erik Dietrich May 14, 2026

Business Complexity vs. Implementation Complexity

September 19, 2019 6 minutes read It is good software design practice to make sure that methods can be entirely viewed in the code editor that typically shows 30 to...
NDepend September 19, 2019

Answers to arguments against 100% coverage

September 10, 2019 7 minutes read I’ve been enthusiast about 100% coverage for more than a decade. The large code base of NDepend we are working on will reach soon...
NDepend September 10, 2019

Are SOLID principles Cargo Cult?

August 13, 2019 6 minutes read My last post about SOLID Design: The Single Responsibility Principle (SRP) generated some discussion on reddit. The discussion originated from a remark considering SOLID...
NDepend August 13, 2019

Continuing Our Clean Architecture Example in C#

June 19, 2018 1 minutes read After a somewhat long delay, it’s time to finally continue our series on clean architecture. This is the second post in the inner series...
Erik Dietrich June 19, 2018

How to Measure Lines of Code? Let’s Count the Ways

February 27, 2018 1 minutes read There are a few ways to count lines of code, and they each have their advantages and disadvantages. Much of the differences come down...
Erik Dietrich February 27, 2018

Functional Programming Makes Your Code Not OO…And That’s It

February 13, 2018 2 minutes read Over the course of the fall and winter, I’ve been gaining momentum with code research posts.  Today, I bring that momentum to bear on...
Erik Dietrich February 13, 2018

Unit Tests Correlate With Desirable Codebase Properties

January 23, 2018 2 minutes read Today, I give you the third post in a series about how unit tests affect codebases. The first one wound up getting a lot...
Erik Dietrich January 23, 2018

The Unit Test Effect Study, Refined

December 21, 2017 2 minutes read About a month ago, I wrote a post about how unit tests affect (and apparently don’t affect) codebases.  That post turned out to be...
Erik Dietrich December 21, 2017

Unit Testing Doesn’t Affect Codebases the Way You Would Think

November 22, 2017 2 minutes read I’ve just wrapped up another study.  (The last one was about singletons, if you’re interested.) This time, I looked at unit testing and the...
Erik Dietrich November 22, 2017

CRAP Metric Is a Thing And It Tells You About Risk in Your Code

November 9, 2017 2 minutes read I won’t lie.  As I thought about writing this post, I took special glee in contemplating the title.  How should I talk about the...
Erik Dietrich November 9, 2017

The Singleton Design Pattern: Impact Quantified

October 26, 2017 3 minutes read This post has been about a month in the offing.  Back in August, I wrote about what the singleton pattern costs you.  This prompted...
Erik Dietrich October 26, 2017

Get Smart — Go Beyond Cyclomatic Complexity in C#

October 5, 2017 2 minutes read Recently, I wrote a post explaining the basics of cyclomatic complexity.  You can read that for a deep dive, but for our purposes here,...
Erik Dietrich October 5, 2017