Best of The C# Advent of Code 🎄
The Advent of Code is an annual event starting on December 1st and ending on December 25th, where developers solve coding puzzles.
In recent years, we have had a few similar initiatives, such as the C# Advent Calendar, which focused on creating content daily, such as publishing a blog post every day in December.
I will share a few valuable posts in this week’s newsletter that have helped me learn new things this past week.
​DI-Cluttering Your Code - John Waters​
This article shows a typical situation where DI gets out of hand, and many disjointed dependencies find themselves within the same big API controller implementation.
John does a good job showing alternatives, such as using MinimalAPIs, Clean Architecture, Primary Constructors (C# 12), and MediatR.
It’s not an approach I have used myself, but it’s interesting to see his approach using “Modules”.
​Building a Digital Dungeon Master with Semantic Kernel, C#, and Azure - Matt Eland​
I’m a massive fan of Matt Eland. However, this particular post is so far from what I usually develop that it’s definitely an interesting read.
The blog post discusses semantic kernels in AI language models, mainly how they can be applied to streamline the gameplay of Dungeons & Dragons (D&D).
By employing structured knowledge and natural language understanding, semantic kernels help automate game tasks, such as managing narrative elements or resolving player actions, enhancing the Dungeon Master’s efficiency.
​LINQing Up Christmas: .NET 9 Features in Action - Sarah Dutkiewicz​
Sarah shows practical examples of the newly added LINQ methods in .NET 9.
With Index, CountBy, and AggregateBy, we get three new LINQ methods with .NET 9 that help in certain situations and considerably reduce the code complexity of previous solutions.
​How to self-host Plausible Analytics - Flavio Copes​
This article is a bit older, but it helped me migrate my website analytics from Google Analytics to Plausible.
It’s been my goal for a long time, and now I have finally made the move. I will probably write about it myself or record a video. Mainly because I think Plausible is a great alternative to Google Analytics and because the blog post isn’t up to date here and there.
In a dynamic world such as software development, your content is outdated as soon as you hit publish.