SlideShare une entreprise Scribd logo
1  sur  54
RESCUING LEGACY SOFTWARE
FROM IMPENDING DOOM
martin.cronje@myob.com
@martincronje
jacques@nreality.com
@jacdevos
Why this talk?
Legacy code kills agility
Refactoring is hard
Refactoring stories
from the trenches
Why and when, but not how
Credits
• Kent Beck on Small, Safe Steps and TDD
• Robert C. Martin on Clean Code
• Martin Fowler on Refactoring Techniques
• Ward Cunningham on Technical Debt
• Michael Feathers on Starting with a Mess
• J.B. Rainsberger relating it to Accidental Complication
What is legacy code?
What is the value in fixing legacy code?
How do we speak to Product Owners about it?
Should you rewrite?
What is refactoring?
When should we refactor?
What is legacy code?
Legacy code has a
negative perception.
• Any code in production
• Ancient code
• Unsupported technology
• Not up to standard
• Code smells
You may have heard…
- J.B. Rainsberger
code that we feel afraid to
Legacy code is valuable
change.
Summary: Legacy Code?
Why fix legacy code?
• If it ain't broken, don't fix it
• Make it easier to work with
• For our future happiness
• Good craftsmanship
You may have heard…
Professionalism
Quality culture
Return on investment
Increasing the future value
…a trade-off against present value
In summary
Do POs understand the value
in fixing legacy code?
• Not enough time
• We cannot afford it
• Business will close-down
• Just one more feature
• They allow us to recover
You may have heard…
Developers vs Product
Owners
Do they really say that?
How do we explain it to them?
Risk to business continuity
Unpredictable timelines
In summary
Should we rewrite?
• No. Rather the devil you know
• No. It’s too expensive
• Yes. Use latest technologies
• Yes. Learnt from mistakes!
You may have heard…
Big bang rewrite
Lesson #1:
Unpredictable timelines
Lesson #2:
Puts your business at risk
Lesson #3:
Always harder than you think
In summary
What is the alternative?
Refactoring is a safer bet
- Refactoring, Martin Fowler
and cheaper to modify without
…make it easier to understand
behavior.
changing its observable
Increase ease of change, while
decreasing risk of change
Small incremental
improvements into production
Cast safety nets as you progress
Start with lowest impact
improvement
In summary
When do we refactor?
Construction Refactoring
New code Code changes Solution wide
TDD Refactoring Litter-Pickup Refactoring
Comprehension Refactoring
Preparatory Refactoring
Planned Refactoring
Long-Term Refactoring
Refactoring workflows
Cleaning up as we go
Shanty Town
campsite?
What if this is the
problems
Handling major
refactoring
Tracer bullet
In summary
Code that we’re afraid to change.
Invest in making change easier and less risky.
Talk to Product Owners about return on investment.
Avoid rewrites, favour refactoring.
Many, small improvements without changing behaviour.
Keep it clean and escalate when crisis is imminent.
HOW ARE YOU GOING
TO MAKE IT HAPPEN?
martin.cronje@myob.com
@martincronje
jacques@nreality.com
@jacdevos

Contenu connexe

En vedette (20)

Boardmasters
BoardmastersBoardmasters
Boardmasters
 
Evaluating Websites Information
Evaluating Websites InformationEvaluating Websites Information
Evaluating Websites Information
 
Cultura hip hop
Cultura hip hopCultura hip hop
Cultura hip hop
 
20080309 efficientalgorithms kulikov_lecture15
20080309 efficientalgorithms kulikov_lecture1520080309 efficientalgorithms kulikov_lecture15
20080309 efficientalgorithms kulikov_lecture15
 
European Schoolnet #Tabletscourse MOOC
European Schoolnet #Tabletscourse MOOCEuropean Schoolnet #Tabletscourse MOOC
European Schoolnet #Tabletscourse MOOC
 
Folk a sant boi projecte
Folk a sant boi projecteFolk a sant boi projecte
Folk a sant boi projecte
 
Chapter 46
Chapter 46Chapter 46
Chapter 46
 
Correccion de errores y hechos posteriores al cierre
Correccion de errores y hechos posteriores al cierreCorreccion de errores y hechos posteriores al cierre
Correccion de errores y hechos posteriores al cierre
 
Musica pop
Musica popMusica pop
Musica pop
 
18 juli inleiding arenasessie laat 1000 bloemen bloeien
18 juli inleiding arenasessie laat 1000 bloemen bloeien18 juli inleiding arenasessie laat 1000 bloemen bloeien
18 juli inleiding arenasessie laat 1000 bloemen bloeien
 
Glenthorne Media Academy
Glenthorne Media AcademyGlenthorne Media Academy
Glenthorne Media Academy
 
