Stupid Ruby Tricks
summary
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
chapters (10)
- 0:00Introduction
- 1:32Why this talk is called stupid
- 9:39File reading and writing tricks
- 11:04Optional parentheses
- 13:11Default hash values
- 19:29Including, prepend, and super
- 23:29Conference t-shirts
- 25:12Embedded data with __END__
- 26:40PStore simple database
- 30:29Closing








