~/talk

Write Small Things

Talkat LA RubyConf 2014 · 2014-02-06..02-08· [ruby, design-collaboration]
slides:none on file

Builds a real Ruby command-line option library from zero to working tests and shows the refactor steps that get it maintainable: starts with an instance_eval DSL over ARGV, adds string/integer/boolean/array options, extracts behavior with extract method and extract class, replaces a case switch by constantizing types to remove hard dependencies, and injects abstractions so option objects handle parsing and validation. Specs drive changes; examples end green and the library handles values, validation, and delegation without tangled dependencies.

AI-written summary · about

  1. 0:00Introduction
  2. 1:31Small clean code matters
  3. 2:32Small code as design
  4. 4:18Dependency management challenge
  5. 5:21Tools for small code
  6. 6:23Rules for small methods
  7. 9:18Command line option library
  8. 14:04Refactoring to remove duplication
  9. 16:37Handling new requirements
  10. 18:30Extracting polymorphic behavior
  11. 19:55Small classes with single responsibility
  12. 21:21Extracting StringOptions class
  13. 23:06Creating parent Option class
  14. 23:48Breaking dependencies with DI
  15. 25:37Separating abstractions from implementations
  16. 27:44Adding array options support
  17. 28:06Conclusion & Q&A
~/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.