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
MatteoVaccariBirthdayGreetingsKataInSCBCN2013
Search
trikitrok
September 28, 2013
Programming
180
0
Share
MatteoVaccariBirthdayGreetingsKataInSCBCN2013
Presentation for Matteo Vaccari's Birthday Greetings Refactoring Kata that we did in SCBCN
trikitrok
September 28, 2013
Other Decks in Programming
See All in Programming
JAWS-UG横浜 #100 祝・第100回スペシャルAWS は VPC レスの時代へ
maroon1st
0
180
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
160
Spec-driven Development: How AI Changes Everything (And Nothing)
simas
PRO
0
270
ハーネスエンジニアリングとは?
kinopeee
13
6.2k
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
250
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
150
Vibe NLP for Applied NLP
inesmontani
PRO
0
490
Kubernetes上でAgentを動かすための最新動向と押さえるべき概念まとめ
sotamaki0421
3
670
The Less-Told Story of Socket Timeouts
coe401_
3
630
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
550
煩雑なSkills管理をSoC(関心の分離)により解決する――関心を分離し、プロンプトを部品として育てるためのOSSを作った話 / Solving Complex Skills Management Through SoC (Separation of Concerns)
nrslib
4
1k
年間50登壇、単著出版、雑誌寄稿、Podcast出演、YouTube、CM、カンファレンス主催……全部やってみたので面白さ等を比較してみよう / I’ve tried them all, so let’s compare how interesting they are.
nrslib
4
800
Featured
See All Featured
Balancing Empowerment & Direction
lara
6
1.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
130
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
It's Worth the Effort
3n
188
29k
Raft: Consensus for Rubyists
vanstee
141
7.4k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
820
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
110
A Modern Web Designer's Workflow
chriscoyier
698
190k
Transcript
Birthday Greetings Kata Manuel Rivero @trikitrok
The kata Created by Matteo Vaccari. Alistair Cockburn's:
Ports and Adapters. a. k. a. Hexagonal Architecture Refactoring version.
The initial code Clone it from: https://github.com/trikitrok/BirthdayGreetingsKata SCBCN2013InitialCode
The initial code 1. Read employee records from a file.
2. Filter employees whose birthday is today. 3. Send a personalized greetings message by email.
Problems BirthdayService Has too many responsibilities. Depends
on low level APIs. Talks with external systems. ...
Ports and Adapters
In the ports and adapters architecture Domain Model depends
on nothing Everything depends on the domain model
Ports and Adapters
Benefits Easier to change as requirements change Easier
to test Easier to understand
Ports and Adapters
Ports and Adapters
Ports and Adapters Port Façade (interface) → Adapter
Concrete → implementation
Ports and Adapters
Refactoring technique Small steps! Keep tests green at
all times!
Refactoring approach 1. Identify a responsibility 2. Extract a method
3. Create a new class 4. Move that method to the new class
Refactoring guides Single Responsibility Principle First at function
level, then at class level. Dependency Inversion Principle
None
Let's start!