notes from a passionate developer




This is a personal blog. The opinions expressed here represent my own and not those of my employer, nor current or previous. All content is published "as is", without warranty of any kind and I don't take any responsibility and can't be liable for any claims, damages or other liabilities that might be caused by the content.


UTF-8 BOM adventures in C#

Time for a quick look at UTF-8 encoding and byte order marker (BOM). Lets jump right into some code. You are probably going to nail this as you most likely will be alert now, given the title and all, but would you have expected this test to pass? [Fact] public void Utf8Strings() { var initial =…

Daniel Wertheim Daniel Wertheim

Exceptions vs the Result type in F#

Lets assume we are designing a type that defines some lower and upper bounds. To keep this post simple, we define one rule: "You shall not be able to create an instance of it, with a lower bound exceeding the upper bound." Records & factory functions For this post we are OK with the…

Daniel Wertheim Daniel Wertheim