Libre
LibreLibre
Libre
 
Carmen Marilena Serbanescu
Carmen Marilena SerbanescuCarmen Marilena Serbanescu
Carmen Marilena Serbanescu
 
MLM 12 Oct 2012
MLM 12 Oct 2012MLM 12 Oct 2012
MLM 12 Oct 2012
 
днз №34 на сайт
днз №34 на сайтднз №34 на сайт
днз №34 на сайт
 
Digital matters event information
Digital matters event informationDigital matters event information
Digital matters event information
 
9 травня
9 травня9 травня
9 травня
 
Tics
TicsTics
Tics
 
Savant Degrees
Savant DegreesSavant Degrees
Savant Degrees
 
Conf conafet
Conf conafetConf conafet
Conf conafet
 

Similaire à Agile Australia 2016 - Rescuing Legacy Software from Impending Doom

Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkJoseph Yoder
 
Cleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy ProjectsCleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy ProjectsMike Long
 
Agile & Test Driven Development: The Ampersand Commerce Approach
Agile & Test Driven Development: The Ampersand Commerce ApproachAgile & Test Driven Development: The Ampersand Commerce Approach
Agile & Test Driven Development: The Ampersand Commerce ApproachAmpersand
 
Why Isn't Clean Coding Working For My Team
Why Isn't Clean Coding Working For My TeamWhy Isn't Clean Coding Working For My Team
Why Isn't Clean Coding Working For My TeamRob Curry
 
Refactor your code: when, why and how?
Refactor your code: when, why and how?Refactor your code: when, why and how?
Refactor your code: when, why and how?Nacho Cougil
 
Refactoring, 2nd Edition
Refactoring, 2nd EditionRefactoring, 2nd Edition
Refactoring, 2nd Editionjexp
 
Agile Software Design
Agile Software DesignAgile Software Design
Agile Software Designeduardomg23
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucksPeter Gfader
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference CardSeapine Software
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....Mike Harris
 
Everything you Wanted to Know About Refactoring
Everything you Wanted to Know About RefactoringEverything you Wanted to Know About Refactoring
Everything you Wanted to Know About RefactoringGary Short
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia eventXebia India
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware ProgrammingPostSharp Technologies
 
Coding Dojo Firenze - vol1
Coding Dojo Firenze - vol1 Coding Dojo Firenze - vol1
Coding Dojo Firenze - vol1 Massimo Iacolare
 
Greythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideGreythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideVaco Seattle
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesIgor Moochnick
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Vijay Kumbhar
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingUtkarsh Khare
 
Why Is Managing Software So Hard?
Why Is Managing Software So Hard?Why Is Managing Software So Hard?
Why Is Managing Software So Hard?Michael Lamont
 

Similaire à Agile Australia 2016 - Rescuing Legacy Software from Impending Doom (20)

Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard WorkTaming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
Taming Big Balls of Mud with Diligence, Agile Practices, and Hard Work
 
Cleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy ProjectsCleaning Code - Tools and Techniques for Large Legacy Projects
Cleaning Code - Tools and Techniques for Large Legacy Projects
 
Agile & Test Driven Development: The Ampersand Commerce Approach
Agile & Test Driven Development: The Ampersand Commerce ApproachAgile & Test Driven Development: The Ampersand Commerce Approach
Agile & Test Driven Development: The Ampersand Commerce Approach
 
Why Isn't Clean Coding Working For My Team
Why Isn't Clean Coding Working For My TeamWhy Isn't Clean Coding Working For My Team
Why Isn't Clean Coding Working For My Team
 
Refactor your code: when, why and how?
Refactor your code: when, why and how?Refactor your code: when, why and how?
Refactor your code: when, why and how?
 
Refactoring, 2nd Edition
Refactoring, 2nd EditionRefactoring, 2nd Edition
Refactoring, 2nd Edition
 
Agile Software Design
Agile Software DesignAgile Software Design
Agile Software Design
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Technical Debt.pptx
Technical Debt.pptxTechnical Debt.pptx
Technical Debt.pptx
 
How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....How I Learned to Stop Worrying and Love Legacy Code.....
How I Learned to Stop Worrying and Love Legacy Code.....
 
Everything you Wanted to Know About Refactoring
Everything you Wanted to Know About RefactoringEverything you Wanted to Know About Refactoring
Everything you Wanted to Know About Refactoring
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming10 Reasons You MUST Consider Pattern-Aware Programming
10 Reasons You MUST Consider Pattern-Aware Programming
 
Coding Dojo Firenze - vol1
Coding Dojo Firenze - vol1 Coding Dojo Firenze - vol1
Coding Dojo Firenze - vol1
 
Greythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview GuideGreythorn Whiteboard Interview Guide
Greythorn Whiteboard Interview Guide
 
Arch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best PracticesArch factory - Agile Design: Best Practices
Arch factory - Agile Design: Best Practices
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme Programming
 
Why Is Managing Software So Hard?
Why Is Managing Software So Hard?Why Is Managing Software So Hard?
Why Is Managing Software So Hard?
 

Dernier

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 

Dernier (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Agile Australia 2016 - Rescuing Legacy Software from Impending Doom

Notes de l'éditeur

  1. Come and chat to us and let even code together We really what you to get some ideas on: how to make it happen!
  2. Beck, Kent (2003). Test-Driven Development by Example, Addison Wesley - Vaseem. Beck, Kent (2001). Extreme Programming Explained: Embrace Change 2nd. ed. Addison-Wesley. Fowler, Martin (1999). Refactoring: Improving the design of existing code. Addison Wesley. Feathers, Michael C (2004). Working Effectivelywith Legacy Code. Prentice Hall. Martin, Robert Cecil (2009). Clean code: a handbook of agile software craftsmanship. Upper Saddle River, NJ: Prentice Hall. Cunningham, Ward (2011). Ward Explains Debt Metaphor http://c2.com/cgi/wiki?WardExplainsDebtMetaphor Rainsberger, J.B. Fundamental Theorem of Agile Software Development https://vimeo.com/79106557
  3. To speaker: - Remember the trade-off between cleaning up and ROI - Let’s have a beer together
  4. Example: Spaghetti code that breaks all over the place when you make a change in one area Is very scary to change
  5. So, now that we know what legacy code is. Why would we bother to improve it?
  6. If it ain't broken, don't fix it But that approach, and not improving, got is into trouble the first place Make it easier to work with or even For our future happiness I think that is a great reason, but who would pay for your future happiness? Good craftsmanship That brings me to 3 main reasons we found To fix legacy code.
  7. We found that there are 3 main reasons To fix legacy code. The first reason is that: It is our PROFESSIONAL DUTY To TAKE GOOD CARE of our system This is almost like the Hippocratic Oath that doctors take “First do no harm … to code ” Following this oath, We always build well crafted software. Although professionalism is a great value , it has it’s limits: If we follow it blindly We might forget what we are paid for. We might starting building things that don’t benefit our customer.
  8. A second, related line of reasoning is that: our primary goal is to deliver a quality product to our customer. With this mindset, We will not compromise on quality And always go the extra mile to Although this is also a great mindset: it may cause over-engineering But over-engineering , by definition, does not add value in the customer’s terms.
  9. This brings us to the third and ultimate reason: The effort we expend on improving the system is an investment And this investment should have a value ….A monetary value In Dollars Reasoning in terms of investment is the only way to know how much fixing we should do. For example: Fixing an unimportant system that does not change all that often, will NOT pay off. But thinking in terms of investment is hard How do we actually go about determining the balance between: short term investments of adding NEW features and long term investments in making the system less expensive to work with
  10. Cost of delay Example: A special “Moonlight” project where a senior dev has to quickly hack in changes So get access to a new market Will slow us to a grind When that system starts getting used and need changes
  11. Cost of delay Example: A special “Moonlight” project where a senior dev has to quickly hack in changes So get access to a new market Will slow us to a grind When that system starts getting used and need changes
  12. They think refactoring fails? They think developers play? They don’t understand the impact of bad design?
  13. Example: I talked to some product owners and their response was: Nobody spoke to me about this, Nobody told me what the implication of this is, Nobody explained to me what was happening.
  14. Example: OneLaw document generation Example: If we work on a mission critical system, Like a trading system, And we know the system is messy – changing one part will impact other. Any change can easily make products stop working. Causing revenue and reputation damage. Even thought no related changes are made.
  15. HARDER AND HAEDER TO GET SOMETHING OUT Example: If we try to make a change to messy system, It might have adverse effects on other, unrelated parts, The time getting to grips with all the permutations, And making sure these permutations cause no harm, Is something that cannot be estimated, especially by an analyst.
  16. So, Now that we understand the problem and have time to fix it. What do we do? Why do we even bother with the crappy old system? Why don’t we just rewrite and start with a clean slate?
  17. No. Rather the devil you know: fine, but we have to do something, this devil is causing havoc No. It’s too expensive: yes, but development on the legacy system is also becoming increasingly expensive Yes. Use latest technologies + Learnt from mistakes!
  18. Thinking that: We learnt from mistakes in the old system. And we want to use the latest technologies anyway. This this line of reasoning is extremely tempting.
  19. But. Let me tell you about a project. I’m sure most of you know this story from your own experiences;) I joined a rewrite of a mission critical system 6 months after it began. …although it was supposed to be finished by the time I started. We were completely stuck! For months we were in a kind of “Whack a Mole” state, dealing with the one unexpected problem after the other. And despite the best effort of the analysts, The complexity of the old system Over years was completely underestimated, To make matters worse, the Maintenance team was churning out functionality on the old system. It was a nightmare trying to merge changes regularly from an incompatible system. This clearly taught me that: it is nearly impossible to predict the difficulty to rewrite an old complex system.
  20. We finally pushed through and released to production. But the week after release was one big crises: Parts of the system stopped working , for unexpected reasons. To make matters worse, Some business departments could not function at all, Since they started to rely on idiosyncrasies of the old system. I remember getting a call from one department manager. He shouted in my ear that: Our mess will get him fired! and he is only weeks from retirement! The lesson I got from this was that: rewrites can bring a business to its knees They are extremely risky. Especially on mission critical systems.
  21. We finally pushed through and released. But the week after release was one big crises: Parts of the system stopped working , for unexpected reasons. Further, Some business departments could not function at all, Since they started to rely on idiosyncrasies of the old system. I remember getting a call from one department manager. He shouted in my ear that: Our mess will get him fired! and he is only weeks from retirement! This taught me that: rewrites can bring a business to its knees They are extremely risky.
  22. We should think twice before we rewrite a system. And resist the fallacy that “we will do it better this time round”
  23. But we still need to do something about our legacy.
  24. This makes it pretty clear that: Refactoring the current system is often a safer bet than a rewrite. But what is this thing we call refactoring? The word “Refactoring” does not even appear in the English dictionary!?
  25. Simply put, refactoring: Is a disciplined, step by step process That gradually improves The internal quality Of our system Refactoring is never a quick fix. Refactoring does not change behavior: That includes things like bug fixes and performance improvements.
  26. And when we refactor We have 2 goals: Firstly, we want to make it easier to change the system. In other words, we want to make it less expensive to get new valuable features out the door. Secondly, we want to reduce the risk in making changes to the system. We want to get to the point Where we can deploy changes regularly without loosing sleep over it. Reducing the risk of change is especially relevant to mission critical legacy systems
  27. Refactoring achieves these goals, Through a process of, Divide and Conquer: We want to: make many, small seemingly insignificant Improvements to the system. We want to avoid big, commits like the pest. Since big changes are inherently risky. In the words of Kent Beck We must get into the habit of: Taking “Small, Safe steps” Following this approach, we can make HUGE improvements in a much safer way.
  28. The next thing to remember is that Refactoring puts Safety First. This is done by Capturing the current behavior of the system with tests. And you want to run these tests on every change. TO get quick feedback. If you have broken a major feature. (even thought this is not bullet proof) A lot is written on the topic of testing, but that is outside the scope of this talk. I recommend Michael Feather’s “Working effectively with legacy code” is a good start
  29. Lastly, we have to realize with refactoring, Is that there are usually many things you can do To improve the the code base Without rocking the boat So we find that a good rule of thumb is to: start with the lowest risk readability improvements. Like the naming standard Refactoring legacy code is a process of managing risk in changes. Starting with the lowest risk improvements. will make the rest of the refactoring process much easier. But Martin will talk more about When we refactor.
  30. In summary, refactoring is a process that makes change less risky and expensive By making many, small, safe improvements To the internal structure of your code
  31. For example: Fixing a bug: is a behavior change Fixing performance: is a behavior change Splitting the system into separate services: a refactoring change.
  32. TDD Refactoring Litter-Pickup Refactoring Comprehension Refactoring Preparatory Refactoring Planned Refactoring Long-Term Refactoring
  33. Example: when making a change in someone else’s code: break long method into clearly named sub-methods, to make it clear to others what you figured out
  34. Example: we can see that spaghetti-code in our trading system is fragile and dependent. If we change things in one part we can see that the system will keep crashing down in other important areas. We need to create awareness that modules need to be broken up, into subsystems.
  35. Example: We are in a dangerous minefield of important code, trying to figure out how current code works, and where we want to take it. use a detached head, to start making throwaway changes for the purpose of learning. once we learnt, we start with a clean checkout, knowing where we will go.
  36. In this talk we saw that: Legacy is code that we’re afraid to change And that we should invest in making it easier and less risky to work with. --- We should also clearly communicate to our PO What the impact of legacy is and the value in improving it. --- We saw the dangers of rewrites and the benefits of refactoring, in terms of risk and cost. And we saw that refactoring avoids risk by making lots of little improvements, Without changing any observable behavior. --- Finally, We should always quietly improve our system, but that should make it clearly heard when there are big underlying problems To speaker: - Remember the trade-off between cleaning up and ROI - Let’s have a beer together