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
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
310
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
Hive Metastoreを通して学ぶIceberg REST Catalog ― 仕様から実装まで
okumin
0
220
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
170
2026年のソフトウェア開発を考える(2026/05版) / Software Engineering Scrum Fest Niigata 2026 Edition
twada
PRO
24
14k
サークル参加から学ぶ、小さな事業の回し方
yuzneri
0
210
権限チェックの一貫性を型で守る TypeScript による多層防御
mnch
3
290
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
1
130
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
1
640
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
460
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
200
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
270
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Java REST API Framework Comparison - PWX 2021
mraible
34
9.3k
So, you think you're a good person
axbom
PRO
2
2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.1k
How GitHub (no longer) Works
holman
316
150k
Six Lessons from altMBA
skipperchong
29
4.2k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Thoughts on Productivity
jonyablonski
76
5.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
How to Think Like a Performance Engineer
csswizardry
28
2.6k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
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!