SlideShare uma empresa Scribd logo
1 de 15
Dealing With Legacy:
The Real-World Experience
Why this presentation?

●   Share successful practices
●   Get suggestions regarding the challenges we
    struggled with (that aren't unique to us)
●   Provide support for pushing through design
    refactorings by revealing the cost of legacy
Agenda
1.The Application & Team
2.The Challenges
3.What Worked Well
4.What Could Be Improved
5.What I'd Have Loved To Have
6.Some Other Lessons Learned
7.Legacy Code: Manifestations, why to avoid
     ●   Selected Anti-Patterns
     ●   The Hidden Cost of Legacy
The Application & Team

Application:                    ●   Java 1.4, JSP, JSF
●   Ordering site critical to   ●   Ca 8 years, ~2.5k
    the business, 1-2k              classes, 170 kLOC
    orders/day                      (400 classes and 50
Team:                               kLOC in the core)
●   Team of 5+1, Scrum
                                ●   MonsterJsfBean
                                    (improved!): >10k
●   WS back-end                     LOC, 50 constants,
    developed by a team             300 properties + 320
    abroad                          methods (½ public)
The Challenges
●   The whole team exchanged within 1-2 months
           ●   Surprisingly smooth
●   Huge difference in expertise levels (seniors x
    juniors)
●   Preparing migration to an upgraded platform
    and a different application server
●   Planning of a major design overhaul
●   Legacy code* with negligible tech/biz docs
    *) See on the next slide
What did the code look like?




    (More about design refactoring later)
What Worked Well

●   Scrum / process
       ●   Retrospectives → continual improvement
       ●   Common code review sessions (could be more)
       ●   Pair-programming → learning (c'd be more)
       ●   Timeboxing (meetings, spikes)
       ●   Explicit commitment to each and every task
●   Bi-weekly releases → low uncertainty
●   CI & deployment package building automation
●   Opportunistic (boy scout rule) refactoring
What Could Be Improved

●   Scrum
       ●   Standup – less reporting, more commitment
       ●   Focused sprints with a clear objective
●   Larger-scale refactorings to improve design
●   Less defects (how?! more testing?)
●   Test-first development and refactoring
       ●   We tried but not always (too much effort) and
            the tests weren't always good enough (focus,
            coupling)
What I'd Have Loved To Have

●   “Living documentation” ← Specification by Example
         ●   Up-to-date, clear business logic documentation
         ●   Automated integration/functional testing
●   Operational monitoring
         ●   Quick discovery of defects, outages of the
              app/dependencies
         ●   Knowledge of performance stats and
              bottlenecks
         ●   Feedback on how features are used
●   Efficient UI testing (fixtures/deps, jump to
Some Other Lessons Learned

●   It's crucial to refactor the design as
    requirements change to tame complexity
●   Tests too coupled to the implementation are
    worse than no tests
●   A meeting w/o action points with assigned
    people and checkpoints is a waste
●   Sometimes you must temporarily make code
    uglier when refactoring it towards st. better
Legacy CODE
Selected Anti-Patterns

●   Copy & Paste (& Adjust)
●   Patch & Go (aka Never Refactor Your Design)
●   One Class to Rule Them All
●   String Is the Best Data Type (never convert!)
●   Singletons & Static Accessors
●   ArrayList instead of the highest abstraction
    suitable
●   => *plication and inconsistent design
The Hidden Cost of Legacy

●   May be only 10-20% time actually coding
       ●   most time spent figuring out what the code
            does & why (partly due to slow UI)
●   No specs → what is a feature / bad design /
    workaround not needed anymore?
●   Prod defects due to
       ●   not understanding hidden dependencies and
            varying usage of state variables
       ●   not fixing all the copied & pasted code
            fragments
Your Action Points :-)

●   Don't create legacy code
       ●   Beware the cost of legacy
       ●   Do refactor your design to reflect the business
●   Be better
       ●   Consider implementing SbE/Living document.
       ●   Implement operational monitoring
       ●   Make sure your app/UI is easy to test
●   Take inspiration from what worked for us
       ●   Retrospectives, Common code reviews, ...
THANK YOU!

Mais conteúdo relacionado

Mais procurados

Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana GulatiXP Conference India
 
Test Driven Development - For Girl Geeks Night Sydney
Test Driven Development - For Girl Geeks Night SydneyTest Driven Development - For Girl Geeks Night Sydney
Test Driven Development - For Girl Geeks Night SydneyJo Cranford
 
