~/talk

Just when you thought you couldn’t refactor any more…

Talkat RubyConf 2017 · 2017-11-15..11-17· [ruby]
name:Claudio B
github:clabortoli
slides:none on file

A real refactor: starts from brittle starts_with checks and iterates to a working YouTube URL parser that returns type plus ID or name. Shows concrete tools: String#match?, MatchData#named_captures, Regexp#===, Enumerable#find and Enumerator.new, and explains why patterns repeat and how named captures plus find+break remove duplication. Builds successive versions, culminating in a compact enumerator-based parser that is correct, complete and demonstrably executable.

AI-written summary · about

  1. 0:00Introduction
  2. 0:44Format
  3. 4:49Start with
  4. 7:08StringMatch
  5. 9:36TripleEqual Operator
  6. 11:53Regular Expressions Capture
  7. 14:32Named Captures
  8. 18:11enumerable
  9. 21:31Break
  10. 26:09numerator new
  11. 29:52outro
~/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.