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
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
65
Perth Code Dojo 12
burlistic
0
93
Perth Code Dojo 11
burlistic
0
73
Introducing Agile to Enterprise
burlistic
0
83
Perth Code Dojo 6 - Decoupling the UI
burlistic
0
68
Perth Code Dojo 4
burlistic
0
57
Perth Code Dojo 5
burlistic
0
53
Perth Code Dojo 2
burlistic
0
110
Other Decks in Programming
See All in Programming
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
180
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
200
霧の中の代数的エフェクト
funnyycat
1
460
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
130
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
160
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
510
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
430
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
390
AIが無かった頃の素敵な出会いの話
codmoninc
1
360
「人を評価する AI」の設計と実装
ryoyanara
0
120
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
800
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
640
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
KATA
mclloyd
PRO
35
15k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
950
Statistics for Hackers
jakevdp
799
230k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
480
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Prompt Engineering for Job Search
mfonobong
0
390
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
67
56k
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