NDepend

Improve your .NET code quality with NDepend

Self Documenting Code vs. Comments? Turns Out It’s Both or Neither

It’s been about a month since my last research post, and I’ve been musing about the next topic.  What should it be?  Well, I’ve decided.  Since I love nothing more...
Erik Dietrich November 20, 2018

Extension Methods and the Decline of Traditional OOP

A bunch of years ago, I wrote a post on my own personal blog titled, “Why I Don’t Like C# Extension Methods.”  Over the years, I’ve updated that post a...
Erik Dietrich October 9, 2018

Shotgun Surgery: What It Is and How to Stop It

I really love the name “shotgun surgery” for describing a code smell.  It’s sort of an interesting mix of aggressive and comical, and so it paints a memorable picture.  I...
Erik Dietrich October 2, 2018

You Should Favor Software Products That Include Support in the Price

Quite often we talk about architectural concerns on this blog, with topics like application layering or the merits of design patterns.  But today I’m going to switch gears a little...
Erik Dietrich September 11, 2018

Autofac: A Detailed Look Under the Hood at Its Code Quality

In case you haven’t seen it, I’ve been diving ever-further down the code research rabbit hole.  Today it brings me to the Autofac codebase (found here).  But to understand how...
Erik Dietrich July 31, 2018

Log4net vs NLog: A Comparison of How They Affect Codebases

Ah, the old “versus” Google search.  Invariably, you’re in the research stage of some decision when you type this word into a search engine.  Probably not something like Coke vs...
Erik Dietrich June 12, 2018

What Makes a Codebase Acquirable?

What makes a codebase acquirable? This is the rare question that affects software developers, managers, and executives in a surprisingly similar way.  And that’s saying something since, by and large,...
Erik Dietrich May 15, 2018

Moq: A Detailed Look at Its Code Quality

In case you haven’t seen it, I’ve been doing a series of research-oriented posts for this blog.  This is going to be in the same vein but focused on the...
Erik Dietrich April 17, 2018

On the Superiority of the Visual Studio Dark Theme

When I downloaded the newest version of NDepend, something wonderful awaited me.  Was it support for the latest .NET Core version?  The addition of checks for ubiquitous language for DDD...
Erik Dietrich April 10, 2018

Functional C# Improves Your Design Without Making Your Code Cleaner, Exactly

Today I offer another one of the code research posts we’ve been doing.  If you want more backstory on the series, check out the last post in the series, where...
Erik Dietrich March 20, 2018

Your Guide to Winning Arguments About Code

The whole “tabs versus spaces” thing occupies sort of an iconic position in the programmer world.  It represents the impossibility of winning arguments that are unwinnable by their very nature. ...
Erik Dietrich February 20, 2018

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

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 the subject of functional programming.  Or...
Erik Dietrich February 13, 2018

Unit Tests Correlate With Desirable Codebase Properties

Today, I give you the third post in a series about how unit tests affect codebases. The first one wound up getting a lot of attention, which was fun.  In...
Erik Dietrich January 23, 2018

Delegation As a Developer: Building the Next You

“I love me some me!”   Yes, there’s more than just an ounce of truth in that statement said by the great NFL receiver Terrell Owens.  Terrell loved some Terrell....
Erik Dietrich January 9, 2018

Following the Software Architecture Career Path

I can recall a certain day in my career with remarkable clarity. I say remarkable because this happened well over a decade ago, when I was a relatively fresh-faced software...
Erik Dietrich January 2, 2018

The Unit Test Effect Study, Refined

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 quite popular, which is exciting.  You...
Erik Dietrich December 21, 2017

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

Lack of cohesion of methods (sometimes abbreviated LCOM) is one of those things that occurs fairly high up on the software hierarchy of needs.  What’s the “software hierarchy of needs?” ...
Erik Dietrich December 14, 2017

A Guide to Code Coverage Tools for C#

I promise that I’ll get to a treatment of code coverage tools in short order.  In this post, I’ll go through 6 different options and list their features to help...
Erik Dietrich December 7, 2017

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

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 impact it has on codebases. It...
Erik Dietrich November 22, 2017

5 Tips to Help You Visualize Code

Source code doesn’t have any physical weight — at least not until you print it out on paper.  But it carries a lot of cognitive weight.  It starts off simply...
Erik Dietrich November 16, 2017

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

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 CRAP metric?  *Snicker* I guess that...
Erik Dietrich November 9, 2017

Code Reuse is Not a Good Goal

Wait, wait, wait.  Put down the pitchforks and listen for a minute.  You’re probably thinking that I’m about to tout the “virtues” of copy/paste programming or something.  But I assure...
Erik Dietrich November 2, 2017

The Singleton Design Pattern: Impact Quantified

This post has been about a month in the offing.  Back in August, I wrote about what the singleton pattern costs you.  This prompted a good bit of discussion, most...
Erik Dietrich October 26, 2017

You Have No Excuse for Dead Code

In darker times, software management would measure productivity as a function of lines of code.  More code means more done, right?  Facepalm.  When I work with IT management in my...
Erik Dietrich October 19, 2017

Without Seeing Your Application’s Dependency Graph, You’re Flying Blind

Software architecture tends to be a pretty hard game.  Writing scripts and little toy apps is easy enough.  You build something and then you run it, confirming it does what...
Erik Dietrich October 12, 2017

Get Smart — Go Beyond Cyclomatic Complexity in C#

Recently, I wrote a post explaining the basics of cyclomatic complexity.  You can read that for a deep dive, but for our purposes here, let’s be brief about defining it. ...
Erik Dietrich October 5, 2017

C# Tools to Help with Your Code Quality

Over the years, one of the things I’ve come to love about the .NET ecosystem is the absolute abundance of tools to help you.  It’s an embarrassment of riches.  I...
Erik Dietrich September 28, 2017

Announcing the Singleton Challenge

About a month ago, I made a post about what the singleton pattern costs you. Although I stated my case in terms of trade-offs rather than prescriptive advice, I still...
Erik Dietrich September 21, 2017

Understanding Cyclomatic Complexity

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 test coverage.  But, beyond that, you’ll...
Erik Dietrich September 14, 2017

Marker Interface Isn’t a Pattern or a Good Idea

Today, I have the unique opportunity to show you the shortest, easiest code sample of all time.  I’m talking about the so-called marker interface.  Want to see it?  Here you...
Erik Dietrich September 7, 2017