All Articles

Derailing gracefully with Railway Oriented Programming

28 Aug 2023
Railway oriented programming is a great way to compose multiple functions that can each fail for a different reason. Here we're going to explore some techniques on how to model the Error state.
When learning F#, at some point you'll come across the concept of Railway Oriented Programming (ROP). It's primarily a technique used for error handling and helps alleviate some of the struggles of using only exceptions. The main advantage is that possible error cases are encoded in the type system, which requires you to explicitly handle the possible errors instead of encountering an unexpected exception at runtime. Scott Wlaschin has a great post introducing the concept and use cases of ROP. This is a great read if you're unfamiliar with this style of programming.

User Defined Function in SQLite

17 Nov 2018
Extending SQLite with a User Defined Function to workaround SQLite's ASCII limitation when it comes to comparing diacritics.
I ran into an interesting problem recently. The task was to search for something within a SQLite database by comparing strings. Generally very easy to do in just SQL using the UPPER function: