Programming Protips

Small posts meant to document the solutions to problems I've encountered while writing code and deploying apps.

An Async Task Result computation in F#

Computation expressions in F# are a wonderful way to avoid spaghetti code, but trying to write a computation workflow that's compatible with .NET's async Task type can be daunting.

Building a CLI arguments parser with TypeScript

I've been building a Discord bot in my spare time, and came to the realization that most commands given to a Discord bot could really benefit from being treated like CLI arguments. I couldn't find a great argument parser that did everything I wanted, so I ended up building my own.

Handling schema or data type changes in TypeScript

Sometimes your data types, schemas or shapes will change. It happens, you design your app one way and inevitably down the road you need to make changes, whether it's adding a property, removing a property, changing a type or anything in between. It's something that happens to every app, and by taking advantage of TypeScript's type system you can make handling such changes a breeze.