Deterministic Core, Non-Deterministic Shell
Summary
The article revisits the Functional Core, Imperative Shell pattern, reframing it as Deterministic Core, Non-Deterministic Shell. It argues that keeping business logic deterministic improves testability, and suggests approaches such as isolating non-deterministic IO behind the shell and using state machines to model deterministic behavior. It also offers practical guidance for refactoring legacy code to increase determinism, including the concept of defragmenting determinism and finding deterministic cores within existing code.