All Articles

Action-Oriented C#

Five years ago I hit a plateau. My code hit a certain level of quality and flexibility and stopped improving. Here’s how I used aspects of functional programming to keep climbing. My code was pretty SOLID, but there was still a lot of very similar code, despite actively trying to […]

Facades should not have Working Plumbing

In this short article we discuss the role of facades in application architecture and some common problems and solutions. A facade is a user-facing entry point holding many internal components Like fake buildings on a movie set, facades in software are a nice exterior representation of something complex. In terms […]

Safer Code with C# 8 Non-Null Reference Types

Null reference exceptions are one of the most frequent errors encountered in .NET applications. As powerful as the framework is, it’s built around a core assumption that reference types can point to null, so any code that works with a reference type needs to either know already that the object is […]

How your brain wants to wreck your code

We suck at testing our own code. We suck so badly at it that it has led to entire professions like as Quality Assurance analysts and test engineers. Why is that? How do you take some of the smartest people out there and find some of the most glaring omissions and defects?

Annotating Nulls in C#

In my prior post I talked about using functional programming null handling features. While this is a valid approach, it is also one that requires a lot of code changes to achieve. If you don’t want to make that drastic of a level of changes, there are a few other […]

Understanding SQL Server Deadlocks

This is a continuation of a series of articles I’ve written on SQL Server concepts. When you work with SQL Server long enough on a database with enough traffic, you’re eventually going to encounter deadlocks. This article discusses what deadlocks are, how to interpret deadlock graphs, and some options for […]

SQL Server Locking

This is a continuation of my prior article on SQL Server database concurrency. Every request to read from, modify, or even insert or delete data must first acquire a lock on a database object. That object could be anything from the entire database to a table to a range of […]

Public Speaking for Introverts

I’m not an extrovert. I don’t like crowds. I’d rather be the trusted adviser than the guy in the spotlight. In high school, speech class gave me such anxiety that I was physically sick and needed to give the presentation over my lunch hour directly to the teacher. So, how […]

SQL Server Transactions and Isolation Levels

As developers, we don’t always think too deeply about the database internals and that can result in poor performance and unexpected concurrency issues. This article represents my learning progress in diving into SQL Server’s concurrency features. In this article we’ll discuss transactions and isolation levels / read modes. By default, […]