-
G. #LaRubyConf Points of Interest
Presenter — Steven Baker
Death to Bundler
“I hate Bundler… I use Isolate… You should use Bundler…”
“Bundler sucks ass and you all should use it!”
S.O.L.I.D.
Single Responsibility
A class should have a single responsibility.
Open-Closed
Open an object, write it and it’s closed. Don’t touch it again.
Liskov Substitution
Subtype objects should be replaceable by it’s parent.
Interface Segregation
One interface per object.
Dependency Inversion
Higher-level components depend directly upon lower-level components to achieve some task.
Law of Demeanor
“You can talk to your friends, but not your friends friends.”
account.owner.profile.first_name # => Bad!
Anti IF Campaign
Random Quotes
“I don’t know why people in the Ruby community are scared of classes. You work in an Object-Oriented language and you’re scared of objects.”
“I hate Bundler, but I use it. I hate RVM and don’t use it.”
“Case statements are not allowed, it violates OCP.” (Open-Closed Programming)
“For me, in Ruby, six lines [of code per method] is about the absolute max. If there’s more then six lines I start to have heart palpitations.”
“I try not to use ‘if’ statements. When I do they’re post conditional and never more then two per method.”
“…’{ … }’ if you’re doing something with the return value, ‘do … end’ if not…”
“Allen Kay says it’s not OO if you have getters and setters. It’s hard to argue with him because he invented it.” … “It interacts with data.” … “It violates encapsulation.”
-
-
f2h1gg posted this
-