Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Perth Code Dojo 3
Search
William Webster
October 02, 2014
Programming
98
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Perth Code Dojo 3
Inheritance vs composition
William Webster
October 02, 2014
More Decks by William Webster
See All by William Webster
Building_Highly_Engaged_Teams.pdf
burlistic
0
120
Quantum Encryption - Advances In Data Security
burlistic
0
67
Perth Code Dojo 12
burlistic
0
97
Perth Code Dojo 11
burlistic
0
78
Introducing Agile to Enterprise
burlistic
0
84
Perth Code Dojo 6 - Decoupling the UI
burlistic
0
69
Perth Code Dojo 4
burlistic
0
64
Perth Code Dojo 5
burlistic
0
56
Perth Code Dojo 2
burlistic
0
110
Other Decks in Programming
See All in Programming
No More NoSuchMethodError
exoego
1
110
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
180
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
330
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
190
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
300
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
最近”作らせてる” ローカルAIアプリの話
akit37
0
490
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
1.8k
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
120
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
Docker and Python
trallard
47
4.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
The Curious Case for Waylosing
cassininazir
1
570
Why Our Code Smells
bkeepers
PRO
340
58k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
610
The Curse of the Amulet
leimatthew05
3
16k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
Balancing Empowerment & Direction
lara
6
1.3k
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