API-DD library
Articles on designing modules as APIs
Practical guides about conversations, guarantees, and boundaries between modules.
2026-08-05
The contrast test for verifying AI-generated code
A Go technique for proving that a test rejects a plausible wrong alternative instead of merely repeating the generated implementation.
Related chapter →2026-08-05
The type that turns a SQL change into an interface change
A Go example of an innocent-looking dependency: returning sql.Rows makes the consumer understand the query and turns internal changes into interface changes.
Related chapter →2026-08-05
The test that prevents a failed Refresh from clearing the cache
A contract test for an easy-to-break guarantee: if the source fails during Refresh, the last valid value must remain available.
Related chapter →