NDepend

Improve your .NET code quality with NDepend

Class vs Struct in C#: Making Informed Choices

In C# programming, choosing the right data type between classes and structs is a crucial decision that impacts application performance and design. This article presents a concise comparison of Class vs...
Patrick Smacchia August 1, 2023

The NDepend GitHub Action is now available!

NDepend is a tool for .NET developers and teams that assesses the code quality within the IDE and the CI-CD process. With 17 years of existence and over 12.000 companies...
Patrick Smacchia January 25, 2023

Deconstruction in C#

C# 7.0 introduced the deconstruction syntax. It allows developers to extract in a single expression, properties of an object or elements of a tuple and then to assign them to...
Patrick Smacchia January 18, 2023

.NET Build Improvement: Stop Wasting Resources

I am working on .NET development full-time since 2002 and there is a point that still annoys me after all these years: the default .NET build behavior leads to a...
Patrick Smacchia October 4, 2022

C# 11 Raw String Literals Explained

C# 11 introduces Raw String Literals. Undoubtedly this feature will become very popular because it represents an elegant way to solve some issues with actual string literal. Let’s have a...
Patrick Smacchia August 25, 2022

Modern C# Hello World

With Visual Studio 2022 when you create a new console project based on .NET 6, the Hello World source code generated is now as simple as that: [crayon-650f114c58919355988892/] Nice and...
Patrick Smacchia November 23, 2021

Implementing a Domain with POCO (Plain Old CLR Objects)

Here is a remark I noticed on my recent post Clean Architecture for ASP.NET Core Solution: A Case Study and I’d like to detail a bit this here: “The article...
Patrick Smacchia April 8, 2021

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

The famous Fred Brooks paper “No Silver Bullet – Essence and Accident in Software Engineering“ published in 1987 stated that: “there is no single development, in either technology or management technique,...
Patrick Smacchia January 26, 2021

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

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 came up after 25 years of...
Patrick Smacchia December 8, 2020

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

The size and complexity of codebases have exploded in the last decade. What can you do when your codebase no longer fits your brain? In this article I’ll suggest two...
Patrick Smacchia November 2, 2020

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

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 match not keyword: Negative patterns. Require...
Patrick Smacchia October 5, 2020

.NET 5.0 App Trimming and Potential for Future Progress

In this article we will: go through the various ways to publish a .NET 5.0 application, play with .NET 5.0 app trimming to reduce the size of our deliverable use...
Patrick Smacchia September 28, 2020

10 Visual Studio Files and Layout Productivity Tips

Nowadays most developers are working remotely. Hence the monitor(s) configuration might have changed, and might change frequently. In this context, it does matter to optimize the Visual Studio layout and...
Patrick Smacchia July 21, 2020

Top 10 Visual Studio Refactoring Tips

With the version 2019 Visual Studio is now mature when it comes to refactoring. This post proposes a tour of the top 10 most used refactoring actions in my opinion....
Patrick Smacchia July 7, 2020

12 Visual Studio Debugging Productivity Tips

In this post we assume the the reader knows the basics of debugging with Visual Studio: F5 to start running with the debugger F9 set breakpoint on the current line...
Patrick Smacchia June 30, 2020

Case Study: 2 Simple Principles to achieve High Code Maintainability

High Code Maintainability is the key to make both the management and the developers happy: Maintainability lets a product evolves naturally at a sustained pace with controlled cost. Maintainability lets...
Patrick Smacchia April 22, 2020

Not planning now to migrate your .NET 4.8 legacy, is certainly a mistake

2020 will see the achievement of the massive remodeling of the .NET platform initiated by Microsoft in November 2014 with the introduction of .NET Core 1, with the promise of...
Patrick Smacchia January 16, 2020

SOLID Design: The Interface Segregation Principle (ISP)

After having covered The Open-Close Principle (OCP), The Liskov Substitution Principle (LSP) and the Single Responsibility Principle (SRP) let’s talk about the Interface Segregation Principle (ISP) which is the I...
Patrick Smacchia August 20, 2019

SOLID Design: The Open-Close Principle (OCP)

The Open-Close principle (OCP) is the O in the well known SOLID acronym. Bertrand Meyer is generally credited for having originated the term open/closed principle, which appeared in his 1988...
Patrick Smacchia July 30, 2019

Ensure that your classes are declared as sealed when possible

Inheritance is one of the pillar of OOP. However, in the real world, most classes are not designed to be properly inheritable. Properly designing a class to be inheritable is...
Patrick Smacchia July 10, 2019

An in-depth analysis of .NET Core 3.0 support for WPF and Winforms APIs

.NET Core 3.0 will be RTM soon and it supports WPF and Winforms APIs. In my last post I’ve been exploring .NET Core 3.0 new APIs by comparing compiled bits...
Patrick Smacchia February 28, 2019

New .NET Core 2.1 and ASP.NET Core 2.1 APIs

.NET Core 2.1 and ASP.NET Core 2.1 Preview1 have just been released (see here the official announcement) and we are going to explore new APIs in this post. We’ll found...
Patrick Smacchia March 8, 2018

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

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

Why NDepend Uses Google’s Page Rank

I remember my early days of blogging as sort of a comedy of errors.  Oh, don’t get me wrong.  I don’t think those early posts were terrible, since I’d always...
Erik Dietrich May 25, 2017

How to Evaluate Your Static Analysis Process

I often get inquiries from clients and prospects about setting up and operationalizing static analysis.  This makes sense.  After all, we live in a world short on time and with...
Erik Dietrich April 27, 2017

Static Analysis for the Build Machine?

I remember my earliest experiences with static analysis.  Probably a decade ago, I started to read about it during grad school and poke around with it at work.  Immediately, I...
Erik Dietrich October 20, 2016

How to Analyze a Complex Solution

I’ve made no secret that I spend a lot of time these days analyzing code bases as a consultant, and I’ve also made no secret that I use NDepend (and...
Erik Dietrich June 23, 2016