Working with collections of custom types in xUnit always felt clumsy. To pass such a set of data, you had either create a property or a whole class. No matter which options you choose, it's a lot of boilerplate. What a pleasant surprise was how less ...
Many functional techniques are proving their ground in C# codebases. One of my favorites is the Result type. The most basic form consists of a boolean flag indicating success and an array of errors. But in many cases, tuples are just enough. I fall ...
Recently I've learned that you have no control over tasks after initialization. Awaiting a job is just a way to synchronize and get a response. That naturally brings a question. How to split asynchronous calls into batches? A case from the trenches L...
After typing git status you can see files in three states: added to the index not added to the index not tracked at all It's likely to have the same file added and not added to the index. How is that possible? Let me introduce partial file stagin...
In my mind, the F# code was almost braceless. I enjoyed reading it because it felt so natural.Recently, I wrote a bit of F# code. And guess what? There were way too many braces for my taste.Take a look at this code: let extractNumbers (numbers: Input...
Naming is hard. Well described test suites are even harder. I've seen a lot of tests that goes like this: [MemberData(nameof(Data))] public void EmailValidator_Should_Validate_Correctly( string data, bool expected) { var emailValidator = new Em...