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
Perth Code Dojo 3
Search
William Webster
October 02, 2014
Programming
0
82
Perth Code Dojo 3
Inheritance vs composition
William Webster
October 02, 2014
Tweet
Share
More Decks by William Webster
See All by William Webster
Building_Highly_Engaged_Teams.pdf
burlistic
0
110
Quantum Encryption - Advances In Data Security
burlistic
0
44
Perth Code Dojo 12
burlistic
0
77
Perth Code Dojo 11
burlistic
0
55
Introducing Agile to Enterprise
burlistic
0
67
Perth Code Dojo 6 - Decoupling the UI
burlistic
0
54
Perth Code Dojo 4
burlistic
0
41
Perth Code Dojo 5
burlistic
0
40
Perth Code Dojo 2
burlistic
0
93
Other Decks in Programming
See All in Programming
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
100
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
380
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
140
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
170
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
150
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.3k
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
690
オニオンアーキテクチャを使って、 Unityと.NETでコードを共有する
soi013
0
360
HTML/CSS超絶浅い説明
yuki0329
0
190
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
8
3.9k
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
410
Featured
See All Featured
A designer walks into a library…
pauljervisheath
205
24k
Making the Leap to Tech Lead
cromwellryan
133
9k
Being A Developer After 40
akosma
89
590k
Building Adaptive Systems
keathley
38
2.3k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
What's in a price? How to price your products and services
michaelherold
244
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
How to Ace a Technical Interview
jacobian
276
23k
The Language of Interfaces
destraynor
155
24k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Transcript
Perth Code Dojo 3 @willwebst #CodeDojo
Check-In ➔ Your name ➔ What you do (at work)
➔ A random fact about yourself
Code Dojo Format A Coding Dojo is a coding session
centered around a programming challenge. The dojo provides a safe place to learn and experiment away from the pressures of business delivery. All programmers of varying skill levels meet as equals to learn and share.
Software Craftsmanship We were all rookies once Sharing of experiences
Key concepts, new audience
Dojo Rules ➔ Paired Programming ➔ Simple Design ➔ Test
Driven Development ➔ Refactoring
XP Practices ➔ Paired Programming ◆ A better design ◆
Collective code ownership ◆ Improved quality / less defects ◆ High standards ◆ Focus / A pair is harder to distract
Pomodoro ➔ Pomodoro Technique ◆ 25 mins on, 5 mins
off ◆ http://tomatoi.st/perthcodedojo ➔ Four iterations
Retro & Pizza Closing with Pizza and a mini retrospective
➔ Share solutions on the big screen ➔ Discuss challenge / approach ➔ Feedback on the dojo
Polite Notice Please respect each others commitment. During a Pomodoro.
➔ No Facebook ➔ Mobile phones ➔ Etc.
Have Fun! Most importantly have fun! ➔ Drinks are available
- help yourselves
Virtual garden!
Objective Composition and Inheritance What’s the difference? When to use?
Objective Inheritance for: ◦ versioning / commonality ◦ keeping state
◦ not forcing implementation - can stick with base
Objective Composition for: ◦ Applied to many disparate objects ◦
Has-a concept ◦ Polymorphism Liskov substitution principle ◦ Breaking changes
Create a basic garden Dimensions (50 metres x 10 metres)
Soil type = clay Last watered Positional (X / Y) 1 x trees 2 x flowers
Begin! 25 mins
Stop! 5 mins
Extend Add a Mulch method Once called will mulch all
applicable items
Begin! 25 mins
Stop! 5 mins
Second garden type Japanese Garden Dimensions (80 metres x 20
metres) Soil type = silt Positional (X / Y) 1 x ornate bridge 2 x trees
Begin! 25 mins
Stop! 5 mins
Third garden type Modern Low Maintenance Dimensions (20 metres x
12 metres) Soil type = na Area covered 1 x Artificial Lawn
Begin! 25 mins
Stop! 5 mins
Mini Retro How would you refactor to improve the design?
Discuss when to apply inheritance for re-use? Any real examples where you have felt inheritance pain?
Bring a friend
Thank you sponsors! Code - http://github.com/burlistic Slides - http://speakerdeck.com/burlistic @willwebst