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 (> 15.000 copies) and also did manage some academic and professional courses on the platform and C#.
Over the years, I gained a passion for understanding structure and evolution of large complex real-world applications, and for talking with talented developers behind it. As a consequence, I got interested in static code analysis and started the project NDepend.
Today, with more than 8.000 client companies, including many of the Fortune 500 ones, NDepend offers deeper insight and understanding about their code bases to a wide range of professional users around the world.
I live with my wife and our twin babies Léna and Paul, in the beautiful island of Mauritius in the Indian Ocean.
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 based on Programming By Examples...
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, what matters is how the existing source...
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. Finally we have a concise syntax to express this: [crayon-6007cfd331833999550278/] Isn’t it beautiful? In the NDepend code itself...
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...
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...
10 Visual Studio Navigation Productivity Tips
A large code base is a complex asset. Visual Studio is a complex environment. In this context developers spend a significant part of their time searching and navigating across code...
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....
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...
10 Visual Studio Ninja Code Editor Productivity Tips
Among the multiple daily development tasks (planning, testing, refactoring, bug fix…) code edition is arguably the most satisfying one. Code edition can be even more satisfying and productive by mastering...
10 Visual Studio Solution Explorer Productivity Tips
The Visual Studio Solution Explorer panel is like home for Visual Studio users. It presents all projects, source files and items thanks to a treeview layout. This panel is quite...
Case Study : Complex UI Testing
In the previous post Case Study: 2 Simple Principles to achieve High Code Maintainability I explained that the principles layered code + high coverage ratio by test are 2 simple...
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...
Advices to Become a Remote Programmer
With the actual COVID-19 worldwide outbreak many programmers are already forced to work remote, and we can expect that most of us will soon be home. In the IT and...
Don’t rely on someone else to protect your software
This morning I stumbled on this post Decompilation of C# code made easy with Visual Studio on the Visual Studio blog. Basically VS will soon be able to not only...
Mythical man month : 10 lines per developer day
The mythical book, Mythical man month quotes that no matter the programming language chosen, a professional developer will write on average 10 lines of code (LoC) day. After 14 years of...
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...
4 Predictions for the Future of .NET
In May 2019, Microsoft officially announced .NET 5, the future of .NET: it will be based on all the .NET Core work already achieved. Here is the schedule announced: On...