Patterns and Practices
Published 21 Nov 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. I have found that staying "complexity conscious" has helped guide my decision making and avoids an over reliance on rules and bureaucracy.
Published 18 Nov 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 15 Oct 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 30 Sept 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 12 Jun 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 21 Apr 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?