~/talk

Making Impossible States Impossible

Talkat Elm Conf 2016 · on Thursday, 2016-09-15· [typescript, frontend-architecture]
slides:none on file

Shows concrete techniques in Elm to make invalid UI states unrepresentable: handling CSS at-rules (the @charset rule must be first) by avoiding lists of interchangeable declarations, replacing validation-and-sort with a typed model so invalid sheets simply won’t compile; modeling surveys with paired records, a non-empty list (first+others), and a zip list (previous/current/remaining) so current is always valid; and keeping a stable API via a single-constructor union that makes internal upgrades nonbreaking. Results: far fewer tests, compile-time errors instead of runtime mystery bugs, and simpler runtime logic.

AI-written summary · about

  1. 0:00Introduction and setup
  2. 1:17Elm CSS and invalid states
  3. 5:07Validating and sorting CSS rules
  4. 6:12Making invalid states impossible
  5. 8:58Survey app example
  6. 11:04Coupling prompts and responses
  7. 13:08Ensuring at least one question
  8. 14:30Zip list for navigation
  9. 15:53Upgrade experience without breaking changes
  10. 19:45Hiding implementation details
  11. 21:29Status bar with undo functionality
  12. 23:38Key considerations and summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.