NDepend

Improve your .NET code quality with NDepend

C# 8.0 Features: Another Glimpse of the Future

About two months ago, we talked about some of the (probable) features we’ll be getting with C# 8.0. The post was well received and generated some buzz, which encouraged me...
Carlos Schults February 6, 2018

An Introduction to Clean Architecture

It seems to me that the topic of software architecture has attracted a lot of interest in the last few years. And among many different flavors and styles of software...
Carlos Schults January 30, 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

Value Objects: A Tool for Self-Documented Code and Fewer Errors

Have you ever heard of value objects? I bet you have. Even though they’re talked about a lot less than I’d like, they’re still talked about enough that many developers have...
Carlos Schults January 16, 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

Cargo Cult Programming Is the Art of Programming by Coincidence

I first learned about cargo cult programming a few years ago. I remember thinking back then, “What a strange name for a programming-related concept.” If you share my past self’s...
Carlos Schults December 28, 2017

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

C# 8.0 Features: A Glimpse of the Future

It’s been almost 20 years since Microsoft released the first version of the C# language. From its inception—when some unjustly deemed it a mere Java copycat—until now with the upcoming...
Carlos Schults November 30, 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

A problem with extension methods

We like extension methods. When named accordingly they can both make the caller code clearer, and isolate static methods from classes on which they operate. But when using extension methods,...
Patrick Smacchia November 13, 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

Static analysis of .NET Core 2.0 applications

NDepend v2017.3 has just been released with major improvements. One of the most requested features, now available, is the support for analyzing .NET Core 2.0 and .NET Standard 2.0 projects. .NET...
Patrick Smacchia October 12, 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

Migrating from HTTP to HTTPS in a IIS / ASP.NET environment

Google is urging more and more webmasters to move their sites to HTTPS for security reasons. We did this move last week for our IIS / ASP.NET website https://www.NDepend.com and we learned a...
Patrick Smacchia September 5, 2017

Understanding the Difference Between Static And Dynamic Code Analysis

I’m going to cover some relative basics today.  At least, they’re basics when it comes to differentiating between static and dynamic code analysis.  If you’re new to the software development...
Erik Dietrich August 31, 2017

Using NDepend To Get Going Quickly on C# Projects

Assuming you’ve had at least one job working on one or more C# projects, let me paint a familiar picture for you.  I’m talking about your onboarding time with a...
Erik Dietrich August 24, 2017

What the Singleton Pattern Costs You

Do you use the singleton pattern?  If not, I’m assuming that you either don’t know what it is or that you deliberately avoid it.  If you do use it, you’re...
Erik Dietrich August 17, 2017

The Role of Static Analysis in Testing

“What do you do?” In the United States, people ask this almost immediately upon meeting one another for the first time.  These days, I answer the question by saying that...
Erik Dietrich August 10, 2017