Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Le projet Legacy, quelles stratégies pour s'en sortir ? — Tech.rocks 2019

Le projet Legacy, quelles stratégies pour s'en sortir ? — Tech.rocks 2019

Arnaud LEMAIRE

December 04, 2019
Tweet

More Decks by Arnaud LEMAIRE

Other Decks in Programming

Transcript

  1. A code you want to change that no one understands

    but still provides value. Definition
  2. A code without predictability Definition Developers have no idea how

    long a change can take 01. 02. There is no correlation between the business and the technical complexity
  3. A code without predictability Definition Developers have no idea how

    long a change can take 01. 02. There is no correlation between the business and the technical complexity 03. You don’t know when something will break
  4. A code with no test Definition « Most of the

    fear involved in making changes to large code bases is fear of introducing subtle bugs; fear of changing things inadvertently. Without test, you just don’t know whether things are getting better or worse. » — Michael Feathers
  5. Hello, I work in the finance industry at Lgo.group. My

    name is Arnaud LEMAIRE, And my twitter handle is @lilobase Who am I?
  6. A natural process Why does it appear? Add lines of

    code More complexity Increase in software entropy
  7. A natural process Why does it appear? Add lines of

    code More complexity Increase in software entropy Legacy Code
  8. You need to let your software die* * part of

    your software 01. A natural process that cannot be stopped
  9. You need to let your software die* * part of

    your software 01. 02. Without bringing the remaining parts with it A natural process that cannot be stopped
  10. You need to let your software die* * part of

    your software 01. 02. Without bringing the remaining parts with it 03. Optimize your software for replacement A natural process that cannot be stopped
  11. Would you rather go to the dentist twice a year

    or brush your teeth every day? When to refactor
  12. Always leave the campground cleaner than you found it. When

    to refactor This is the « boy scout rule » 01.
  13. Always leave the campground cleaner than you found it. When

    to refactor This is the « boy scout rule » 01. Developing a new feature and refactoring doesn’t mix well! 02.
  14. Always leave the campground cleaner than you found it. When

    to refactor This is the « boy scout rule » 01. 03. When you found a bug, first write a test that triggers it, then fix it. Developing a new feature and refactoring doesn’t mix well! 02.
  15. Stop the weekly technical debt repayment session When to refactor

    The « We’ll fix it later » syndrome 01.
  16. Stop the weekly technical debt repayment session When to refactor

    The « We’ll fix it later » syndrome 01. 02. The same cause always produces the same effect
  17. Stop the weekly technical debt repayment session When to refactor

    The « We’ll fix it later » syndrome 01. 02. The same cause always produces the same effect Instead provide a learning time, so you stop writing legacy code 03.
  18. Ask your business to help you map your (business) domain

    01. Invoice Generation Invoicing Car rental
  19. Ask them to tag where there is room for improvement.

    02. Invoice Generation Invoicing Car rental
  20. Starting with your core business Don’t start by your core

    business Invoice Generation Invoicing Car rental
  21. Starting with your core business Don’t start by your core

    business Invoice Generation Invoicing Car rental !
  22. Starting with your core business Don’t start by your core

    business Invoice Generation Invoicing Car rental !
  23. And put an anti-corruption layer to prevent legacy leakage 05.

    Invoicing New invoice Generation Legacy API Legacy Database New Api ACL
  24. The Ship of Theseus strategy also known as the Strangler

    pattern How to tackle it? You’ll need to coordinate your actions at the system level 01.
  25. The Ship of Theseus strategy also known as the Strangler

    pattern How to tackle it? You’ll need to coordinate your actions at the system level 01. 02. Beware of functional debt
  26. The Ship of Theseus strategy also known as the Strangler

    pattern How to tackle it? You’ll need to coordinate your actions at the system level 01. 02. Beware of functional debt 03. Optimise your new system for replacement!
  27. • The Mikado method (Ellnestam & Brolund) • Software Design

    X-Rays (Thornhill) • Working Effectively with Legacy Code (Feather) • Refactoring (Fowler) Going further Thanks to Michael C. Feather, Adam Thornhill, Cyrille Martraire, Thomas Pierrain, Martin Fowler, Jean-Baptiste Dusseaut, Ola Ellnestam, Daniel Brolund, Adrian Bolboaca
  28. Thank you! I work in the finance industry at Lgo.group.

    My name is Arnaud LEMAIRE, And my twitter handle is @lilobase