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
Duck Typing
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Javier Cervantes
May 30, 2014
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Duck Typing
Based on chapter #5 of POODR.
Given at rubygdl.org.
Javier Cervantes
May 30, 2014
More Decks by Javier Cervantes
See All by Javier Cervantes
Continuous Delivery para todos @ SGNext
solojavier
0
140
Gobot.io y el internet de las cosas
solojavier
0
120
Deliberate Practice - Lightning Talk
solojavier
0
170
Golang - WePow Talks
solojavier
0
72
Server Provisioning and Configuration
solojavier
0
77
Evolución Robótica
solojavier
0
66
Re-evolución robótica
solojavier
0
120
Artoo : Ruby on robots
solojavier
0
140
Las pruebas primero
solojavier
0
83
Other Decks in Programming
See All in Programming
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
300
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
730
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
React本体のコードリーディング
high_g_engineer
1
120
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
130
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
Foundation Models frameworkで画像分析
ryodeveloper
1
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
490
Google Apps Script で Ruby を動かす
kawahara
0
120
【SRE NEXT 2026 Lunch Session】一人目専任SREの立ち上げを加速する ― AIと進めたオンボーディングで2分を0.04秒にした話
pkshadeck
PRO
0
3.3k
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
290
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
3.4k
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
270
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
920
Ethics towards AI in product and experience design
skipperchong
2
330
How GitHub (no longer) Works
holman
316
150k
Designing for humans not robots
tammielis
254
26k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Darren the Foodie - Storyboard
khoart
PRO
3
3.5k
Tell your own story through comics
letsgokoyo
1
1k
Discover your Explorer Soul
emna__ayadi
2
1.2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Transcript
Duck Typing @ruby_gdl << @solojavier # Based on chapter 5
of book poodr.com
What is Duck Typing "If an object quacks like a
duck and walks like a duck, then it's a duck" Technique that help us reduce cost of change Public interfaces not tied to any specific class Duck typed objects are chameleons that are defined more by their behaviour than by their class
Learning by example
None
None
requirements.change!
None
None
code_design.add(:duck_typing)
None
None
None
Summary Duck typing detaches public interfaces from classes It creates
virtual types defined by behaviour Depending on this abstractions increases flexibility This will make your application easier to change