Normalizing Boolean Expressions for Programmatic Inspection

Programmers often arrange boolean expressions in all kinds of groupings for readability. The semantic of these groups, however, is not readily apparent to programs and algorithms. It turns out we can have it both ways, boolean expressions can be algorithmically normalized to consistent depth and form.

August 12, 2022 · 6 min

Is Clojure Spec a dependant type system?

I recently learned of dependent type systems. I’m trying to feel out the boundaries of dependent types and came to the question: Is Clojure Spec a dependent type system?

August 5, 2022 · 2 min

Pitfalls of Spec-based Random Testing

I’ve been thinking about constrained values, and how those constraints could be used to better test our systems. Mark Seemann was gracious to think through this with me and point out some interesting conclusions.

August 1, 2022 · 4 min

Proof-Oriented Programming

I’ve been exploring ways to leverage type-driven development and value constraints for better testing. Turns out this has already been done, and there is a whole category of proof-oriented programming languages.

July 22, 2022 · 2 min

C# Records Compare Private Members

Turns out private members of C# records affect value-based equality.

July 15, 2022 · 1 min

Constrained Types without Exceptions

Representing constrained values with types greatly reduces defensive programming. However, constraints make some values invalid, and constructors don’t allow for flexible return types like a failure state. Here’s an approach to constructing constrained values without relying on exceptions.

July 8, 2022 · 3 min

Dependency Inversion > Dependency Injection

Dependency Injection has gained popularity in recent years. This is good, but Dependency Injection does not enjoy the full benefit of Dependency Inversion perscribed the the SOLID principles. This post will clarify the difference and some of the addition power enjoyed by Dependency Inversion.

July 3, 2022 · 7 min

Misconception: Constructor Injection Exposes Dependency Chains

I’ve struggled with explaining Service Locator as an anti-pattern. I’ve addressed certain cons of service locator and pros of constructor injection. However, I think I overlooked a fundamental misconception that would reasonably push developers away from constructor injection: a belief that constructor injection exposes dependency chains across the system.

June 24, 2022 · 4 min

What's your Duck: Conclusion

This series is about design process and organizing our thoughts for effective development. The main goal is to establish a mental model and intuition for effective design process. This post reviews what we’ve learned.

June 16, 2022 · 2 min

What's your Duck: Stage-specifc questions

This series is about design process and organizing our thoughts for effective development. The main goal is to establish a mental model and intuition for effective design process. This post explores questions to clarify thoughts in specific software lifecycle stages.

June 16, 2022 · 4 min