[C#] Remove diacritics (accents) from a string

Removing diacritics from a string is a common task that doesn’t have a built-in method in the .NET framework. Luckily, it’s really easy to write an extension method which will do the trick. Here is how it’s done.

Unicode and UTF - What you need to know

What is Unicode?

Calculate the best text colour for a given background

At one point or another you may find yourself in the situation of having to display text on a background whose colour is chosen by the user of your application. Should this happen to you, one of the first problems that will come to mind is how to ensure that the text always remains readable. Well, there is an easy way to do this. With a little math, you can simply go about calculating the relative brightness of the chosen colour and subsequently determine whether white or black text will provide optimum contrast. Sound easy? It is! Let’s look at how it’s done.

WordPress to GitHub Pages with minimal headache

About a month and a half ago I migrated this blog from an Azure-hosted WordPress setup to GitHub Pages, which runs on Jekyll. While I wouldn’t describe the migration process as painful, I wish I would have had a guide such as this one when I began the transition as it would have certainly saved me a few headaches along the way. Hopefully this will be able to help someone in the same place that I was!