~/talk

Small Code

slides:none on file

A 31-line command‑line options class with one bulky value method and duplicated argv parsing gets refactored into small option classes (boolean, string, integer, later array) using extract method and extract class plus move method and dependency inversion. The top-level class ends with two public methods, valid and value, no conditionals, and tests moved from the monolith to per-option specs; adding a new type needs only a new option class and a red→green spec to make it work.

AI-written summary · about

  1. 0:00Introduction
  2. 1:44Defining small code
  3. 9:07Command line parser example
  4. 13:21Good method principles
  5. 18:58Handling integers
  6. 22:06Small cohesive classes
  7. 25:39Dependency inversion
  8. 28:53Extracting option classes
  9. 30:37Final refactored class
  10. 32:45Testing new options
~/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.