Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Don't Get Clever
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
avdi
July 20, 2013
1
430
Don't Get Clever
Part of the Ruby Rogues live panel episode at Lone Star Ruby Conference 2013.
avdi
July 20, 2013
Tweet
Share
More Decks by avdi
See All by avdi
Pairing is Caring
avdi
2
530
Code to Joy
avdi
10
1.7k
Building Gems that Don't Suck
avdi
4
590
Making Little Classes out of Big Ones
avdi
29
3.3k
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
36k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
300
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Design in an AI World
tapps
0
140
Color Theory Basics | Prateek | Gurzu
gurzu
0
190
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
92
Marketing to machines
jonoalderson
1
4.6k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
110
Skip the Path - Find Your Career Trail
mkilby
0
53
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Transcript
Don't Get Clever Avdi Grimm
Pop quiz r e q u i r e '
p s t o r e ' s t o r e = P S t o r e . n e w ( ' d a t a . p s t o r e ' ) s t o r e . t r a n s a c t i o n ( t r u e ) d o # . . . e n d
Pop quiz 2 A r r a y . i
n s t a n c e _ m e t h o d s ( f a l s e )
Symbols are truthy r e q u i r e
' p s t o r e ' s t o r e = P S t o r e . n e w ( ' d a t a . p s t o r e ' ) s t o r e . t r a n s a c t i o n ( : r e a d _ o n l y ) d o # . . . e n d
Clever!
What's : r e a d _ o n l
y ?? s t o r e . t r a n s a c t i o n ( : r e a d _ o n l y ) d o # . . . e n d
Dead end s t o r e . t r
a n s a c t i o n ( : c h u n k y _ b a c o n ) d o # . . . e n d
Negation A r r a y . i n s
t a n c e _ m e t h o d s ( ! : i n c l u d e _ s u p e r )
Don't get clever
Intention-revealing argument r e a d _ o n l
y = t r u e s t o r e . t r a n s a c t i o n ( r e a d _ o n l y ) d o # . . . e n d
Intention-revealing argument i n c l u d e _
s u p e r = f a l s e A r r a y . i n s t a n c e _ m e t h o d s ( i n c l u d e _ s u p e r )
Inline version A r r a y . i n
s t a n c e _ m e t h o d s ( i n c l u d e _ s u p e r = f a l s e )
Don't get clever