Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
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
480
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Don't Get Clever
Part of the Ruby Rogues live panel episode at Lone Star Ruby Conference 2013.
avdi
July 20, 2013
More Decks by avdi
See All by avdi
Pairing is Caring
avdi
2
580
Code to Joy
avdi
10
1.8k
Building Gems that Don't Suck
avdi
4
640
Making Little Classes out of Big Ones
avdi
29
3.4k
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
340
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Un-Boring Meetings
codingconduct
0
420
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
240
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
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