~/talk

Overcoming Our Obsession with Stringly-Typed Ruby

Talkat RubyConf 2014 · 2014-11-17..11-19· [ruby]
slides:none on file

Argues that replacing ubiquitous strings with explicit data types prevents bugs: zip codes are five digits (about 100000 possibilities) so a ZipCode class that validates on construction stops invalid values from leaking. Shows Ruby techniques that work: SimpleDelegator wrappers, the to_str protocol, and ActiveRecord serialize to convert DB strings into objects. Builds a DB wrapper and ZipCode class that validate and convert, and demonstrates they prevent bad ZIPs from propagating.

AI-written summary · about

  1. 0:00Start
  2. 7:18MUST BE A PROBLEM READING INPUT!
  3. 9:08THIS IS NOT HOW TO BUILD A MAINTAINABLE SYSTEM
  4. 10:18WHAT'S COMING AND WHAT'S GOING
  5. 12:34DATA TYPES
  6. 21:41SHOULD WE?
  7. 31:14ACTIVE RECORD
  8. 34:45ENUMERATED TYPES State/Province, Status Codes, Error Codes
~/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.