~/talk

Thinking in Objects

Talkat RubyConf 2012 · 2012-11-01..11-03· [ruby]
slides:none on file

Argues Ruby programs work best when they treat values as objects with identity, behavior and state, using encapsulation and polymorphism rather than sprawling hashes or deep inheritance. Shows ActiveRecord validation patterns, recommends composition via forwardable over long subclass chains, and demonstrates collapsing three-level nested conditionals into simple polymorphic messages by adding aliases to a Variant class. Emphasizes thinking in terms of sending messages, notes method binding via UnboundMethod#bind.call exists but is discouraged.

AI-written summary · about

  1. 0:00Introduction
  2. 1:47Defining Object-Oriented
  3. 3:24The Role of Messages
  4. 5:35OOP in Ruby
  5. 7:57Identity and Behavior
  6. 11:00Unique Objects and State
  7. 13:10Encapsulation
  8. 16:14Polymorphism
  9. 17:10Object-Based Languages
  10. 18:34Inheritance vs Composition
  11. 22:58Practical Message Sending
  12. 25:43Reification and Design
  13. 29:41Refactoring Example
  14. 33:04Conclusion
~/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.