~/talk

Refactoring from Good to Great

Talkat RubyConf 2012 · 2012-11-01..11-03· [developer-experience]
slides:none on file

Lots of live coding that keeps the specs green while refactorings happen: extracting temp vars into query methods, moving date logic from collection into an Order#placed_between and a new DateRange (then switching to Range.cover for a tiny perf win), replacing nil checks with a NullObject contact (deleting about ten lines), and isolating payment logic into a PaymentGateway adapter so gateway swaps and tests are easy. Uses quick vim macros, RSpec runs, small incremental steps and recommends books like Clean Code and Working Effectively with Legacy Code.

AI-written summary · about

  1. 0:00Start
  2. 3:25pulling out 10 variables into query methods
  3. 28:13charge for a subscription
  4. 30:36create a payment gateway object
~/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.