Author: Patrick Smacchia
My dad being an early programmer in the 70's, I have been fortunate to switch from playing with Lego, to program my own micro-games, when I was still a kid. Since then I never stop programming.
I graduated in Mathematics and Software engineering. After a decade of C++ programming and consultancy, I got interested in the brand new .NET platform in 2002. I had the chance to write the best-seller book (in French) on .NET and C#, published by O'Reilly and also did manage some academic and professional courses on the platform and C#.
Over my consulting years I built an expertise about the architecture, the evolution and the maintenance challenges of large & complex real-world applications. It seemed like the spaghetti & entangled monolithic legacy concerned every sufficiently large team. As a consequence, I got interested in static code analysis and started the project NDepend in 2004.
Nowadays NDepend is a full-fledged Independent Software Vendor (ISV). With more than 12.000 client companies, including many of the Fortune 500 ones, NDepend offers deeper insight and full control on their application to a wide range of professional users around the world.
I live with my wife and our twin kids Léna and Paul in the beautiful island of Mauritius in the Indian Ocean.
On replacing Thread.Abort() in .NET 6, .NET 5 and .NET Core
Thread.Abort() is not supported in .NET 5 / .NET Core We are actually migrating the NDepend analysis and reporting to .NET 5 and figured out that there is no equivalent...
Visual Studio 2022 64 bits: Elements of history
Finally after all these years of waiting Visual Studio 2022 will run in a 64 bits process on 64 bits machines! As a consequence the effective process address space of the...
Covariance and Contravariance in C# Explained
Introduction Covariance and contravariance allow more flexibility when dealing with C# class hierarchy. This article explains and demonstrates the concepts of Covariance and Contravariance in C# .NET. These concepts will...
Clean Architecture Refactoring: A Case Study
Introduction to Clean Architecture The recent post Clean Architecture for ASP.NET Core Solution: A Case Study explained that one of the most interesting property promoted by Clean Architecture is the...
Hungarian Notation for Fields in C#
If there is one topic that divides the C# developers community, it is the Hungarian notation for fields. In our team we rely on Hungarian notation for fields, not just...
6 Reasons Visual Studio Theme Affects Productivity
Themes can be fascinating. Humans are vulnerable to attachments. It could be anything – person, thing, color, food, etc. some people are attracted to unique colors that make them feel...
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...
8 Books to Improve as a .NET Developer
Nowadays all information a developer needs to know is available online for free. Blogposts and videos authored by experts, giant questions and answers websites, a quick search and you get...
Clean Architecture for ASP.NET Core Solution: A Case Study
In this post I’ll explore the Jason Taylor’s CleanArchitecture .NET solution template available here on github. It constitutes a good template and it is based on several modern industry wide...
How to Plan Large-Scale Refactoring?
The .NET platform exists for two decades and nowadays the technology is evolving faster than ever. It is now time for serious .NET applications to be refactored to run...
10 Reasons Why You Should Write Tests
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 my professional career is to write...
Include IL Offset into Production Exception Stack Traces
In a previous post The proper usages of Exceptions in C# I explained that it is important to get as much information as possible from production crash logs. One such...
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,...
Visual Studio IntelliCode : AI Assisted Coding
We are all amazed by recent progresses made possible thanks to Artificial Intelligence (AI). In 2017 Microsoft announced Visual Studio IntelliCode which used Machine Learning (ML) to predict code completions,...
How we quickly refactored with Resharper more than 23.000 calls to Debug.Assert() into more meaningful assertions
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 assertions calls. Few developers realize that...
The proper usages of Exceptions in C#
The C# exception basics are generally well understood. However exceptions are often used as a way to sweep error handling duty under the carpet. As I did in The proper...
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...
Code Smell – Primitive Obsession and Refactoring Recipes
Primitives are the real building blocks of your class and its use is obviously inevitable. But the real problem starts when they are not used properly. When you define Class,...
Using C#9 record and init property in your .NET Framework 4.x, .NET Standard and .NET Core projects
C#9 record and C#9 init property are really nice addition to the language. As explained in C#9 records: immutable classes, both are syntactic sugar that don’t require any change at...
C# Index and Range Operators Explained
C#8 added the index ^ and range .. operators. In this post I am attempting to demystify both in the most comprehensive way. The index operator ^ Let’s start with...
Visualize Code with Software Architecture Diagrams
The source code is the design. This famous motto means that no matter how many diagrams you draw and discuss with your colleagues, the important point is how the existing...
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...
Strategies to Catch Regression Bugs before Production: A Case Study
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 a bug due to a mutable...
C#9 records: immutable classes
Record is a long time awaited feature now proposed by C# 9. With record we have a concise syntax to define immutable types this way: [crayon-63d37c80d6d39179850062/] Isn’t it beautiful? In...
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...
.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...
Top 10 .NET 5.0 new APIs
When a new major .NET version hits Release Candidate, it is time to use the NDepend code review changes capabilities to browse which new APIs have been added. It is...
Architecture of a C# game rendered with Blazor, Xamarin, UWP, WPF, and Winforms
When I wrote my last post Blazor Internals you need to know I came across this great project on github: AsteroidsWasm. This project is a remake in C# of the...
Blazor Internals you need to know
Lately the Blazor technology received a lot of attention both from Microsoft and from the .NET community. Blazor is a UI technology. The ASP.NET team develops it since 2017. Its...
14 Visual Studio Web Development Productivity Tips
Visual Studio proposes quite a few handy tools to boost your productivity as a web developer. Here are some tips focused around web code edition and web application starting and...