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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
William Webster
October 02, 2014
Programming
0
89
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
49
Perth Code Dojo 12
burlistic
0
80
Perth Code Dojo 11
burlistic
0
61
Introducing Agile to Enterprise
burlistic
0
71
Perth Code Dojo 6 - Decoupling the UI
burlistic
0
61
Perth Code Dojo 4
burlistic
0
45
Perth Code Dojo 5
burlistic
0
44
Perth Code Dojo 2
burlistic
0
99
Other Decks in Programming
See All in Programming
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
Fluid Templating in TYPO3 14
s2b
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
160
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
CSC307 Lecture 09
javiergs
PRO
1
830
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.4k
Fragmented Architectures
denyspoltorak
0
150
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
150
プロダクトオーナーから見たSOC2 _SOC2ゆるミートアップ#2
kekekenta
0
200
Oxlintはいいぞ
yug1224
5
1.3k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
48
Test your architecture with Archunit
thirion
1
2.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Technical Leadership for Architectural Decision Making
baasie
1
240
The Language of Interfaces
destraynor
162
26k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
640
Balancing Empowerment & Direction
lara
5
880
Making the Leap to Tech Lead
cromwellryan
135
9.7k
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