The State of Representing State
summary
Argument centers on concrete fixes not platitudes: boolean flags cause boolean blindness so code converts blind booleans into domain-specific sum types that preserve provenance; a real Android video player lives behind an autoplay experiment (12 iterations) that returned booleans and became unmaintainable; nullable misuse later triggers crashes in recycler view video cells so states become explicit loaded/not_loaded unions; strings become wrapped in bounded types like Endpoint to prevent infinite invalid states and move errors to compile time.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:29True or False
- 3:43Boolean blindness
- 6:09Problem 1 Blind values
- 12:56Problem 2 Strings are Danger
- 15:59Problem 3 Strings are unbounded
- 20:04Problem 4 Illogical Data Structures
- 27:36Problem 5 Crashes
related talks
43mRepresenting State: the Kotlin Edition
42mThe Mutable State Monster and How to Defeat It
27mPut it All in State
52mState management beyond the libraries
40mCoding Complex App Logic, Visually
25mMaking Impossible States Impossible
01h 00mDesign Idioms from an Alternate Universe
32mThere and Back Again: Grokking State and Data
