Ardalis (Steve Smith) speaking at Techorama 2024
Ardalis (Steve Smith)

Software Architect • Microsoft MVP • Clean Code Advocate

MVP Architect Author Speaker Trainer
Work With Me →

Helping other software professionals to keep improving!

Recent Blog Posts

Why a Free Market Fire Department System Beats the Archaic Public Model

Why a Free Market Fire Department System Beats the Archaic Public Model

By a devoted advocate for individual choice


Introduction: Fire Protection, Reimagined 🚒

In a nation that prizes personal responsibility, it’s time to ask whether a single, taxpayer-funded fire department model still serves us best. A market of competing fire protection providers would let every household choose the coverage, response times, and perks that match their unique risk profile and budget. What’s more, it would allow individuals and households to prioritize how they want to spend their money, rather than leaving it up to big government and its known inefficiencies. Let the invisible hand of the market sort out which fire departments offer the best value for their rates, and which properties people find worth protecting with fire extinguishing services.

Read More →
Single File Test Suites in Dotnet Csharp

Single File Test Suites in Dotnet Csharp

This article is part of the 2025 Advent of C# Code Calendar, which publishes 2 C# articles every day in December leading up to 25 December.

NOTE: Originally targeted xUnit v2; now updated to xUnit.v3.

Introduction

One of my favorite new features in .NET 10 is C# file-based apps (or file-based C# programs if you prefer). With this feature, we can create individual .cs files and then run them using dotnet run <file.cs>. On Unix OSes you can go even further and mark the files as executable and include a shebang (#!) directive as the first line to tell the OS what to run it with and then you can run the files directly without even calling dotnet run.

Read More →
Use cd - in Powershell 7 to Return to Previous Directory

Use cd - in Powershell 7 to Return to Previous Directory

Introduction

A command that many shells have had forever and that PowerShell has had for a long time as well is ‘cd -’ which means “change directory to previous folder”. This means you could do something like this:

1
2
3
4
5
6
> cd c:\dev
c:\dev
> cd c:\temp
c:\temp
> cd -
c:\dev

This is quite handy in many situations. In particular, since I’ve modified my PowerShell Profile to NOT start in my users folder but instead to start in my c:\dev folder (from which I can easily get to any repo I may be working from), I very often find myself using cd - whenever I create a new terminal in the folder I want to be in such as when using VS Code.

Read More →
How to Update .NET on Wsl or Ubuntu

How to Update .NET on Wsl or Ubuntu

Ever year or so, a new version of .NET ships, and I need to upgrade the .NET SDK version on my machines. Not just the Windows machines, but also the WSL Ubuntu bits that live on those same machines.

First, determine what version of dotnet you already have using this:

1
2
dotnet --version
> 10.0.100-rc.1.25451.107

Yep, I need to update that. But how? Surely there must be a simple way to do it using just the command line. If you just do a quick search for how to do this, you’ll find instructions like this:

Read More →
Ardalis Fall 2025 Speaking Tour Review

Ardalis Fall 2025 Speaking Tour Review

The last two years, I’ve had the good fortune to be invited to the Netherlands for TechoramaNL, and I’ve been able to bring my wife and business partner Michelle and our twin boys along as well. It’s been fun and educational for all of us, so this year when there were opportunities to submit talks in Portugal that butted up against TechoramaNL on the calendar, we decided to go ahead and submit. Amazingly, my submissions were accepted to not one but two different Portugal events, and so the trip went from one week to three. And along the way, I also said yes to my good friends at DevIntersection who wanted me to present there (the week before we were to leave for Europe, in Florida). And when JetBrains asked if I could present at their DotNetDays event literally on the same day I was presenting in Florida for DevIntersection, I said “Why not?” and added that to the schedule as well.

Read More →