~/talk

Booleans are Easy - True or False?

Talkat RailsConf 2018 · 2018-04-17..04-19· [developer-experience]
slides:none on file

Argues that simple booleans hide real costs, demonstrates multiple anti‑patterns and concrete fixes: replaces ambiguous boolean flags with named parameters or separate methods (offers a methods replacement), swaps Boolean state bags for a single state or ActiveRecord enum, and prefers a deleted timestamp over a deleted boolean. Shows a Rails bug caused by boolean overload, notes exponential blowup (2^N cases → 8 for 3 flags), uses a small tool (Vertus) to inspect models and builds slides with Remark.

AI-written summary · about

  1. 0:00Introduction
  2. 1:40Booleans in Ruby
  3. 9:17Kinesins
  4. 14:33Booleans
  5. 14:46Making Impossible States
  6. 18:18Boolean Fields
  7. 19:23Exponential Complexity
  8. 20:24Boolean Operations
  9. 20:53Truth Table
  10. 22:21Conjunction
  11. 23:47Disjunction
  12. 24:50Boolean Operators
  13. 25:20predicate methods
  14. 25:51transformations
  15. 26:26Morgans Law
  16. 27:22Ifthenelse
  17. 29:05Extract Methods
  18. 29:58The Point
  19. 30:30The Bigger Point
  20. 30:48Thanks
  21. 31:05F5 sponsorship
~/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.