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
avdi
July 20, 2013
460
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
560
Code to Joy
avdi
10
1.8k
Building Gems that Don't Suck
avdi
4
620
Making Little Classes out of Big Ones
avdi
29
3.4k
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
270
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
950
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
RailsConf 2023
tenderlove
30
1.5k
The Pragmatic Product Professional
lauravandoore
37
7.3k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
1.7k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
66
55k
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