Recent Posts

Advent of Code 2021, days 6 to 10

Continuing our Advent of Code adventure from last time. Let's see what the next batch of puzzles has in store. Day 6 Simulating the life cycles of lanternfish... My implementation for part 1 was naive: I just keep a list of fish, and update/extend the list at every step: def simulate(days: int) -> int: with open('input.txt', 'r') as f_input: fish = list(map(lambda x: int(x), ... read full post

Advent of Code 2021, days 1 to 5

I figured I'd write about my coding adventures in the Advent of Code this year, and see how far I'll make it this time. In case you're not familiar, it's an advent calendar containing a daily coding puzzle, starting from December 1st and continuing until the 25th. The puzzles tend to get more difficult over time, so I might not solve every single day. I'll also be solving them in Python (version 3.10), because ... read full post

Decoding the Dutch domestic CoronaCheck QR code

This is a follow up to my previous post, Decoding the EU Digital Covid Certificate QR code. In that post, I looked at the contents of the EU's international digital Covid QR code. In this post, I'll be doing the same for the Dutch domestic CoronaCheck QR code. The Dutch CoronaCheck certificate, contained within a QR code, is designed by the Dutch government, and serves essentially the same purpose as the EU's DCC, namely to allow people to ... read full post

Decoding the EU Digital Covid Certificate QR code

Unless you've been living under a rock for the last couple of months, you're probably aware that governments all over the world have been looking into digital Covid certificates as a way of facilitating freedom of movement and travel for anyone who can prove that they don't have the cooties. The EU's solution is the so-called Digital Covid Certificate (DCC). It is, as the name implies, a personal digital certificate that proves someone has either been vaccinated against ... read full post

Let's build another gaming PC

Exactly 5 years ago (to the day) I built a gaming PC. That PC has been my faithful gaming rig ever since. I've never upgraded even a single part, because it never seemed necessary. It could always run whatever I threw at it. But when upgrading finally did start to seem necessary, so much time had passed that it almost seemed like a waste to sink more money into such an old machine. I would have to upgrade so much stuff (e.g. upgrading the processor to a recent ... read full post

Juan.

Imagine the following. Up on the twelfth floor, the rain gently pitter-patters against the windows of your apartment. In the distance across the dark sky, a thunderstorm is brewing. It's late. Too late. You should have been in bed already. You sigh as you force yourself up and off the couch. Then, just as you turn off the lights in your living room, a bright flash of lightning illuminates the sky and it is in that ... read full post

One .NET to rule them all

So .NET 5 was released earlier this week. This is the next .NET Core release after 3.1, and drops the "core" part from its name to signify that this is the singular .NET implementation going forward. Microsoft continues the tradition of total confusion when naming things. We move from .NET Core 3.1 to .NET 5, which is not a continuation of .NET 4.8 (also known as the Full Framework and now in support-only) but represents the future of .NET nonetheless and is the only ... read full post

Hello World

The evolution of software development, as illustrated by Hello World. Hello World (beginner) namespace HelloWorldApp { using System; class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } } Hello World (student) namespace HelloWorldApp { using System; class Program ... read full post

A pure T-SQL replace-all function using PATINDEX

Although SQL Server is a powerful and fully-featured database engine, one of the things it has always lacked is support for regular expressions. This isn't a super big deal, because you don't (or at least shouldn't) need regexes in your database all that often, and if you do need them you can always write a trivial C# extension for it thanks to the SQL CLR. Or, well, at least you can if you're running SQL Server on prem. In Azure, it's another story. In the ... read full post

A template for Dependency Injection and Configuration in .NET Core console apps

One of the nice things about working with ASP.NET Core is that dependency injection (DI) and configuration is wired up right out of the box. Working with console apps, you don't have this luxury. However, it turns out it's very easy to set this up yourself. In this post, I'll set up a minimal template for using DI and appsettings.json configuration from a .NET Core console app. I'll be using .NET Core 3.1, which is the current latest LTS version. The first thing ... read full post