Blog on GitHub Pages

Validation Made Functional With Vavr And Language Ext

User input is unpredictable. Every programmer knows that data should not be stored without being validated beforehand. While there are many ways of going about validation, some are more practical than others. Many have encountered (or used) “torrential exceptions”: public static DogName of(string name){ if(name.isEmpty()) throw new IllegalArgumentException ("name cannot...

Dependency Injection And Dependency Inversion

This post will go in depth into the concept of dependency injection and dependency inversion in the context of C#. It will also include concepts that are tangentially related to dependency injection, including the Inversion of Control principle and coupling. These ideas and principles also apply to other object-oriented programming...

Value Types And Reference Types In C Sharp

In C#, variables can be categorized into two types - value types and reference types. The differences concern how a variable stores and accesses its data. This post will examine these differences as well as their implications for each type’s behavior. This is by no means an exhaustive explanation, but...