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
110
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
71
Server Provisioning and Configuration
solojavier
0
76
Evolución Robótica
solojavier
0
63
Re-evolución robótica
solojavier
0
110
Artoo : Ruby on robots
solojavier
0
130
Las pruebas primero
solojavier
0
81
Other Decks in Programming
See All in Programming
RTSPクライアントを自作してみた話
simotin13
0
600
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
180
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
510
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
7
4.4k
Inside Stream API
skrb
1
710
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
net-httpのHTTP/2対応について
naruse
0
480
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
220
「なぜそう決めたのか」を残し続ける仕組み ― Notion AI カスタムエージェント × Slack連携による設計判断の自動記録 - NIKKEI Tech Talk #47
niftycorp
PRO
0
170
Featured
See All Featured
Ethics towards AI in product and experience design
skipperchong
2
310
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
First, design no harm
axbom
PRO
2
1.2k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
330
Building Adaptive Systems
keathley
44
3.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
210
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
GraphQLとの向き合い方2022年版
quramy
50
15k
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