NDepend Blog

Improve your .NET code quality with NDepend

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

November 13, 2023 6 minutes read The Interface Segregation Principle (ISP) is one of the five essential SOLID design principles. These principles are guidelines for the proper usage of object-oriented features. The...
NDepend November 13, 2023

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

November 9, 2023 7 minutes read The Single Responsibility Principle (SRP) is one of the five essential SOLID design principles. These principles are guidelines for the proper usage of object-oriented features....
NDepend November 9, 2023

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

November 8, 2023 8 minutes read The Dependency Inversion Principle (DIP) is one of the five essential SOLID design principles. These principles are guidelines for the proper usage of object-oriented...
NDepend November 8, 2023

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

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

December 14, 2017 2 minutes read Lack of cohesion of methods (sometimes abbreviated LCOM) is one of those things that occurs fairly high up on the software hierarchy of needs. ...
Erik Dietrich December 14, 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

Understanding Cyclomatic Complexity

September 14, 2017 2 minutes read Wander the halls of an enterprise software outfit looking to improve, and you’ll hear certain things.  First and foremost, you’ll probably hear about unit...
Erik Dietrich September 14, 2017