NDepend Blog

Improve your .NET code quality with NDepend

SOLID Design in C#: The Open-Close Principle (OCP)

November 20, 2023 7 minutes read The Open-Close Principle (OCP) is one of the five essential SOLID design principles. These principles are guidelines for the proper usage of object-oriented features....
NDepend November 20, 2023

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 Liskov Substitution Principle (LSP)

November 13, 2023 7 minutes read The Liskov Substitution Principle (LSP) is one of the five essential SOLID design principles. These principles are guidelines for the proper usage of object-oriented features. Named after...
NDepend November 13, 2023

Visual Studio Enterprise vs. Professional: Essential Differences in 2023

November 8, 2023 1 minutes read If you’re a .NET developer, chances are you’re using Visual Studio, the go-to product for developing .NET applications. However, with several versions available, it...
Erik Dietrich November 8, 2023

REST vs. RESTful: The Difference and Why the Difference Doesn’t Matter

November 2, 2023 1 minutes read REST API is one of the most popular APIs in the web development community. What’s the difference between a REST API and a RESTful...
Erik Dietrich November 2, 2023

How to collect return values from Parallel.ForEach?

January 26, 2022 1 minutes read Today I took 10 minutes to answer the 9 years old stackoverflow’s question: How do I collect return values from Parallel.ForEach? I though the...
NDepend January 26, 2022

How to Plan Large-Scale Refactoring?

February 23, 2021 6 minutes read   The .NET platform exists for two decades and nowadays the technology is evolving faster than ever. It is now time for serious .NET...
NDepend February 23, 2021

10 Reasons Why You Should Write Tests

February 9, 2021 8 minutes read As many, I started programming when I was a child 3 decades years ago. With no doubt, the most important practice I’ve adopted during...
NDepend February 9, 2021

Include IL Offset into Production Exception Stack Traces

February 2, 2021 3 minutes read In a previous post The proper usages of Exceptions in C# I explained that it is important to get as much information as possible...
NDepend February 2, 2021

Is Artificial Intelligence Assisted Coding the Next Developer Productivity Silver Bullet?

January 26, 2021 9 minutes read The famous Fred Brooks paper “No Silver Bullet – Essence and Accident in Software Engineering“ published in 1987 stated that: “there is no single development,...
NDepend January 26, 2021

Visual Studio IntelliCode : AI Assisted Coding

January 19, 2021 5 minutes read We are all amazed by recent progresses made possible thanks to Artificial Intelligence (AI). In 2017 Microsoft announced Visual Studio IntelliCode which used Machine...
NDepend January 19, 2021

How we quickly refactored with Resharper more than 23.000 calls to Debug.Assert() into more meaningful assertions

January 11, 2021 6 minutes read Since the NDepend inception more than 15 years ago, we stuffed our code with calls to Debug.Assert(). This results today in more than 23.000...
NDepend January 11, 2021

The proper usages of Exceptions in C#

December 16, 2020 9 minutes read The C# exception basics are generally well understood. However exceptions are often used as a way to sweep error handling duty under the carpet....
NDepend December 16, 2020

The proper usages of the keyword ‘static’ in C#

December 8, 2020 6 minutes read The keyword static is somewhat awkward in a pure Oriented-Object world. I would like to explain here what are the right usages of static I...
NDepend December 8, 2020

When your brain can’t handle the complexity: NDepend and PostSharp

November 2, 2020 5 minutes read The size and complexity of codebases have exploded in the last decade. What can you do when your codebase no longer fits your brain?...
NDepend November 2, 2020

Strategies to Catch Regression Bugs before Production: A Case Study

October 19, 2020 6 minutes read That’s quite a coincidence that a few days after promoting the joy of immutability in the post C#9 records: immutable classes we stumbled on...
NDepend October 19, 2020

New C#9 keywords ‘and’ ‘or’ ‘not’

October 5, 2020 4 minutes read HoweverThe C#9 language introduces new controversial keywords: and keyword: Conjunctive patterns. Require both patterns to match or keyword: Disjunctive patterns. Require either pattern to...
NDepend October 5, 2020

10 Visual Studio Ninja Code Editor Productivity Tips

June 24, 2020 3 minutes read Among the multiple daily development tasks (planning, testing, refactoring, bug fix…) code edition is arguably the most satisfying one. Code edition can be even...
NDepend June 24, 2020

Case Study : Complex UI Testing

April 29, 2020 6 minutes read In the previous post Case Study: 2 Simple Principles to achieve High Code Maintainability I explained that the principles layered code + high coverage...
NDepend April 29, 2020

Service Oriented Architecture: A Dead Simple Explanation

January 8, 2019 1 minutes read Service-oriented architecture (SOA) has been with us for a long time. The term first appeared in 1998, and since then it’s grown in popularity....
Erik Dietrich January 8, 2019

C# Features: An Exhaustive List of the Best Ones

December 18, 2018 1 minutes read The first post I wrote for the NDepend blog was about C# 8.0 features. That post inspired a sequel, followed by the series’ final...
Erik Dietrich December 18, 2018

Coupling in Programming: What This Means and How Not to Get Burned

December 4, 2018 1 minutes read What is coupling in programming? Is it something we want to avoid when we design and write code? If so, why? And more importantly,...
Erik Dietrich December 4, 2018

Mentoring Software Developers as an Architect

November 27, 2018 1 minutes read A while back we discussed the unique career path architects have to travel. We wrote that article for developers who want to advance their...
Erik Dietrich November 27, 2018

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

November 20, 2018 1 minutes read 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...
Erik Dietrich November 20, 2018

Should Architects Write Code? You Bet They Should!

October 30, 2018 1 minutes read There’s a common misconception that’s permeated our profession: Architects don’t need to write code to do their jobs. Now, this may seem like a...
Erik Dietrich October 30, 2018

When Is It Okay to Use a C# Partial Class?

October 16, 2018 1 minutes read Today’s post attempts to answer a very simple and straightforward question: “When is it OK to use a C# partial class?” And the answer as...
Erik Dietrich October 16, 2018

Extension Methods and the Decline of Traditional OOP

October 9, 2018 1 minutes read 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...
Erik Dietrich October 9, 2018

Linq Tutorial: A Complete Beginner’s Gentle Introduction

September 18, 2018 1 minutes read There was a time when Linq was a mystery to me. But, now that I’ve learned how to use it, I don’t know how...
Erik Dietrich September 18, 2018

Programming to an Interface: A Simple Explanation

August 21, 2018 1 minutes read As an architect, you know that programming to an interface is good. It’s what everyone should do. But what does that mean? And why...
Erik Dietrich August 21, 2018

What Is a Good Unit Test? 5 Must-Haves

August 14, 2018 1 minutes read In this day and age, unit testing isn’t as controversial as it once was. Sure, you still see the occasional inflammatory, clickbait-y, confrontational “unit...
Erik Dietrich August 14, 2018