Dev Corner

Diving deep into the code to solve your challenges and offer up expert tips
  • Category

  • Author

Writing deterministic tests in a variable world

Writing deterministic tests in a variable world

This post was written for the C# Advent Calendar. Follow them to receive the gift of coding insights, twice per day in December! We want our code to be easy to use and test. When dealing with things that change, like the current time or randomized numbers, static...

What makes .NET 6 a critical upgrade for developers?

What makes .NET 6 a critical upgrade for developers?

Heads up! .NET 6 (and ASP.NET 6, by extension) is set to be released at the 2021 .NET Conf, between November 9 and 11. If you’re thinking “wasn’t .NET 5 just released” or “I just started with .NET 3.1,” well, you’re not wrong—.NET 5 was released on November 10, 2020,...

Domain-Driven Refactoring: Encapsulating data

Domain-Driven Refactoring: Encapsulating data

In the last post, we looked at using a few common refactorings to encapsulate operations and push behavior down into our domain model. While this works to encapsulate operations, we haven't yet encapsulated our data. Take a look at the current Offer...

Domain-Driven Refactoring: Extracting domain services

Domain-Driven Refactoring: Extracting domain services

In my last post, we looked at the Compose Method refactoring as a means of breaking up long methods into smaller ones, each with an equivalent level of granularity. This is the refactoring in my applications I tend to use the most, mainly because it's the simplest way...

Domain-driven refactoring: Procedural beginnings

Domain-driven refactoring: Procedural beginnings

Posts in this series: Intro Procedural Beginnings As part of the red-green-refactor TDD process, the second step of making the test pass means we write the simplest (but still correct) code that can possibly work that flips our test from red to green. For me, this...

Local development with Azure Service Bus

Local development with Azure Service Bus

For teams new to Azure Service Bus, one of the first questions you have to answer is "how do I develop against this?" And it turns out the answer isn't that straightforward - because it's currently impossible to run Azure Service Bus outside of Azure. There's no...

A lap around ActivitySource and ActivityListener in .NET 5

A lap around ActivitySource and ActivityListener in .NET 5

Part of the new DiagnosticSource API are new ways of "listening" in to activities with the addition of the ActivitySource and ActivityListener APIs. These are intended to replace the DiagnosticSource and DiagnosticListener APIs. However, the latter two types aren't...

End-to-end distributed tracing with Zipkin

End-to-end distributed tracing with Zipkin

Diagnosing errors in production systems can be a challenge. Diagnosing errors in distributed systems can quickly become a nightmare. With a single application, a developer can introduce logs to capture exception messages and stack traces, even publish to central...

How to run native WSL2 Docker containers

How to run native WSL2 Docker containers

TL;DR: Together, Docker Desktop and Windows Subsystem for Linux 2 provide a great experience for developing with Linux containers on Windows with a fast, efficient, and lightweight virtual machine. Docker Desktop uses WSL2 enhancements for faster boot times and...

Behold, BlazorMirror! Your Raspberry Pi Magic Mirror guide

Behold, BlazorMirror! Your Raspberry Pi Magic Mirror guide

It’s C# Advent time and I’ve been looking for a project to explore the .NET fringe. After at least five minutes of deliberation, I decided it would be a great idea to try to concoct a Raspberry Pi Magic Mirror guide, by building a Magic Mirror using Blazor Web...