.NET, Redis

Building a high performing last viewed list using Redis

We live in a day and age in which we can choose a data-store that matches the characteristics of our apps and (micro) services. Lately we’ve been looking into Redis as a high performing store for last viewed items. In this blog I’ll look show how to create a POC with the redis-cli and then implement it using .NET Core. We’ll be using the sorted set structure.


Dictionary-style settings as IOptions

I love how we can use appsettings.json files to configure applications in the .NET Core platform. The JSON-format feels a lot less bloated than the old XML appSettings config I used to work with. In this blog I’ll explore how to load a dictionary-style settings class as an IOption. This can be very useful when working with dependency injection.


Sorting a Dictionary on a List of Keys

I can almost hear you thinking: “What super-weird problem are you trying to solve!?” Well… it is kind of an abstract one! Imagine you have a dictionary of objects and a separate list of keys in a certain order. Now suppose you want an ordered dictionary based on the list of keys.


.NET Core MVC: regex routing with named groups

One of the big advantages of the .Net regular expression implementation is named groups.  Today I want to show how to leverage named regular expression groups to build a routing constraint that will map each group value to a named route value.


Linq: round-robin ordering based on segments

Linq is a wonderful way to work with lists in C#. This article focuses on how you can create a round robin ordering for segments of your list. It will distribute items of each segment evenly over the list.


Part 2: Calculations with Roman Numerals using C#

In a previous article I wrote how to parse Roman Numerals in C#. This article will focus on how to calculate with the class in an intuitive way. It will show how to implement implicit casting and the add and subtraction operator overloads. Fun stuff that’s probably useful in other projects.


Part 1: Parsing Roman Numerals using C#

Lately I’ve become fascinated with the Latin language. I’m working on a project that converts photographs of Latin inscriptions on medieval statues into translated text. One of the challenges is parsing years, usually expressed in the form of Roman Numerals.

After building a parser class I noticed that it had a lot of nice characteristics: parsing, operator overloading, implicit conversions. A nice way to play around with C#.

WordPress Theme built by Shufflehound. ©2010-2019 by Kees C. Bakker, all code is licensed under MIT.