SlideShare una empresa de Scribd logo
1 de 36
Legacy Code is Fear 
www.mozaicworks.com
Me 
Adi Bolboacă 
Programmer 
Organizational & Technical 
Trainer & Coach www.mozaicworks.com
Legacy code scenario 
Current situation vs Better situation 
Not knowing what the actual code does 
Vs 
Gradually understanding the code and 
changing it to the minimum 
www.mozaicworks.com
Legacy code scenario 
Reasons why to change existing code: 
Fix a bug 
Add a feature 
Have automated tests for the system core 
www.mozaicworks.com
Legacy code scenario 
Reasons why not to change existing 
code: 
It looks ugly 
I would like to see nicer code 
I want to update to newest framework 
... 
www.mozaicworks.com
Current situation 
You need to add some features 
to an existing old project www.mozaicworks.com
Current situation 
They tell you that you have a very 
short time to do it www.mozaicworks.com
Current situation 
You are afraid to change the 
system www.mozaicworks.com
Current situation 
The time feels waaaaay to short 
www.mozaicworks.com
Current situation 
And you tell your manager: I 
cannot do it 
www.mozaicworks.com
Current situation 
But the manager says... 
www.mozaicworks.com
Current situation 
It takes double the time you said 
www.mozaicworks.com
Current situation 
Your company loses money. 
Your customer loses money. www.mozaicworks.com
Current situation 
Everyone is stressed 
www.mozaicworks.com
Better situation 
Someone signs a contract to add 
some features to an existing old 
project www.mozaicworks.com
Better situation 
Your team starts writing 
characterization tests to 
understand the change www.mozaicworks.com
Better situation 
Your team writes end-to-end 
tests to understand the external 
dependencies 
www.mozaicworks.com
Better situation 
Your team splits the end-to-end 
tests into integration tests and 
unit tests 
www.mozaicworks.com
Better situation 
Your team starts adding more unit 
tests around the area that needs 
to be modified 
www.mozaicworks.com
Better situation 
Every member of the team is using 
the refactoring skills to improve 
the design 
www.mozaicworks.com
Better situation 
Your team adds the new feature. 
It is fully test automated. 
www.mozaicworks.com
Better situation 
Your testers make the final 
exploratory and manual tests 
www.mozaicworks.com
Better situation 
The team delivers on time. 
www.mozaicworks.com
Better situation 
Your company wins money and 
respect from your customer. 
Your customer wins money and has 
trust in you. 
www.mozaicworks.com
The problem: Legacy code is fear 
Our unknowns are making us afraid 
Automating tests minimizes the unknowns 
By automating tests we can increase 
confidence 
www.mozaicworks.com
Very nice 
But how to do this? 
www.mozaicworks.com
Find the known unknowns of the 
team 
Talk with the team 
Find what they do not know: domain 
knowledge, programming languages, unit 
testing, acceptance testing, frameworks, 
etc 
www.mozaicworks.com
Make small scale experiments 
Use a smaller problem at first 
Learn how to write charaterization tests 
for that problem 
Use coding dojos and mob programming 
to practice together 
www.mozaicworks.com
The littany against fear 
I must not fear. 
Fear is the mind-killer. 
Fear is the little-death that brings total obliteration. 
I will face my fear. 
I will permit it to pass over me and through me. 
And when it has gone past I will turn the inner eye to 
see its path. 
Where the fear has gone there will be nothing.... only I 
will remain 
Dune by Frank Herbert 
www.mozaicworks.com
Solve the legacy code fear: invest 
Invest in the future business agility of your 
company 
www.mozaicworks.com
Solve the legacy code fear: learn 
Find the unknowns of the team 
Make a medium-term learning program 
Make small scale experiments 
Learn 
Extend to bigger scale experiments 
Learn 
Do a small change request in production 
Learn 
www.mozaicworks.com
What's next? 
Read the Working Effectively with Legacy 
code book by Michael Feathers 
Find a good trainer to help the team learn 
Build learning program with team&trainer 
Learn from each experience 
www.mozaicworks.com
Questions? 
www.mozaicworks.com
Thank you! 
Working Fast and SAFE with Existing Product Inception 
Code retreat 
www.mozaicworks.com 
See the slides at 
http://www.slideshare.net/adibolb
Extend your mentoring & training 
capacity 
Accelerate learning through 
communities of practice 
Grow your functional leaders and top 
talents 
http://www.mozaicworks.com 
adrian.bolboaca@mozaicworks.com 
@adibolb
References 
http://upload.wikimedia.org/wikipedia/commons/7/7f/Snake_warning_sign.jpg 
http://upload.wikimedia.org/wikipedia/commons/4/44/CatLolCatExample.jpg 
http://upload.wikimedia.org/wikipedia/commons/8/88/I_IZ_SERIUS_ADMNIM_THIZ_IZ_SERIUS_BIZNIS_lolcat.jpg 
http://pixabay.com/p-160097/?no_redirect 
http://www.damemagazine.com/sites/default/files/styles/feature_wide/public/field/image/biological-clock.jpg?itok=http://fc01.deviantart.net/fs71/i/2012/149/6/9/no__9gag__by_hujikari-d51hu4l.jpg 
http://upload.wikimedia.org/wikipedia/commons/1/12/We_Can_Do_It!.jpg 
http://upload.wikimedia.org/wikipedia/commons/2/25/Dive_hand_signal_Descend.png 
http://pixabay.com/go/?t=/static/uploads/photo/2012/04/18/13/01/sign-36968_150.png%3Fattachment 
http://pixabay.com/static/uploads/photo/2014/06/03/19/38/plate-361516_640.jpg 
http://upload.wikimedia.org/wikipedia/commons/0/0c/Dive_hand_signal_OK_1.png 
www.mozaicworks.com

