~/talk

In Defense of Ruby Metaprogramming

Talkat RubyConf 2022 · 2022-11-29..12-01· [ruby]
slides:none on file

Argues that Ruby metaprogramming solves organizational complexity: a status system is rebuilt so a single list or an inherited hook plus ActiveSupport.constantize auto-creates creator, predicate, and to_s methods instead of duplicating case branches. Uses define_method, method_missing, instance_eval and send; testing, example tests and comments prove correctness and aid discoverability. Shows the change reduces steps to add a new status and that it works but increases cognitive and tooling costs (harder to search, higher entry bar, less IDE support) so document, test, and teach when adopting it.

AI-written summary · about

  1. 0:00Introduction
  2. 3:30What is metaprogramming
  3. 6:20Ruby community’s shift
  4. 8:27Ruby’s flexibility undervalued
  5. 10:55Complexity beyond computation
  6. 13:20Metaprogramming to reduce duplication
  7. 16:52Metaprogramming cost-benefit
  8. 17:12Convincing skeptics
  9. 20:27Documenting metaprogrammed code
  10. 23:32Summary
~/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.