Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Readability - Rogues Panel - dbrady LSRC 2013

Code Readability - Rogues Panel - dbrady LSRC 2013

As part of the Ruby Rogues panel at LoneStar RubyConf 2013, I used my three minutes of podium time to just beg people to write code other people can read.

David Brady

July 20, 2013
Tweet

Other Decks in Programming

Transcript

  1. def sell_sandwich(sandwich, bread, mayo, vending_machine) unless sandwich.has? :bread ... end

    unless sandwich.has? :mayo ... end unless vending_machine.include? sandwich ... end end
  2. class User has_and_belongs_to_many :groups end # contacts you can send

    messages to: user.groups.map(&:users).flatten.uniq