Test team dynamics, Антон Мужайло
Test team dynamics, Антон МужайлоTest team dynamics, Антон Мужайло
Test team dynamics, Антон МужайлоSigma Software
 
Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016XP Conference India
 
Don’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleaguesDon’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleaguesIzzet Mustafaiev
 
Introduction Professional Scrum Developer for Java
Introduction Professional Scrum Developer for JavaIntroduction Professional Scrum Developer for Java
Introduction Professional Scrum Developer for JavaJoris De Winne
 
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing ElixirWeverton Timoteo
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkPeter Kofler
 
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBWeb aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBRaimonds Simanovskis
 
Career path for QA in IT
Career path for QA in ITCareer path for QA in IT
Career path for QA in ITljintest
 
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Peter Kofler
 
Kanban Explained Clearly
Kanban Explained ClearlyKanban Explained Clearly
Kanban Explained ClearlyAndrew Lloyd
 
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Peter Kofler
 

Mais procurados (20)

Feature Toggle XP Conference 2016 Kalpana Gulati
Feature Toggle  XP Conference 2016 Kalpana GulatiFeature Toggle  XP Conference 2016 Kalpana Gulati
Feature Toggle XP Conference 2016 Kalpana Gulati
 
Test Driven Development - For Girl Geeks Night Sydney
Test Driven Development - For Girl Geeks Night SydneyTest Driven Development - For Girl Geeks Night Sydney
Test Driven Development - For Girl Geeks Night Sydney
 
Test team dynamics, Антон Мужайло
Test team dynamics, Антон МужайлоTest team dynamics, Антон Мужайло
Test team dynamics, Антон Мужайло
 
Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016Componentize! by Lancer Kind XP Conference 2016
Componentize! by Lancer Kind XP Conference 2016
 
Feature Driven Development
Feature Driven DevelopmentFeature Driven Development
Feature Driven Development
 
Scrum For Developers
Scrum For DevelopersScrum For Developers
Scrum For Developers
 
Don’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleaguesDon’t let your code to be illiterate along with your colleagues
Don’t let your code to be illiterate along with your colleagues
 
Introduction Professional Scrum Developer for Java
Introduction Professional Scrum Developer for JavaIntroduction Professional Scrum Developer for Java
Introduction Professional Scrum Developer for Java
 
Fdd presentation
Fdd presentationFdd presentation
Fdd presentation
 
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
21o. RubyFloripa - Maintaining legacy Rails app and introducing Elixir
 
Why I Love Ruby On Rails
Why I Love Ruby On RailsWhy I Love Ruby On Rails
Why I Love Ruby On Rails
 
Writing Tests with the Unity Test Framework
Writing Tests with the Unity Test FrameworkWriting Tests with the Unity Test Framework
Writing Tests with the Unity Test Framework
 
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBWeb aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
 
Career path for QA in IT
Career path for QA in ITCareer path for QA in IT
Career path for QA in IT
 
Automated UI Testing
Automated UI TestingAutomated UI Testing
Automated UI Testing
 
Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)Designing Test Cases for the Gilded Rose Kata v2 (2015)
Designing Test Cases for the Gilded Rose Kata v2 (2015)
 
Kanban Explained Clearly
Kanban Explained ClearlyKanban Explained Clearly
Kanban Explained Clearly
 
Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
 
Agile tester 3.0
Agile tester 3.0Agile tester 3.0
Agile tester 3.0
 
AgilePT2012 PGMADS
AgilePT2012 PGMADSAgilePT2012 PGMADS
AgilePT2012 PGMADS
 

Destaque

Commit on day one thanks to vagrant & puppet!
Commit on day one thanks to vagrant & puppet!Commit on day one thanks to vagrant & puppet!
Commit on day one thanks to vagrant & puppet!Jakub Holy
 
Dissolving Technical Debt on Agile Projects - Smidig 2012
Dissolving Technical Debt on Agile Projects - Smidig 2012Dissolving Technical Debt on Agile Projects - Smidig 2012
Dissolving Technical Debt on Agile Projects - Smidig 2012Jakub Holy
 
Why Functional Programming and Clojure - LightningTalk
Why Functional Programming and Clojure - LightningTalkWhy Functional Programming and Clojure - LightningTalk
Why Functional Programming and Clojure - LightningTalkJakub Holy
 
Specification by example - course summary
Specification by example - course summarySpecification by example - course summary
Specification by example - course summaryJakub Holy
 
