The Cycles of TDD Diagram

The Cycles of TDD by Robert Martin is the most wholistic explanation of TDD I’ve read. It helped me to put the pieces together and understand how TDD can drive a good design process from end-to-end. Here’s an attempt to visualize it.

November 13, 2020 · 1 min

Id Abstractions

I once worked for a company that exposed all of their entities IDs as integers. It’s common practice, but it bit them hard when they needed to adopt an offline-then-merge strategy for client data. This required switching ids to Guids all over the code base and it was an arduous undertaking. I’ve been trying and failing to simply abstract ID types since.

November 7, 2020 · 3 min

Result Types

I want to cleanly represent predictable failure states as part of my function contracts. This lets consumers know right away what scenarios they should expect without documentation or looking through code. F# encourages this pattern and normalizes it with the Result type. Representing the same idea in C#, however, is non-trivial.

October 30, 2020 · 11 min

Type Safety with Multiple Valid Input Types

Sometimes a constructor or function can naturally accept multiple types. The classic solution to this is overloading. The problem is overloading can combinatorially expand for every multi-typed parameter.

October 22, 2020 · 4 min

Functional Composition, Decorator, and Aspect-Oriented Programming

Aspect-Oriented programming has captivated my imagination for years. C#, however, does not support AOP. Even conceptually realizing benefits of the paradigm proved difficult. Then, I experienced functional composition.

October 16, 2020 · 7 min

Service-Orientation and Functional Programming

Service-Oriented Programming is my primary programming paradigm. It divides the software into self-contained “services” or groups of functionality. Services also apply in functional programming, rather, service-like behavior is enforced all the way to the foundational functional concepts.

October 8, 2020 · 4 min

What's Your Duck?

The Pragmatic Programmer tells the now legendary tale of talking with a rubber duck to overcome programming problems. This sounds a bit silly, but programming is a design activity all the way down to the source code implementations. Problems and possibilities often won’t reveal themselves until we try to communicate them. Every programmer needs a duck. So what is yours?

October 2, 2020 · 5 min

Language Limited Thought

Language is strongly related to the kinds of thoughts we have. Language shapes to favor what it’s users most want to describe. This post introduces a series about how I internalized the value of different programming languages. Specifically, my transition to functional-style thinking. I’ll be diving into concrete design problems and how FP trivialized my long-standing struggle with them.

September 24, 2020 · 3 min

Clean Architecture+: Check-in and Benefits

I posted about Synthesizing Project Organization Methods a few months ago. Well… I’ve been busy putting it to practice in my own code, and the results have been been beyond my expectations!

September 17, 2020 · 7 min

Async Task Refactor Case Study

I’ve been unhappy with the async/background work model in my system for a while. The async logic always seems excessively complex, either entangled with business logic or creating opaque coupling between flows. However, my recent breakthrough on code structure suggested a clear path to adding background work in an aspect-oriented style. Let’s examine a refactor that helped me prove decorator-style async communication.

September 11, 2020 · 6 min