Living with Spec
summary
Project instruments 15k LOC with Clojure spec to get validation, generative tests and structured error data; concrete results include automatic test generation that uncovers 3 production bugs (numerical instability), concise destructuring via conformers/data macros, and a system for inferring and auto‑building materialized views from spec graphs. Notes limitations: awkward generators for structured sequences and very generic higher‑order functions, single global explanation hook for errors, but overall reduces late‑stack failures and simplifies ETL/schema tooling.
AI-written summary · about
chapters (10)
- 0:00Intro
- 3:10The code base
- 5:21Validation
- 9:00Friendlier error messages
- 11:47Destructuring
- 16:52The system paradigm
- 18:34Data macros
- 24:42Generative testing
- 28:49Queryable data descriptions
- 31:29Case study autogenerating materialised views
related talks
43mspec loves data structures
40mAgility & Robustness: Clojure spec
38mAbove and beyond type systems with clojure.spec
40mRunning With Scissors: Live Coding With Data
47mSpecs2, from starters to dessert and... a look in the kitchen.
25mUsing spec to Transparently Replace a Legacy System
31mTesting Made Simple
17mTesting Specifications In Dafny
