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
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
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Navigating Weather and Climate Data
rabernat
0
220
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
320
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
430
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