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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
150
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
68
Re-evolución robótica
solojavier
0
120
Artoo : Ruby on robots
solojavier
0
150
Las pruebas primero
solojavier
0
87
Other Decks in Programming
See All in Programming
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
370
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
異なる設計思想のフレームワークを経験して得た学び
amekuhideki
1
220
My Marp Sample
sinoue0108
0
110
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
540
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
460
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
240
Cloudflare is Agents
chimame
0
180
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
100
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
510
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
290
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Designing for humans not robots
tammielis
254
26k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
260
How to Ace a Technical Interview
jacobian
281
24k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Statistics for Hackers
jakevdp
799
230k
Designing Experiences People Love
moore
143
24k
GitHub's CSS Performance
jonrohan
1033
470k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
470
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
640
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
520
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
480
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