Async, CancellationToken, and IProgress in 5 Short Examples

Async code isn’t always intuitive, but practicing helps. Let’s take a look at Async, CancellationToken, and IProgress, in a few short examples.

October 7, 2024

Using TimeProvider and FakeTimeProvider in WinForms

Testing .NET code involving time has always been a pain, but the TimeProvider class (backported to the .NET Framework) gives us awesome new tools.

February 5, 2024

SSRS won't show the updated default value for a parameter

Changed the default value for a report parameter, but it’s not actually updating in SSRS? That’s by design. Let’s find a way around it.

January 31, 2024

How to use (and test) TimeProvider timers in .NET

Testing timers in C# is difficult, but .NET 8 (C# 12) adds an abstract TimeProvider class that makes it easier. Let’s take a closer look.

January 11, 2024

How to use TimeProvider and FakeTimeProvider (time abstraction in .NET)

Testing time in C# is difficult, but .NET 8 (C# 12) adds an abstract TimeProvider class that makes it easier. Let’s take a closer look.

January 7, 2024

Similar endpoints, swagger pages, and a DevOps fail

After an unexpected debugging session, some thoughts on APIs, similar endpoints, swagger, and an ugly DevOps fail.

December 12, 2023

Diligence, laziness.. or both?

Funny how a little due diligence mixes so well with a healthy interest in avoiding unnecessary future work.

December 4, 2023

A swirly mass of shared code

I heard a story recently, where a team was asked, after spending months adding a set of features to a codebase, to remove a specific feature from very early on in the project, right before the release date. Other features had been built around it and on top of it. Without necessarily even intending too, the devs that came after that code was written would’ve had to understand it in order to add to it. I don’t know what the outcome was, but that’s not an easy ask. ...

November 14, 2023

If/else vs switch/case pattern matching

A look at if/else, switch/case, pattern matching, other options … and which is best. (spoiler: none ;) )

November 3, 2023

What are list patterns in C#?

C# has been getting a lot of pattern matching love in recent years, like with list patterns in C# 11. The problem is knowing where and how to use it.

August 31, 2023