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

Rescuing legacy software from impending doom (Refactoring from the trenches)

Rescuing legacy software from impending doom (Refactoring from the trenches)

Dealing with an ageing code base is one of the hardest challenges that software development teams face. Legacy code bases can slow teams to a crawl, and therefore it is critical to solve this on the road to agility.
Software rewrites fail at alarming rates! Refactoring - a safer approach - has emerged as the de-facto technique to tackle this challenge.

In this interactive session we will equip attendees with techniques and lessons to help them refactor more effectively. We will share our experience gained while working with various software teams, from start-ups to mid-sized, that attempted to rescue their legacy from impending doom.

Martin Cronjé

August 04, 2015
Tweet

More Decks by Martin Cronjé

Other Decks in Programming

Transcript

  1. Credits • Kent Beck on Small, Safe Steps and TDD

    • Robert C. Martin on Clean Code • Martin Fowler on Refactoring Techniques • Ward Cunningham on Technical Debt • Michael Feathers on Starting with a Mess • J.B. Rainsberger relating it to Accidental Complication
  2. What is legacy code? What is the value in fixing

    legacy code? How do we speak to Product Owners about it? Should you rewrite? What is refactoring? When should we refactor?
  3. • Any code in production • Ancient code • Unsupported

    technology • Not up to standard • Code smells You might have said…
  4. • If it ain't broken, don't fix it • Make

    it easier to work with • For our future happiness • Good craftsmanship You might have said…
  5. • Not enough time • We cannot afford it •

    Business will close-down • Just one more feature • They allow us to recover You might have said…
  6. • No. Rather the devil you know • No. It’s

    too expensive • Yes. Use latest technologies • Yes. Learnt from mistakes! You might have said…
  7. - Refactoring, Martin Fowler and cheaper to modify without …make

    it easier to understand behavior. changing its observable
  8. New code Code changes Solution wide TDD Refactoring Litter-Pickup Refactoring

    Comprehension Refactoring Preparatory Refactoring Planned Refactoring Long-Term Refactoring Refactoring workflows
  9. Code that we’re afraid to change. Invest in making change

    easier and less risky. Talk to Product Owners about return on investment. Avoid rewrites, favour refactoring. Many, small improvements without changing behaviour. Keep it clean and escalate when crisis is imminent.
  10. Join us for this course in: Oslo, Norway (December) London,

    UK (December) Jo’burg, South Africa (October) [email protected] @martincronje [email protected] @jacdevos
  11. Reference • Beck, Kent (2003). Test-Driven Development by Example, Addison

    Wesley - Vaseem. • Beck, Kent (2001). Extreme Programming Explained: Embrace Change 2nd. ed. Addison- Wesley. • Fowler, Martin (1999). Refactoring: Improving the design of existing code. Addison Wesley. • Feathers, Michael C (2004). Working Effectively with Legacy Code. Prentice Hall. • Martin, Robert Cecil (2009). Clean code: a handbook of agile software craftsmanship. Upper Saddle River, NJ: Prentice Hall. • Cunningham, Ward (2011). Ward Explains Debt Metaphor http://c2.com/cgi/wiki?WardExplainsDebtMetaphor • Rainsberger, J.B. Fundamental Theorem of Agile Software Development https://vimeo.com/79106557