SlideShare une entreprise Scribd logo
1  sur  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!

Contenu connexe

Tendances

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
 

Tendances (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
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.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, ...