Más contenido relacionado

Más de Adi Bolboaca

Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13Coderetreat @AgileFinland Helsinki 2014 11 13
Coderetreat @AgileFinland Helsinki 2014 11 13
Adi Bolboaca
 
Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12Coderetreat @AgileFinland Tampere 2014 11 12
Coderetreat @AgileFinland Tampere 2014 11 12
Adi 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 24
Adi 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 2013
Adi 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 16
Adi Bolboaca
 
Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27Coderetreat @Sofia 2012 10 27
Coderetreat @Sofia 2012 10 27
Adi Bolboaca
 
Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20 Coderetreat @Turku 2012 10 20
Coderetreat @Turku 2012 10 20
Adi Bolboaca
 
Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18
Adi Bolboaca
 
Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08
Adi Bolboaca
 

Más de Adi Bolboaca (14)

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
 
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
 
Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18Coderetreat @Sibiu 2012 08 18
Coderetreat @Sibiu 2012 08 18
 
Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08Coderetreat @Vienna 2013 06 08
Coderetreat @Vienna 2013 06 08
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Legacy Code is Fear @Codecamp Iasi 25 10 2014

  • 1. Legacy Code is Fear www.mozaicworks.com
  • 2. Me Adi Bolboacă Programmer Organizational & Technical Trainer & Coach www.mozaicworks.com
  • 3. Legacy code scenario Current situation vs Better situation Not knowing what the actual code does Vs Gradually understanding the code and changing it to the minimum www.mozaicworks.com
  • 4. Legacy code scenario Reasons why to change existing code: Fix a bug Add a feature Have automated tests for the system core www.mozaicworks.com
  • 5. Legacy code scenario Reasons why not to change existing code: It looks ugly I would like to see nicer code I want to update to newest framework ... www.mozaicworks.com
  • 6. Current situation You need to add some features to an existing old project www.mozaicworks.com
  • 7. Current situation They tell you that you have a very short time to do it www.mozaicworks.com
  • 8. Current situation You are afraid to change the system www.mozaicworks.com
  • 9. Current situation The time feels waaaaay to short www.mozaicworks.com
  • 10. Current situation And you tell your manager: I cannot do it www.mozaicworks.com
  • 11. Current situation But the manager says... www.mozaicworks.com
  • 12. Current situation It takes double the time you said www.mozaicworks.com
  • 13. Current situation Your company loses money. Your customer loses money. www.mozaicworks.com
  • 14. Current situation Everyone is stressed www.mozaicworks.com
  • 15. Better situation Someone signs a contract to add some features to an existing old project www.mozaicworks.com
  • 16. Better situation Your team starts writing characterization tests to understand the change www.mozaicworks.com
  • 17. Better situation Your team writes end-to-end tests to understand the external dependencies www.mozaicworks.com
  • 18. Better situation Your team splits the end-to-end tests into integration tests and unit tests www.mozaicworks.com
  • 19. Better situation Your team starts adding more unit tests around the area that needs to be modified www.mozaicworks.com
  • 20. Better situation Every member of the team is using the refactoring skills to improve the design www.mozaicworks.com
  • 21. Better situation Your team adds the new feature. It is fully test automated. www.mozaicworks.com
  • 22. Better situation Your testers make the final exploratory and manual tests www.mozaicworks.com
  • 23. Better situation The team delivers on time. www.mozaicworks.com
  • 24. Better situation Your company wins money and respect from your customer. Your customer wins money and has trust in you. www.mozaicworks.com
  • 25. The problem: Legacy code is fear Our unknowns are making us afraid Automating tests minimizes the unknowns By automating tests we can increase confidence www.mozaicworks.com
  • 26. Very nice But how to do this? www.mozaicworks.com
  • 27. Find the known unknowns of the team Talk with the team Find what they do not know: domain knowledge, programming languages, unit testing, acceptance testing, frameworks, etc www.mozaicworks.com
  • 28. Make small scale experiments Use a smaller problem at first Learn how to write charaterization tests for that problem Use coding dojos and mob programming to practice together www.mozaicworks.com
  • 29. The littany against fear I must not fear. Fear is the mind-killer. Fear is the little-death that brings total obliteration. I will face my fear. I will permit it to pass over me and through me. And when it has gone past I will turn the inner eye to see its path. Where the fear has gone there will be nothing.... only I will remain Dune by Frank Herbert www.mozaicworks.com
  • 30. Solve the legacy code fear: invest Invest in the future business agility of your company www.mozaicworks.com
  • 31. Solve the legacy code fear: learn Find the unknowns of the team Make a medium-term learning program Make small scale experiments Learn Extend to bigger scale experiments Learn Do a small change request in production Learn www.mozaicworks.com
  • 32. What's next? Read the Working Effectively with Legacy code book by Michael Feathers Find a good trainer to help the team learn Build learning program with team&trainer Learn from each experience www.mozaicworks.com
  • 34. Thank you! Working Fast and SAFE with Existing Product Inception Code retreat www.mozaicworks.com See the slides at http://www.slideshare.net/adibolb
  • 35. Extend your mentoring & training capacity Accelerate learning through communities of practice Grow your functional leaders and top talents http://www.mozaicworks.com adrian.bolboaca@mozaicworks.com @adibolb
  • 36. References http://upload.wikimedia.org/wikipedia/commons/7/7f/Snake_warning_sign.jpg http://upload.wikimedia.org/wikipedia/commons/4/44/CatLolCatExample.jpg http://upload.wikimedia.org/wikipedia/commons/8/88/I_IZ_SERIUS_ADMNIM_THIZ_IZ_SERIUS_BIZNIS_lolcat.jpg http://pixabay.com/p-160097/?no_redirect http://www.damemagazine.com/sites/default/files/styles/feature_wide/public/field/image/biological-clock.jpg?itok=http://fc01.deviantart.net/fs71/i/2012/149/6/9/no__9gag__by_hujikari-d51hu4l.jpg http://upload.wikimedia.org/wikipedia/commons/1/12/We_Can_Do_It!.jpg http://upload.wikimedia.org/wikipedia/commons/2/25/Dive_hand_signal_Descend.png http://pixabay.com/go/?t=/static/uploads/photo/2012/04/18/13/01/sign-36968_150.png%3Fattachment http://pixabay.com/static/uploads/photo/2014/06/03/19/38/plate-361516_640.jpg http://upload.wikimedia.org/wikipedia/commons/0/0c/Dive_hand_signal_OK_1.png www.mozaicworks.com