Nothing is Something
summary
Claim: hidden “nothings” are real objects and naming them removes conditionals. Shows Ruby code (monkey‑patching if_true/if_false monkey patch), builds a working null object to replace nil, and measures complexity drop when swapping conditionals for an injected object. Demonstrates a concrete app: House → RandomHouse → EchoHouse, then refactors to composition with null object pattern and pluggable order and format roles via dependency injection; the refactor runs and eliminates duplicated branches.
AI-written summary · about








