~/talk

Representing State: the Kotlin Edition

Talkat KotlinConf 2018 · 2018-10-03..10-05· [frontend-architecture, kotlin]
slides:none on file

Concrete takeaways for Kotlin: avoid bare booleans by encoding intent (the talk coins boolean blindness), replace ad hoc flags with sealed classes and data classes so states are bounded and testable, and lift freeform values like Strings or Ints into enums/value classes to lift unbounded types into bounded types. Use interfaces or explicit state types to capture computed facts (memoize work like “autoplay eligible”), model loaded/not-loaded with exclusive access to data, and prefer compile-time constraints over mutable, nullable, lateinit assumptions.

AI-written summary · about

  1. 0:00Start
  2. 7:33Boolean Blindness
  3. 14:41Expressive types have other advantages!
  4. 18:00When you break data up use expressive types to capture that break in a place that can be used again.
  5. 20:12Strings are danger.
  6. 27:13What does this look like?
  7. 34:11Why do we care?
  8. 34:42You cannot make assumptions about how they will use your code.
  9. 39:53Sealed Classes Everywhere!
  10. 41:27Strings shouldn't be used.
  11. 41:52Have an impervious review system?
  12. 42:16Writing code where mistakes are catastrophic?
~/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.