~/talk

Let's Play Ruby Golf

Talkat RedDotRubyConf 2016 · 2016-06-23..06-24· [ruby]
links:none on file
slides:none on file

Demonstrates concrete Ruby shortcuts uncovered by playing code golf: using predefined argv globals like $ variables, the question-mark literal for single chars, splat and multiplication as a join trick, square-bracket substring checks as an include* replacement, unary operators for precedence, and String#bytes. Applies them to a Caesar cipher, shrinking an implementation from 248 to 64 characters (a 74.2% reduction, nearly the 75% goal), learns heavy regex use and documents sources like Anarchy Golf.

AI-written summary · about

  1. 0:00Introduction
  2. 2:27What is Ruby golf?
  3. 3:22Code comparison: clean vs golf
  4. 6:19Ruby golf techniques
  5. 12:51Refactoring a cipher
  6. 16:44Conclusion and 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.