Specification by Example
Specification by ExampleSpecification by Example
Specification by ExampleExcella
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testinggojkoadzic
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with GherkinChristian Hassa
 

Destaque (8)

Commit on day one thanks to vagrant & puppet!
Commit on day one thanks to vagrant & puppet!Commit on day one thanks to vagrant & puppet!
Commit on day one thanks to vagrant & puppet!
 
Dissolving Technical Debt on Agile Projects - Smidig 2012
Dissolving Technical Debt on Agile Projects - Smidig 2012Dissolving Technical Debt on Agile Projects - Smidig 2012
Dissolving Technical Debt on Agile Projects - Smidig 2012
 
Why Functional Programming and Clojure - LightningTalk
Why Functional Programming and Clojure - LightningTalkWhy Functional Programming and Clojure - LightningTalk
Why Functional Programming and Clojure - LightningTalk
 
Specification by example - course summary
Specification by example - course summarySpecification by example - course summary
Specification by example - course summary
 
Spec by-example
Spec by-exampleSpec by-example
Spec by-example
 
Specification by Example
Specification by ExampleSpecification by Example
Specification by Example
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testing
 
Specification-By-Example with Gherkin
Specification-By-Example with GherkinSpecification-By-Example with Gherkin
Specification-By-Example with Gherkin
 

Semelhante a Dealing With Legacy: The Real-World Experience

Keeping code clean
Keeping code cleanKeeping code clean
Keeping code cleanBrett Child
 
The benefit of sneezing code into an editor vs clean code
The benefit of sneezing code into an editor vs clean codeThe benefit of sneezing code into an editor vs clean code
The benefit of sneezing code into an editor vs clean codeDave Hulbert
 
Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)Kent Graziano
 
Customized Scrum
Customized ScrumCustomized Scrum
Customized ScrumAbdul Karim
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
 
Path dependent-development (PyCon India)
Path dependent-development (PyCon India)Path dependent-development (PyCon India)
Path dependent-development (PyCon India)ncoghlan_dev
 
Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)ncoghlan_dev
 
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...Radovan Semancik
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
Corporate AGILE & SDLC Best Practices - Part1.pptx
Corporate AGILE & SDLC Best Practices - Part1.pptxCorporate AGILE & SDLC Best Practices - Part1.pptx
Corporate AGILE & SDLC Best Practices - Part1.pptxTausief Shaikh
 
Agile Talk 30 Jul 1o2
Agile Talk 30 Jul 1o2Agile Talk 30 Jul 1o2
Agile Talk 30 Jul 1o2Akhil Kumar
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practicesBill Buchan
 
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the CloudsDOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the CloudsGene Kim
 
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...DevOps Enterprise Summmit
 
Scrum, Kanban… Что дальше? История Nokia
Scrum, Kanban… Что дальше? История NokiaScrum, Kanban… Что дальше? История Nokia
Scrum, Kanban… Что дальше? История NokiaAnton Zotin
 
Test-Driven Development.pptx
Test-Driven Development.pptxTest-Driven Development.pptx
Test-Driven Development.pptxTomas561914
 

Semelhante a Dealing With Legacy: The Real-World Experience (20)

Agile
AgileAgile
Agile
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
The benefit of sneezing code into an editor vs clean code
The benefit of sneezing code into an editor vs clean codeThe benefit of sneezing code into an editor vs clean code
The benefit of sneezing code into an editor vs clean code
 
Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)Agile Methods and Data Warehousing (2016 update)
Agile Methods and Data Warehousing (2016 update)
 
Customized Scrum
Customized ScrumCustomized Scrum
Customized Scrum
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Path dependent-development (PyCon India)
Path dependent-development (PyCon India)Path dependent-development (PyCon India)
Path dependent-development (PyCon India)
 
Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)Path Dependent Development (PyCon AU)
Path Dependent Development (PyCon AU)
 
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
How To Maintain Million Lines Of Open Source Code And Remain Sane or The Stor...
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
Search microservice
Search microserviceSearch microservice
Search microservice
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
Corporate AGILE & SDLC Best Practices - Part1.pptx
Corporate AGILE & SDLC Best Practices - Part1.pptxCorporate AGILE & SDLC Best Practices - Part1.pptx
Corporate AGILE & SDLC Best Practices - Part1.pptx
 
