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

Three Principles To Bring Your Legacy Code Into the Future

Three Principles To Bring Your Legacy Code Into the Future

Roland Weisleder

December 11, 2023
Tweet

More Decks by Roland Weisleder

Other Decks in Programming

Transcript

  1. About Me Independent Software Developer & Consultant Bringing Legacy Java

    Systems Into the Future Spring Boot Trainer @ workshops.de Lecturer @ HTW Berlin in/roland-weisleder @rweisleder @Ro_Wei [email protected]
  2. What is Legacy Code?* • Still in production use •

    Relies on outdated technologies • Has insufficient test coverage • Lacks adequate documentation • Expert knowledge unavailable *According to ChatGPT
  3. Old bugs need to be added to the rewritten system.

    Source: https://martinfowler.com/bliki/StranglerFigApplication.html
  4. • What about the input format? • What about malformed

    input? • What about null? • What about thrown exceptions?
  5. Who has read the tests of their favorite language /

    framework / library to understand how to use it?
  6. I want to test private methods Private methods are independent

    units in disguise. Extract, document and test.
  7. I have to mock everything So the method does nothing

    useful? Keep it simple, delete the method.
  8. Bringing Legacy Code Into the Future Slides: speakerdeck.com/rweisleder Gilded Rose

    Kata: github.com/emilybache/GildedRose-Refactoring-Kata Need help with your Legacy Code? Contact me! [email protected] in/roland-weisleder @rweisleder @Ro_Wei