Patterns and Practices
Published Nov 21, 2020
Understanding the difference in meaning between complex and complicated puts you in the right mindset to succeed in your development practice. The difference is significant, and failure to understand it is at the heart of many unsuccessful projects. Getting clear on the nature of complexity will help guide decision making and avoid an over reliance on rule making and bureaucracy.
Published Nov 18, 2020
The use of GraphQL in Gatsby brings many advantages, but it can lead to duplication of query fields across pages and templates. This is a quick guide on a pattern for using fragments inside your React components to avoid duplication.
Published Oct 15, 2020
Jimmy Bogard, author of those stalwart NuGet packages Automapper and MediatR, recently blogged about an upcoming change that he championed in the behaviour of the .NET Core Dependency Injection container. The change related to constrained open generics, a pattern that I had not even considered, which opens up some interesting possibilities.
Published Sep 30, 2020
Keeping code DRY is a good thing, but doing so with clever abstractions can result in complexity that reduces clarity, making the code harder to maintain. I think there is a Goldilocks zone for abstraction, just enough to avoid code duplication, but not so much as to create overly complex code that is hard to understand and reason about.
Published Jun 12, 2020
I came across an interesting pattern for using Tuples in an article by Mads Torgersen on C# 9.0. At first I thought it must be something new in 9.0, but a little digging and actually engaging my brain made me realise it has been possible since C# 7.0 and the introduction of Tuples. It isn't something I've seen anybody else use so I thought it would be worth writing about.
Published Apr 21, 2015
I have been struggling for some time to find an application architecture for ASP.NET MVC that both respects SOLID principles and is also quick and simple to use. Is the command query pattern the answer?