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
66
Perth Code Dojo 12
burlistic
0
95
Perth Code Dojo 11
burlistic
0
76
Introducing Agile to Enterprise
burlistic
0
84
Perth Code Dojo 6 - Decoupling the UI
burlistic
0
69
Perth Code Dojo 4
burlistic
0
58
Perth Code Dojo 5
burlistic
0
55
Perth Code Dojo 2
burlistic
0
110
Other Decks in Programming
See All in Programming
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
2
1k
VibeCodingからAgenticWorkflowへ
starfish719
0
820
How I Won Prize Money at a Hackathon Using Codex and Symphony Alpha
yasei_no_otoko
0
120
Cloudflare is Agents
chimame
0
180
源内ハンズオン概要編
hideg
0
210
Go 1.27からのGODEBUG / Go 1.27 リリースパーティ #go127party
mazrean
0
190
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
300
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
220
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
160
メールのエイリアス機能を履き違えない
isshinfunada
0
250
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
600
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
エンジニアに許された特別な時間の終わり
watany
108
250k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Writing Fast Ruby
sferik
630
63k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
440
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
250
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
630
How to Think Like a Performance Engineer
csswizardry
28
2.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