~/talk

Stupid Ruby Tricks

Talkat Ruby on Ales 2015 · 2015-03-05..03-06· [ruby]
slides:none on file

Shows concrete Ruby tricks: use file.read/file.write instead of manual open blocks, drop optional parentheses but split overloaded lines, and use Hash.new with a block to create default_proc recursive hashes (including swapping the default proc at runtime). Demonstrates prepend vs include and guarding with defined?(super), embeds data after __END for in-file IO, and uses PStore/YAMLStore transactional flat-file DB examples — all snippets run and behave as described.

AI-written summary · about

  1. 0:00Introduction
  2. 1:32Why this talk is called stupid
  3. 9:39File reading and writing tricks
  4. 11:04Optional parentheses
  5. 13:11Default hash values
  6. 19:29Including, prepend, and super
  7. 23:29Conference t-shirts
  8. 25:12Embedded data with __END__
  9. 26:40PStore simple database
  10. 30:29Closing
~/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.