S08E10 1h 10mSeason 8

Episode Summary
This episode centres around NDepend, a static analysis tool for .NET developers, described by Patrick as being mature, having started in 2004. The conversation establishes that unlike tools like Resharper which aid during coding, NDepend is designed for analysing completed codebases—especially large, complex, and often older ’legacy’ systems. It doesn’t simply look for syntax errors, but dives into code quality, maintainability, and potential security issues, providing a high-level understanding of the entire solution, not just individual methods or classes. This holistic view allows developers to pinpoint areas needing improvement and prioritize work effectively.
A key distinction highlighted is between static and dynamic analysis. NDepend operates statically, examining the code directly, whilst dynamic analysis involves running the code and observing its behaviour. The interview emphasized NDepend’s unique approach of quantifying technical debt – the implicit cost of addressing code quality issues – and linking it to estimated effort (time or money) needed for remediation. This allows for informed decision-making, particularly when presenting issues to project managers. Patrick described a useful analogy of technical debt as the ’engine light’ on a car – ignore it at your peril, and you risk bigger problems down the line.
The power of NDepend lies in its use of a query language (CQLinq) built upon C# Linq. This allows developers to construct highly specific analyses, querying the code based on various metrics and criteria. While NDepend provides 150 pre-defined rules, the ability to create custom queries enables targeted investigation of specific concerns within a codebase. Furthermore, NDepend integrates with other tools like Resharper and can import data from code coverage tools, creating a unified picture of code health. The conversation also noted a focus on minimising ‘false positives’ – inaccurate warnings that can clutter analysis results.
Patrick discussed how NDepend is used internally at his company, having been ‘dogfooded’ for two decades. They prioritise reducing technical debt by focusing on areas where tests are lacking, and quantifying the risk associated with untestable or complex code. He highlighted the importance of assertion within code itself, creating a self-documenting, safer foundation that aids testability and code comprehension. The conversation touched upon the integration of AI tools, not as a replacement for developer expertise, but as a potential aid, particularly in analysing AI-generated code.
Episode Transcription
So the interest plays a lot of a huge role. Like for example a security issue, it can take you maybe half a day to fix, or maybe one hour to fix; so it’s very easy to fix. But if you don’t fix it, you get so… you’ll get so many angry users that it may be, it maybe, it will cost you your entire business; you see. So this can be seen as an interest.
Hey everyone, and welcome back to The Modern .NET Show; the premier .NET podcast, focusing entirely on the knowledge, tools, and frameworks that all .NET developers should have in their toolbox. I’m your host Jamie Taylor, bringing you conversations with the brightest minds in the .NET ecosystem.
Today, we’re joined by Patrick Smacchia to talk about NDepend, technical debt and the interest it accrues (something that’s often forgotten about), and how NDepend can help you to keep your tech debt (and it’s interest) low.
But the thing we see is that the edge code is usually the code where you get the bugs. So you end up writing some quick tests that can cover 90% of your code, but your 10% here is not tested. And because it’s not well implemented and it’s likely to contain the bug. So, maybe you should refactor your code and make your class testable.
Along the way, we talked about the common pitfalls that most developers make when writing code, and how to keep your code both testable and easy to maintain.
So let’s sit back, open up a terminal, type in dotnet new podcast and we’ll dive into the core of Modern .NET.
Jamie
Patrick
Jamie
AI was the thing that it feels like it came out of nowhere. But actually, the LLM technology behind it has been slowly evolving since the 50s, and it’s based on a research paper put out by Google called " all you need is attention," right? Yeah. But everybody goes, o"h, this has come out of nowhere," but actually, it’s been worked on for years and years. So it’s been really interesting to see just how fast that seems to have come about.
Patrick
Jamie
Before we get to that, I was wondering for the folks who maybe haven’t heard your previous episode, which I will be Linqed, folks, so go listen to that because you’ll learn a little bit more about NDepend. We’re gonna talk about NDepend today anyway, but you know, go listen to that one too.
So for the folks who haven’t heard that previous episode, I wonder, would you mind giving folks a real quick brief bio about, you know? the kind of work you do and all that kind of stuff and then we’ll start our conversation after that about NDepend.
Patrick
It followed all the .NET trends, including Silverlight, if you remember. So we went through all the all the .NET trends, but now there is really one big .NET trend which is .NET Core or .NET 9, and soon .NET 10.
It’s a tool for .NET developer and what it brings you is a good understanding of your codebase, of the quality where you have problems, where the tests are not enough, for example. And it integrates both in the IDE, so mostly Visual Studio, but also it interacts with VS Code and Rider. And also it integrates into your CI/CD and it generates some web reports. So you can use it everywhere in your workflow and also in Azure DevOps and also as a GitHub action.
So basically this is the four the four SKU of the project. So no matter how you work with .NET, how you develop your solution with .NET, it can be here and provide you the information you need to improve your code.
Jamie
From a software engineering, computer science-y background, what is a static analyser, right? I know I need one, but what is it?
Patrick
So basically the world of analyser, of code analyser, is divided in two. There are static analyser and there is dynamic analyser. So static it’s very easy, it just analyses your code, your source code, you develop every day. While the dynamic analyser is running your code, so for example it can run through a test or through a profiler. So it runs your code and it gathers data from running your code.
So you get these two worlds of data that are the static, which is the the source code side, and the dynamic, which is the execution side.
Jamie
Patrick
Resharper is actually, it interact with Resharper. We’ll talk, that’s a new thing we introduced. So I’ll talk about it later. Basically, we use Resharper, we are addicted to Resharper like a lot of people, or maybe to wider for those that quit Visual Studio.
We use it a lot for writing code, you know, Resharper is the champion of writing code. And it tells you a lot of things also about your code. "You can refactor this this way. This portion of code you can remove because the compiler can infer it." It’s very good at doing this these things.
And what I like to say is that Resharper is good to look at your code in a micro… like, in the scope of a class or of a method, it’s really good to have Resharper with you. That can help you write your code.
Why a tool for NDepend? It’s more about wide solution analysis or even multiple solutions. If you… I mean in the terms of SLN file in Visual Studio. So if you have a large legacy, NDepend is good at looking this large legacy at a wall, and at telling you where you should improve your code, where it should be refactored, why do you get all this maintainability problem?
So the really two usecase of NDepend is when you have a big legacy, and a lot of enterprise level people have a big legacy these days in .NET, and you cannot fix bug and you cannot add feature without a lot of pain because your code is not well tested, because it has been written by many different people with a lot of turnover. You know, all this, all this problem end up with a large code base that is difficult to maintain. And NDepend is here to address this kind of problem.
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Another way of seeing it is that maybe you have plenty of class that were not tested in the sense of unit test, but you can you can think that your user are actually testing it, you know. If you don’t get some production issue somehow it’s working. But you want some new code and it’s the time to to make sure you’ve admitted some test and to do the thing well.
Jamie
Patrick
An analogy I like to say is: it’s the difference between a class and an object. A class it’s a static thing. It’s, you write,
public class and then you write your class and then at one time the class gets instantiated, and some object a product. But there is no object in the static world and there is… and yes there is the class in the dynamic world, but we are more talking about instantiation of the class which are objects.Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
So it can mix a lot of things. So for example, I was talking about the baseline, so the new change, the refactor code, etc. But it can mix it with a lot of interesting points, like for example some sort of measure of the complexity.
So you can get some complexity score, for example, and you can mix it for example with code coverage. And what’s interesting is that at the end, with all this information, you can target for example, new code that is not well tested and that is complex, for example. So you can target all these different dimensions in one tool. And then you can focus on what should be really improved.
And for that, one thing that is important with NDepend, which is the backbone of the tool, is what we call a code query or CQLinq. So this is code query which is based on C# Linq. Okay, the same C# Linq that you are using every day. And everything is a C# Linq in NDepend. So a rule, for example, it’s a C# Linq.
So for example if you want a rule where you don’t want a base class to use derived class, it can be as simple as
From T in ApplicationTypes Where T is using TDerivative for example it really looks like that. It’s pretty fluent and then Select T and then you can get a lot of details. So everything is a code query and I will mention more later.And another other point interesting is that every issue,everything that NDepend wants to tell you is quantified through a technical debt metric. Technical debt it’s a famous analogy that I think you’ve you heard about because now it became very famous. I think it was coined, like, 15 years ago.
So technical debt is about: I have problems in my code which are not functional problems. The code is is working fine, the tests are passed. But I have a more like maintainability problem. Like I call it quick and dirty. So now I need to take some time to improve the quality of my code, to improve the overall maintainability. Especially if you are working in a critical business like automotive or financial, etc. So now you need to dedicate some time. At this time it’s a technical debt remediation.
So typically the technical debt is the estimation of how long it will or how much in terms of money, it can be duration of money, how much it’s gonna cost me to fix the problem. And what’s interesting is that NDepend is trying to tell you some estimation about technical debt. And it’s working pretty good. I mean we have very good feedback from the user in terms of estimation because NDepend knows every aspect of your code, as I mentioned earlier. So it’s using formulas involving all aspects of your code.
For example, you have a method which is very complex. You have a lot of loop, you have a lot of if, else switch case, etc. And this method is not tested. Okay, so NDepend analyze all these particular points and will tell you, "this method will take maybe three hours if you want to test it fully," well maybe now it’s a bit cheaper with an AI tool, but it will take that that amount. Yeah we all use it, we all use it. It will take you that amount of effort to make sure that all cases in your method is tested. And maybe it’s time also to split the method in smaller one, or maybe smaller class, smaller structure, etc. to make your code easier to read and understand.
So there are these two things that the quantification of your problem through technical debt. And that everything is a code query because unlike other tool, any other tool actually, except NDepend is a bit like LinqPad; LinqPad is very popular because it lets you write some Linq query up against your database or whatever. So NDepend, it lets you write, Linq query against your code to gather some information. And that’s very powerful because the other tool it’s more like: you have checkbox, you have combo box I want to check that complexity is no bigger than 15, for example. So you get some menu like that, or like some control, like textbook, etc. Well NDepend, it’s an integrated language, so you you can really write everything, you can really ask everything about your your code base.
Jamie
But you were talking about technical debt, right? Everybody knows the phrase. Everybody has a slightly different de definition of what technical debt is, and I feel like every definition of technical debt is valid, right? But I like the idea of being able to look at technical debt and, you know, with the help of say NDepend or, you know, some other system, whatever you want to use, know exactly how much it will cost to fix the technical debt, right?
Because I often say to you know my clients, when I say, "hey, we’ve got some technical debt." I see their eyes glaze over, right? They’re not paying attention. And so I say to them, "’the reason we need to fix the technical debt is because imagine you’re driving your car along the freeway, the motorway, the autobahn, whatever you want to visualize, right? You’re driving it really fast. At the speed limit for that road, but you’re driving really fast. You’re late for a meeting, an in-person meeting, right? And you’re pushing the car as as hard as you can to get there in time and you’re stressed. And then the little engine light keeps bLinqing and saying, something’s wrong with the car. Something’s wrong with the car. And you think, don’t worry. I’ll leave that. I’ll leave that. We’ll fix that later. I need to get to the meeting. The meeting is super important. And imagine you don’t get to the meeting, right? Because the engine stops working. That’s technical debt.". Right? And that’s what I say to people. And then they totally they they kind of get it from that point onward, right?
Patrick
So in in technical term, at first, technical debt at first, I think it was Ken Beck that called it, the term. So the technical debt at first it was all the code that is not automatically tested. So you can sort of infer it from code coverage. So NDepend is not a code coverage tool, but it can import code coverage from any and all the .NET tools that produce code coverage. That’s usually the code that is not tested, is a huge part of your technical debt.
I mean nowadays for me and the team it’s so natural to write tests. I mean we are on the total application we have almost 90% tested code. "Almost tested code" means that class is 100% tested and we couldn’t be where we are now without all this investment in tests. because that’s really an investment that we pay a lot later. Because when we break the code, when we add new features, fix bug, etc. So many times one of our 20,000 tests remind us that are run several times a day. One of these tests remind us, "hey, you look at that, you broke this particular thing." And it really literally happens every day or maybe every week. But very often we can break some code without knowing it, but the test bring you confidence that you can do some huge change in your code, some huge refactoring that are often necessary without breaking the end user feature or even introducing a bug.
So tests are very important. So that’s why at the first technical debt was mostly focused on test and it still is. But then with a tool like NDepend, we added since the the metric is about effort in terms of time, human time or money. You can add whatever you want. You can add complexity, you can add misuse of object-oriented programming, for example, object-oriented complexity. You can you use it in terms of the SOLID principles, okay, which are tightly coupled with object oriented. You can use it in terms of naming or in terms of commenting. WWhatever you you think about, you call how you can improve it. The improvement can be quantified as something in technical debt.
And at the end of the day, typically on a real legacy, that is not so well tested, maybe three quarter or two-third of your amount of technical debt will be about untested code and then you get this remaining amount of technical debt that comes from the thing that could be improved.
Jamie
But because I have the report, I can turn to the project manager or whatever and say, "look, right? This is the code base, right? We need to invest in putting some tests here. This is roughly how much it’s going to cost, how long it’s going to take, how many hours, how many sprint points, how many whatever, t-shirt sizes, whatever," right? I can say to that person, "this is what we need to do before we move forward because this is our legacy codebase. And it needs to to have some some maintenance on it. This is how we can maybe even split it across three or four sprints, right?" It then helps that person to then visualize the amount of work and and plan that, right?
Patrick
So NDepend end also try to evaluate the interest from your code also. You try to understand what, so not only for each issue or each range of issues, it will offer you an estimation of the effort, but also it would try to tell you how much days per year, so in terms of duration per year, you will lose if you don’t fix. As long as you don’t fix it. So combining the two metrics you can get, you can prioritize the fix you need to do.
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
So that’s how we work. We are relentlessly fixing everything we can hear from our huge user base, and so it’s very interesting to polish again, and again, and again. It’s kind of never-ending but .NET is never ending. It’s always progressing. Things are always changing. There is always new trend. So it’s a big passion. It’s really interesting.
Jamie
Patrick
Sponsor Message
Today's episode of The Modern .NET Show is brought to you by RJJ Software: strategic technology consulting for ambitious SMEs.
You know me as the host of this podcast, but here's what you might not know: I'm also a former Microsoft MVP who's helped businesses from Formula 1 teams to funded startups transform technology from a cost center into a competitive advantage. At RJJ Software, we specialize in three things that matter to growing businesses:
- AI that actually delivers ROI: not hype, just practical implementations that pay for themselves
- Developer Experience optimization: we've helped teams achieve 99% faster deployments and 3x productivity gains
- Strategic technology decisions: from architecture reviews to fractional CTO services
The difference? We don't just advise. We ensure successful implementation through knowledge transfer to your team.
If you're an SME leader wondering why your technology investments aren't delivering, or you're facing critical decisions about AI, modernization, or team productivity, let's talk.
Visit rjj-software.co.uk/podcast to book a strategic consultation.
Now, let's back to today's episode...
Jamie
where clauses and stuff." I wonder if you could talk a little bit about that. Because I know that building abstract syntax trees, and things like that, it takes a lot of effort, sort of, that needs to be tested. And how in the heck did you test that? But also like how in the heck does it work?Patrick
And so concerning the language itself, Linq is a language that you know about, I know about, every every .NET developer knows about. So that’s really interesting that we got this language that appeared after NDepend in 2008 and it was very hot at that day, like, "hey you have a query language that looks like SQL at that time. Why don’t you migrate to Linq?" So it took us two years to, unless we have it in Linq. But it was like at that time Linq was coming from nowhere. It was not something expected. And having the ability to to have an abstract query language in C# was really nice because NDepend analyzes C# and also VB .NET code, but mostly C#. So it’s really interesting to be able to query with C# with with C#. So it’s really interesting.
But also you query your code through and that makes it a bit different than Rsolyn analyser. You query your code through an API, a big framework that we provide. So, for example, when you are developing some Roslyn analyser which is a wonderful technology that NDepend can import too. For example, imagine you want to infer the complexity of your code, then you have to write some code like you have to to count the number of
if, the count the number of else to assess the complexity of the loop, etc. And this kind of thing, NDepend offers, you right out of the box, from the language. So typically you can just write FROM method in application method WHERE for example the method complexity is higher than 20 and the method was added since the baseline. Okay, it really looks like that, it’s very fluent. And for example, the method is not enough tested, and the method, for example, has not enough comments, etc. etc.So you can query this kind of thing. And we offer 150 rules by default that are using all this framework, and language and that you can very easily customize. You can fork and you can also create your own. We have also some search panel that is basically a query generator. So you can, instead of writing the query itself, it generates the query behind the back, and then you can try to generate a query that you find interesting. And then there is a button "edit query" and you can you can edit the query and try to refine it to your exact need. So it can be very interesting, for example, if you are developing a UI and a typical UI with database and you don’t want the UI, for example, to access directly the database, okay; you want you want some layer in it, you can very easily say, "that code is my UI, that code is my database, and I don’t want there any connection between this," sort of thing. So when you become proficient by using SQLing you can go one step further in really querying your code, defining some some subset in your code and knowing what you want in terms of interaction or quality or testing or whatever. So that makes it very powerful.
Jamie
Patrick
Also in terms of object-oriented usage, imagine you have an interface to implement it, you need to implement like 15 methods that they become very hard to, typically we want to segregate such interface into smaller interface. Like for example,
IDisposable. I like it to say it as an example because it is disposable. It has only one responsibility, which is disposing this, freeing the resource used by your object, and it has only one method for that. For example, you can you can have a list of disposable, and dispose all the objects with no knowledge if it’s network connection, if it’s UI handle; it can be whatever behind, but you can all dispose them in a shot for example. So that’s a very good interface and that defines well what is this notion of responsibility. So NDepend will help you.So I said a code smell. Now it’s more about objects. Okay, so you have these three it is five solid principles that are very famous in the industry, coined by Uncle Bob. Which by the way was at the heart of the start of NDepend for the story. Uncle Bob. I think it was in 2002 or 2003, he published a book explaining all these principles and at that time I was a consultant in .NET, and I had the idea of writing a tool to try to measure the compliance to all these principles. Okay, so that was the initial goal of NDepend. So object-oriented usage is very very important in terms of low coupling, high cohesion, all these things that can be measured directly from your code. So it’s important to get some numbers, some metrics because instead of talking with your colleague, "yeah, it’s not that bad, it’s okay," no no, you you have bad numbers, so it’s bad, it’s really objective. So it can be it can be interesting.
So it’s narrowly for three, but some are particular like, for example, architecture. Okay, NDepend has some rules that can detect which part of your code are a real mess. And I have to say, usually, it’s a bit cruel if you have a large legacy, with a large project where everything is using everything. So NDepend will spot this kind of thing. It will tell you about the amount of technical debt your repo represents. And it’s typically the same time that you are not using enough the abstraction, like typically interface. So every class of your project are using every other class.
So things, for example, of the class
String okay the everywhere everybody in the world in the .NET world, and even in the Java world, is using the class String. Imagine now you have you you pinpoint a bug in the implementation or you want to change something in the implementation, for example, for more performance. Then it’s very sensitive because everybody is using in every possible way you can imagine of and just changing this feature just a little bit will certainly break a lot of code. And this is what happened in your codebase when you have a lot of code integrated: you have some class that are used by everywhere and often it’s even like in s cycle. Like you have a class using another class, using another class, etc. And just changing it a little can break all the other code. And this is where abstraction shine, specifically the abstraction you you use are interfaces. So an interface, not only it lets you define a single responsibility, also it’s supposed to not change very often. Because you put a lot of effort in designing the interface. Okay? And also the user code doesn’t know about the implementation behind the interface. So if you change the implementation behind the interface, there are much less chance that you’re gonna break the code that using through the interface. Because he didn’t know all the little tricks you could do with your code. He didn’t try to guess what’s behind. Okay? And all those are about object, are about SOLID all the discussion I just have but I think it’s very important to use it correctly.So architecture is about that, is about not having some muddy code, like big big ball of mud they call it in the US. So they try to know about this big ball of mud and help you give you advice to introduce interface. Imagine you have two namespaces using each other, it will tell you, "this one, this direction is not white, this direction is white but not the other one. So you should introduce this interface, etc. etc." with an estimation of the technical debt.
Also you have some all the code coverage fee and all code coverage rule that they are very important, because you can write some smart rules. Like this class was hundred percent covered by test during the baseline and it’s not anymore. And this is a use case that very often happen. Okay, very often because we use it so we know you are touching something in a class, and maybe you didn’t even think about testing it or the tests were not exhaustive; so NDepend can catch this kind of thing.
And it can also catch mixing other dimension like the complexity. Like if you have just a
record DTO object, if it’s not hundred percent covered, it’s okay. Also I would say it’s not that okay, because if testing other classes ddesn’t hundred percent cover all your property maybe there are some property that are not useful. But that’s another bad. Don’t focus on this one because there is basically no code, it’s just a record, so there is no implementation.But NDepend will help you more focus on the complex implementation, also on the edge case that maybe you didn’t bother testing. And here I have an interesting remark that I like to say to client, "like how often here, look at that class, it’s 90% tested, it’s much enough for me. I did my job, the job is done. But you let 10% why didn’t bother writing the test for this 10%?" And then usually you get insight, "yeah, but these one are difficult, those are edge case. Maybe exception or things like that. They are not easy to reproduce." But the thing we see is that the edge code is usually the code where you get the bugs. So you you end up writing some quick test that can cover 90% of your code, but your 10% here is not tested and because it’s not well implemented, and though it’s likely to to contain the bug. So maybe you should refactor your code and make your class testable. There is also some people that say that "testable equals good design." So, typically, if your code is well tested, it’s easy to write a test, then it’s a good sign that it’s well designed.
And also finally there are some other aspects that can be like for example dead code. So like like the other two, like Resharper, for example, code that you can comment or even better discard. You have some security. Like for example, software composition analysis, NDepend can help you with that. It knows about the security problem with the version of the NuGet package that you’re using. So it can tell you that you should migrate to another higher version. It can tell you also that different components it happens very often, different parts of your code, different projects are using for example Log4Net in different versions. And that that can be a problem. So it can normalize the version of the components you are using, and this kind of thing. Or many other in terms of encapsulation, immutability, naming convention, source file organisation, .NET base class library usage, all those kinds of of things.
Jamie
And I was, shall we say I was paid a considerable amount of money, to add pointless tests. And it cost them a lot of money to have me add these tests, right? And then the the other thing that I noticed was that a lot of the tests that were covering the business logic that predated me working on the code. They were tests, they didn’t actually test anything. There were no assertions. It was just, you know, set up: we would do like the arrange assert act, right? I’m sorry, arrange act assert, right? We didn’t have the assert loop, it just arrange and act. Which meant that technically the code base was covered with tests, but the tests didn’t actually test anything.
Patrick
So with the C#
nullable. We can be really from about half of the assertion that where that were about assert that this reference is not null. So the nullable C# feature help a lot in reducing the number of assertions. But everything that you can assert, every range of value for your your integer, your float, your any variable, you can put also some counter that are only used during the the debug side with some pragma. All those that are very important.And I give you an example, it’s about the UI testing. Is a pain in the, uh, for everybody. I don’t know, it’s not my language, so I don’t know how rude is it, so I don’t say it. So it’s a pain for everybody. And if you put tons of associations inside your UI, you always check about state. of your control the state that are displayed in UI, etc. If your code is stuffed with tons of assertions, it really makes sense to write test to instantiate your UI as it was a user, to try to do some action with it. There are some design patterns that can really help you a lot with that. And then even if there is not so much assertion in the test itself All the assertions ins inside the UI will be exercised and and it’s priceless. It’s it can help you a lot.
Jamie
Patrick
So the assertion should be kept really for what if an assertion no matter it’s in your code or in your test fail, it’s a bug. It’s not an environment problem like a network failure, for example. So network failure is good to test failure. So you can write test when, for example, there is no connectivity for your application and it is very good to handle that and to write with that, but it’s not exactly what I wanted. Me, and my concern here it’s really about the bug, it’s really about the code function the way you you want it to function.
Jamie
Patrick
Jamie
Patrick
Jamie
Print. And it takes some message to print, right? I have said to you in my implicit contract that the message to print can never be null, right? But you pass me, instead of passing me a string, you pass me the actual null object right, just you calling print(null) right? Then I put an assertion in there to say that message cannot be null.Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
So typically you have AI that you just integrate some chatGPT code or some Copilot code. This code can be checked by tools like NDepend. So not only you can make sure it complies with the kind of code you have, with the set of rules you want in place. But also it can tell you about some things about the correctness. If it tells really what you want to do. So you can have some warning popping about generated code that you integrated a bit too quickly. Or it can tell you about you integrated some code but you didn’t have the test. So you can also use AI to generate the test, but at the end of the day at a point you have to make sure that the correctness of the code is good, it does exactly what you want. So a tool like NDepend can help you with that.
Concerning the other side: so for that it’s very good for tools that check the code, I think. It’s now more and more code is produced with thanks to AI tool and it’s less and less handcrafted by human and understood by human. So there is the "vibe coding" phenomenon where everybody is kind of mocking it, because it looks like the younger developer: it just works so they integrate it but they don’t try to understand it. So having tools like a safety net to just, by looking, having another automatic eye that look at the code can help you find some issue.
And the other side is integrating AI in the NDepend tooling set. So we’re not yet there. Of course we are thinking a lot about it What we want to avoid, at any price, is to put some AI feature that user don’t want. And just yesterday Microsoft released the first preview of Visual Studio 2026. Which is very exciting. And if you look at comments, of course they they put unusual amount of effort in Copilot, which is the AI tool inside Visual Studio and Visual Studio Code. And we see a lot of Developer grunting, I think "grunting" is a good verb. I’m not sure they’re not happy with it. And I read very carefully on the Reddit sub, etc.
All the comments I think it’s very interesting to to read comments from your peer. And from what I understand, and also by discussing with clients, is that there is a misunderstanding in the industry between the, on one side you get the younger vibecoder, which is it inexperience but that can generate code for what his client is asking him very quickly. So it’s kind of blessing for him. Maybe it can generate an entire web shop in a few minutes instead of one week or two. So it’s very interesting.
So that’s one end of the spectrum, but the other end, which is more like me and you, and user of any of tool like NDepend, and maybe also we say the user of Visual Studio. On the other end of the spectrum you get the enterprise developer that is dealing with a massive legacy. Legacies also can be plural. And for him, the AI help will be totally different. Sometime Copilot is very smart, even on a large code base like NDepend. Sometimes I can see it, "hey, you understood it." But also very often it’s totally not in the point. So it’s a good productivity tool, but I don’t see it replacing the enterprise developer anytime soon because it doesn’t scale on the large code base.
And so I see a lot of people moaning about Visual Studio 2026 having so much so much Copilot. And maybe it’s because that people that are using Visual Studio are maybe the experienced and seasoned developer that are using it for large legacy code and they care more, for example, about performance or about any tool that can facilitate a daily job than the typical Visual Studio Code user that is maybe younger, that is the the the scale of the application is maybe smaller. So for them, that’s the success of Cursor which is the the the fork of a Visual Studio Code which is focused.
So yeah, so I think that there is a spectrum with these two hands. and and all this to say that we are reluctant to just add AI just for the sake of it that the user doesn’t necessarily want. So, for example, we could have AI that instead of writing your code query, you could ask query in a natural language and maybe under the hood a code query could be generated and return the same the same data. So that could be interesting as a query generator, but we are studying it, but we are we are not yet there.
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
We’re running low on time, Patrick. And I feel like could talk all day about the different things that NDepend does, and all of the new features that it has and since we last spoke, and why folks should check it out. But I think maybe the best thing that that they can do is maybe go to the website, look through the documentation, maybe watch a few of the videos and see what it is that it it gives them. So where’s the best place for folks to go?
Patrick
Some just things about the new features: we have a new product is about the web reporting. We really pimp the report so now it should, I hope it will help help you a lot. And also something very interesting is that we are importing the results that you obtain from your Roslyn analyser, and or from the Resharper rule they have a name for that the Resharper code, they have another name, but anyway this is the Resharper rule. So what it means is that you can have a 360-degree view about every kind of issue you can have on your code from Roslyn, from Resharper, and from NDepend, or this in one product. And integrated.
Jamie
So we’ve already said NDepend.com is probably the best place to go to. You can get the trial version there, couple of minutes of work, and you’ve got your first report, right? Is that the best place to learn about it too? Is it like NDepend.com/docs or is it docs.ndepend.com or something like that?
Patrick
So we have like maybe 15 five minutes videos. So no matter what you can be interested in for NDepend, no matter it’s about the architecture, code quality, CI/CD, etc., there is a short video that you can watch. And that will explain the feature, how to use it, and what it can the use case and what it can bring you.
Jamie
So Patrick, what about catching up with what NDepend are working on, what you’re working on, that kind of thing. Are you LinedIn,are you not? I mean, it’s totally fine to not be online these days. That’s not a problem.
Patrick
We have a blog also on ndepend.com, we have a blog that we really try to cover all the .NET subjects, tricky .NET subject, all these the new C# features. Like for example the new extension method that coming. The new .NET feature, like for example, the new .NET 10,
dotnet run C# file, which is pretty cool.If you have question about all this new stuff or also complex stuff like how a weight async really works under the hood, etc. Our goal is to be the best resource for all these tricky side. So we spend a lot of effort in writing a blog post that can teach you something interesting, especially in this world where the world is bloated with AI generated content which is very low quality, and all our content is handcrafted, and it’s designed for learners. But also medium to seasoned developers that really want to learn something the right way. So of course ChatGPT can help you a lot. But if you want to have a human vision on the thing, maybe you can go on the blog.
Okay, so we are also talking about code quality, everything that that the NDepend does. And yeah, and also we have a Twitter, of course, and everything.
Jamie
So again, if you’re listening in, don’t be diving across your dashboard you’re driving to work to try and write all these down. They’ll be in the show notes, folks. And depending on the the app that you’re listening to, you’ll be able to access those show notes after you’ve listened, or just go through to the website: dotnetcore.show and it’s all there.
Patrick, it’s been fantastic catching up with you, and I feel like I could talk to you all day about NDepend and all of the things.
Patrick
Jamie
Patrick
Jamie
Patrick
Jamie
Patrick
Wrapping Up
Thank you for listening to this episode of The Modern .NET Show with me, Jamie Taylor. I’d like to thank this episode’s guest for graciously sharing their time, expertise, and knowledge.
Be sure to check out the show notes for a bunch of Linqs to some of the stuff that we covered, and full transcription of the interview. The show notes, as always, can be found at the podcast's website, and there will be a Linq directly to them in your podcatcher.
And don’t forget to spread the word, leave a rating or review on your podcatcher of choice—head over to dotnetcore.show/review for ways to do that—reach out via our contact page, or join our discord server at dotnetcore.show/discord—all of which are Linqed in the show notes.
But above all, I hope you have a fantastic rest of your day, and I hope that I’ll see you again, next time for more .NET goodness. I will see you again real soon. See you later folks.
Useful Links
- NDepend
- Episode 112 - NDepend with Patrick Smacchia
- CQLinq
- Patrick on LinkedIn
- NDepend on LinkedIn
- Supporting the show:
- Getting in touch:
- Podcast editing services provided by Matthew Bliss
- Music created by Mono Memory Music, licensed to RJJ Software for use in The Modern .NET Show
- Editing and post-production services for this episode were provided by MB Podcast Services