SlideShare ist ein Scribd-Unternehmen logo
1 von 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!

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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 2024Rafal Los
 
#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
 
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
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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 WorkerThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Kürzlich hochgeladen (20)

Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 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)
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
#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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
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...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

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, ...