.NET
What’s the Result Type Everyone Is Using in .NET? (via Nick Chapsas)
- It’s a response type that has a success result and a failure result. (I’ve worked with something many years ago called RequestResponse that bundles up the same information.
- The type is a struct and uses some public static implicit operator stuff so it looks like a discriminated union when you read the code.
- The LanguageExt NuGet package has a Result<T> type. If there’s a validation error, create (but don’t throw) an exception, then return a new result with the exception instance as a parameter. (Use this in the service or repository layer.)
- At the controller/API layer, use result.Match<IActionResult>(happyPath, sadPath).
Management
Thriving in Chaos (via SWLW)
- Embrace change by being flexible
- Bridge the gap with effective communication
- Build strong stakeholder relationships
- Make quality decisions through critical thinking