Agile Talk 30 Jul 1o2
Agile Talk 30 Jul 1o2Agile Talk 30 Jul 1o2
Agile Talk 30 Jul 1o2
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practices
 
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the CloudsDOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
 
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
 
Xtreme Programming
Xtreme ProgrammingXtreme Programming
Xtreme Programming
 
Scrum, Kanban… Что дальше? История Nokia
Scrum, Kanban… Что дальше? История NokiaScrum, Kanban… Что дальше? История Nokia
Scrum, Kanban… Что дальше? История Nokia
 
Test-Driven Development.pptx
Test-Driven Development.pptxTest-Driven Development.pptx
Test-Driven Development.pptx
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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...Miguel Araújo
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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 Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
+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...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Dealing With Legacy: The Real-World Experience

  • 1. Dealing With Legacy: The Real-World Experience
  • 2. Why this presentation? ● Share successful practices ● Get suggestions regarding the challenges we struggled with (that aren't unique to us) ● Provide support for pushing through design refactorings by revealing the cost of legacy
  • 3. Agenda 1.The Application & Team 2.The Challenges 3.What Worked Well 4.What Could Be Improved 5.What I'd Have Loved To Have 6.Some Other Lessons Learned 7.Legacy Code: Manifestations, why to avoid ● Selected Anti-Patterns ● The Hidden Cost of Legacy
  • 4. The Application & Team Application: ● Java 1.4, JSP, JSF ● Ordering site critical to ● Ca 8 years, ~2.5k the business, 1-2k classes, 170 kLOC orders/day (400 classes and 50 Team: kLOC in the core) ● Team of 5+1, Scrum ● MonsterJsfBean (improved!): >10k ● WS back-end LOC, 50 constants, developed by a team 300 properties + 320 abroad methods (½ public)
  • 5. The Challenges ● The whole team exchanged within 1-2 months ● Surprisingly smooth ● Huge difference in expertise levels (seniors x juniors) ● Preparing migration to an upgraded platform and a different application server ● Planning of a major design overhaul ● Legacy code* with negligible tech/biz docs *) See on the next slide
  • 6. What did the code look like? (More about design refactoring later)
  • 7. What Worked Well ● Scrum / process ● Retrospectives → continual improvement ● Common code review sessions (could be more) ● Pair-programming → learning (c'd be more) ● Timeboxing (meetings, spikes) ● Explicit commitment to each and every task ● Bi-weekly releases → low uncertainty ● CI & deployment package building automation ● Opportunistic (boy scout rule) refactoring
  • 8. What Could Be Improved ● Scrum ● Standup – less reporting, more commitment ● Focused sprints with a clear objective ● Larger-scale refactorings to improve design ● Less defects (how?! more testing?) ● Test-first development and refactoring ● We tried but not always (too much effort) and the tests weren't always good enough (focus, coupling)
  • 9. What I'd Have Loved To Have ● “Living documentation” ← Specification by Example ● Up-to-date, clear business logic documentation ● Automated integration/functional testing ● Operational monitoring ● Quick discovery of defects, outages of the app/dependencies ● Knowledge of performance stats and bottlenecks ● Feedback on how features are used ● Efficient UI testing (fixtures/deps, jump to
  • 10. Some Other Lessons Learned ● It's crucial to refactor the design as requirements change to tame complexity ● Tests too coupled to the implementation are worse than no tests ● A meeting w/o action points with assigned people and checkpoints is a waste ● Sometimes you must temporarily make code uglier when refactoring it towards st. better
  • 12. Selected Anti-Patterns ● Copy & Paste (& Adjust) ● Patch & Go (aka Never Refactor Your Design) ● One Class to Rule Them All ● String Is the Best Data Type (never convert!) ● Singletons & Static Accessors ● ArrayList instead of the highest abstraction suitable ● => *plication and inconsistent design
  • 13. The Hidden Cost of Legacy ● May be only 10-20% time actually coding ● most time spent figuring out what the code does & why (partly due to slow UI) ● No specs → what is a feature / bad design / workaround not needed anymore? ● Prod defects due to ● not understanding hidden dependencies and varying usage of state variables ● not fixing all the copied & pasted code fragments
  • 14. Your Action Points :-) ● Don't create legacy code ● Beware the cost of legacy ● Do refactor your design to reflect the business ● Be better ● Consider implementing SbE/Living document. ● Implement operational monitoring ● Make sure your app/UI is easy to test ● Take inspiration from what worked for us ● Retrospectives, Common code reviews, ...