SlideShare a Scribd company logo
1 of 13
Download to read offline
Brutal Refactoring
Game
www.mozaicworks.com
Me
Adi Bolboaca: Programmer, Trainer, Coach
www.mozaicworks.com
Today
Take a simple problem
Use pair-programming
Language agnostic
Write code
Add functionality only when the code is
clean
Refactor often
Refactor a lot
www.mozaicworks.com
Code smell
A code smell is a hint that shows 
you might have a problem in your 
system. ' 
www.mozaicworks.com
Code smell
Sniffable
Easy to spot
Does not always indicate a problem
www.mozaicworks.com
Refactoring
Changing a software system 
without changing the behavior of 
the code and improving its 
internal structure
www.mozaicworks.com
Refactoring
Is NOT:
Re-engineering
Re-design
Re-writing
www.mozaicworks.com
Problem
Tic-Tac-Toe
Board 3x3
X plays first
0 plays second
Result: winner or draw
www.mozaicworks.com
Coding smells
1) Lack of tests
2) Name not from domain
3) Name not expressing intent
4) Unnecessary if
5) Unnecessary else
6) Duplication of constant
7) Method does more than
one thing
8) Primitive obsession
9) Feature envy
10) Method too long (> 6 lines)
11) Too many parameters (> 3)
12) Test – not unitary
13) Test – setup too complex
14) Test – unclear Act
15) Test - more than one assert
16) Test – no assert
17) Test – too many paths
www.mozaicworks.com
Contact me
Unit testing workshop
Remote pair-programming
TDD workshop
Refactoring workshop
Legacy code workshop
Legacy code retreat
Code retreat
@adibolb
www.mozaicworks.com
Brutal Refactoring Game
http://www.mozaicworks.com
adrian.bolboaca@mozaicworks.com
@adibolb
Extend your mentoring & training
capacity
Accelerate learning through
communities of practice
Grow your functional leaders and top
talents
www.mozaicworks.com
Read more
http://blog.adrianbolboaca.ro/2013/04/the-
history-of-brutal-refactoring-game
www.mozaicworks.com
Brutal Refactoring Game
Q&A,
Beer
& More...
www.mozaicworks.com

More Related Content

More from Adi Bolboaca

Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Adi Bolboaca
 
Stop Task Switching
Stop Task SwitchingStop Task Switching
Stop Task SwitchingAdi Bolboaca
 
Evolutionary Design: Take Only One Decision at a Time
Evolutionary Design: Take Only One Decision at a TimeEvolutionary Design: Take Only One Decision at a Time
Evolutionary Design: Take Only One Decision at a TimeAdi Bolboaca
 
Evolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring HeuristicsEvolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring HeuristicsAdi Bolboaca
 
Behind Agile Practices
Behind Agile PracticesBehind Agile Practices
Behind Agile PracticesAdi Bolboaca
 
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015Adi Bolboaca
 
Coderetreat @AgileFinland Turku 2014 11 15
 Coderetreat @AgileFinland Turku 2014 11 15 Coderetreat @AgileFinland Turku 2014 11 15
Coderetreat @AgileFinland Turku 2014 11 15Adi Bolboaca
 
Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Adi Bolboaca
 
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Adi Bolboaca
 
Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Refactoring Dojo @AgileWorks Bucharest 21 May 2014Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Refactoring Dojo @AgileWorks Bucharest 21 May 2014Adi Bolboaca
 
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15Adi Bolboaca
 
TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24Adi Bolboaca
 
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013Adi Bolboaca
 
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21Adi Bolboaca
 
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13Adi Bolboaca
 
Code retreat @AgileWorks Bucharest 7 September 2013
Code retreat @AgileWorks Bucharest 7 September 2013Code retreat @AgileWorks Bucharest 7 September 2013
Code retreat @AgileWorks Bucharest 7 September 2013Adi Bolboaca
 
Coderetreat @AgileWorks Bucharest 2012 07 06
Coderetreat @AgileWorks Bucharest 2012 07 06 Coderetreat @AgileWorks Bucharest 2012 07 06
Coderetreat @AgileWorks Bucharest 2012 07 06 Adi Bolboaca
 
Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16Adi Bolboaca
 
Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27Adi Bolboaca
 
Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20 Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20 Adi Bolboaca
 

More from Adi Bolboaca (20)

Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018Evolutionary Design - NewCrafts Paris 18 May 2018
Evolutionary Design - NewCrafts Paris 18 May 2018
 
Stop Task Switching
Stop Task SwitchingStop Task Switching
Stop Task Switching
 
Evolutionary Design: Take Only One Decision at a Time
Evolutionary Design: Take Only One Decision at a TimeEvolutionary Design: Take Only One Decision at a Time
Evolutionary Design: Take Only One Decision at a Time
 
Evolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring HeuristicsEvolutionary Design - Refactoring Heuristics
Evolutionary Design - Refactoring Heuristics
 
Behind Agile Practices
Behind Agile PracticesBehind Agile Practices
Behind Agile Practices
 
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
Architecture for Disaster Resistant Systems @I TAKE Unconference 29 05 2015
 
Coderetreat @AgileFinland Turku 2014 11 15
 Coderetreat @AgileFinland Turku 2014 11 15 Coderetreat @AgileFinland Turku 2014 11 15
Coderetreat @AgileFinland Turku 2014 11 15
 
Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13
 
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12
 
Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Refactoring Dojo @AgileWorks Bucharest 21 May 2014Refactoring Dojo @AgileWorks Bucharest 21 May 2014
Refactoring Dojo @AgileWorks Bucharest 21 May 2014
 
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
Sherlock Holmes and Pairing @Romanian Testing Conference 2014 05 15
 
TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24TDD Mini Workshop @ Bucharest JUG 2014 04 24
TDD Mini Workshop @ Bucharest JUG 2014 04 24
 
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
Coderetreat Slides on the Global Day of Coderetreat, Bucharest, December 2013
 
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
Sherlock Holmes and Pairing @Bucharest JUG 2013 11 21
 
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
Sherlock Holmes and Pairing @Wlidcard Conference 2013 09 13
 
Code retreat @AgileWorks Bucharest 7 September 2013
Code retreat @AgileWorks Bucharest 7 September 2013Code retreat @AgileWorks Bucharest 7 September 2013
Code retreat @AgileWorks Bucharest 7 September 2013
 
Coderetreat @AgileWorks Bucharest 2012 07 06
Coderetreat @AgileWorks Bucharest 2012 07 06 Coderetreat @AgileWorks Bucharest 2012 07 06
Coderetreat @AgileWorks Bucharest 2012 07 06
 
Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16Legacy Coderetreat @Budapest 2013 02 16
Legacy Coderetreat @Budapest 2013 02 16
 
Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27
 
Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20 Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20
 

Recently uploaded

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 

Brutal Refactoring Game @XP Vienna 2013 06 05