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
110
0
Share
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
130
Gobot.io y el internet de las cosas
solojavier
0
120
Deliberate Practice - Lightning Talk
solojavier
0
160
Golang - WePow Talks
solojavier
0
71
Server Provisioning and Configuration
solojavier
0
74
Evolución Robótica
solojavier
0
60
Re-evolución robótica
solojavier
0
110
Artoo : Ruby on robots
solojavier
0
130
Las pruebas primero
solojavier
0
79
Other Decks in Programming
See All in Programming
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
1k
3Dシーンの圧縮
fadis
1
390
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
330
AI 時代のソフトウェア設計の学び方
masuda220
PRO
28
10k
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
210
TSKaigi 2026 TypeScriptバックエンドのオブザーバビリティ戦略 — Datadog × NestJSの実践
taiseiyamamotoan
1
200
色即是空、空即是色、データサイエンス
kamoneggi
1
200
CSC307 Lecture 17
javiergs
PRO
0
240
柔軟なPDFレイアウトエディタを支える型システム設計 — Discriminated UnionとConditional Typeの実践
minako__ph
4
800
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.1k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
160
今さら聞けないCancellationToken
htkym
0
200
Featured
See All Featured
A Soul's Torment
seathinner
6
2.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Writing Fast Ruby
sferik
630
63k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
310
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Being A Developer After 40
akosma
91
590k
Faster Mobile Websites
deanohume
310
31k
Side Projects
sachag
455
43k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
200
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
420
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
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