Category: Code Metrics
Our posts on creating, testing, and evaluating code metrics
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...
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....
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...
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...
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...
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...
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...
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...
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...
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...
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...
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. ...
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...
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...
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...
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,...
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...