Category: Code Rules
High level opinions and ruminations code rules and the inherent complexity of coding well.
What is Code Review? – Guidelines and Best Practices
Code review is the process of mandating systematically one or several developers to review the code written by another developer in other to detects defect and to improve it. Code...
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...
Business Complexity vs. Implementation Complexity
It is good software design practice to make sure that methods can be entirely viewed in the code editor that typically shows 30 to 45 lines at a time. The...
Are SOLID principles Cargo Cult?
My last post about SOLID Design: The Single Responsibility Principle (SRP) generated some discussion on reddit. The discussion originated from a remark considering SOLID principles as a Cargo Cult. Taking...
SOLID Design: The Single Responsibility Principle (SRP)
After having covered The Open-Close Principle (OCP) and The Liskov Substitution Principle (LSP) let’s talk about the Single Responsibility Principle (SRP) which is the S in the SOLID acronym. The...
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...
Advanced Code Search : A Case Study
This morning I stumbled on a complex test to write. The need was to create and show a custom Form (written with Windows Form) that relies on the System.ComponentModel.BackgroundWorker to do...
Use NDepend to Measure How SOLID Your Code Is
Not that long ago, we published a post defending the SOLID principles of object-oriented design. In today’s post, we take it a step further: we’re going to present NDepend’s rules that will...
What Makes a Codebase Acquirable?
What makes a codebase acquirable? This is the rare question that affects software developers, managers, and executives in a surprisingly similar way. And that’s saying something since, by and large,...
Checking DDD Ubiquitous Language with NDepend
Since NDepend version 2018.1, the tool proposes a default rule to check Domain Driven Design (DDD) Ubiquitous Language validity. DDD Ubiquitous Language Let’s quote Martin Fowler on Ubiquitous Language: Ubiquitous Language is...
A problem with extension methods
We like extension methods. When named accordingly they can both make the caller code clearer, and isolate static methods from classes on which they operate. But when using extension methods,...
Marker Interface Isn’t a Pattern or a Good Idea
Today, I have the unique opportunity to show you the shortest, easiest code sample of all time. I’m talking about the so-called marker interface. Want to see it? Here you...
Are Code Rules Meant to Be Broken?
If you’ve never seen the movie Footloose, I can’t honestly say I recommend it. If your tastes run similarly to mine, you’ll find it somewhat over the top. A boy...
What Metrics Should the CIO See?
I’ve worked in the programming industry long enough to remember a less refined time. During this time, the CIO (or CFO, since IT used to report to the CFO in...
Alternatives to Lines of Code (LOC)
It amazes me that in 2016, I still hear the occasional story of some software team manager measuring developer productivity by committed lines of code (LOC) per day. In fact,...
How to Get Company Coding Standards Right (and Wrong)
Nothing compares with the first week on a new job or team. You experience an interesting swirl of anticipation, excitement, novelty, nervousness, and probably various other emotions I’m forgetting. What...
How to Get Developers to Adopt Coding Standards
If you’re a manager, there’s a decent chance that the subject of coding standards makes you want to bang your head against a wall repeatedly. If you’re a developer, you...
The Better Code Book – Our MVPs of 2015
We firmly believe spaghetti belongs on the dinner table and not in code. Our mission when starting NDepend was to create a tool to make best coding practices easier to...
With Code Metrics, Trends are King
Here’s a scene that’s familiar to any software developer. You sit down to work with the source code of a new team or project for the first time, pull the...
The Most Important Code Metrics You’ve Never Heard Of
Oh, how I hope you don’t measure developer productivity by lines of code. As Bill Gates once ably put it, “measuring software productivity by lines of code is like measuring progress...
Toward Bug Free Software: Lines of Defense
Hurrah!! Last week we released NDepend v6 RTM. Once again we relied on a 2 months private beta-testing period and a one month Release Candidate period to do our best to release a polished...
NDepend version 6 insights
Welcome to the brand new NDepend blog! This blog will talk about NDepend of course, announcements, directions, features advanced usage, but this blog will also talk about related topics including,...