Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dissolving Technical Debt on Agile Projects - Smidig 2012


Published on

Experiences with dealing with legacy code while delivering value. Key points: 1) Legacy code costs a lot. 2) Design must be maintained & evolved. 3) Continous refactoring during each task is a way to achieve 2.

Published in: Technology
  • Be the first to comment

Dissolving Technical Debt on Agile Projects - Smidig 2012

  1. 1. An Agile Approach to Technical Debt Is The Only Way Jakub Holý @ iterate no
  2. 2. Origins
  3. 3. by Jon Baldock nz @ flickrWeve all been there - mess of code
  4. 4. by Ignaz Wiradi @ wikimediaWhat we would like to have- clean, structured, fitting
  5. 5. by cotallo-nonocot @ flickrWhat we do have. It (likely) started with st. small & clean but requirements evolvedwhile the design of the code did not - only hacked & patched
  6. 6. God class ● 15 kLOC ● 300 properties ● 320 methods ● 50 constants ● used everywhere by mandalinarossa @ flickrExample of legacy - a typical monstrous god class that we were confronted with.
  7. 7. The pain!It was pain!
  8. 8. True cost of legacyPain <= Time wasted in code archeology, money & time wasted due to bugs beingintroduced.Legacy code matters to business for real money are wasted there.
  9. 9. Escape???
  10. 10. Refactor!The only way out is to improve the design
  11. 11. ?How do we get from L to R? The sad answer is we dont.It took centuries to build R. We can never get from L to R in a reasonable time. Thereis too much mess, too much to fix.
  12. 12. Code Churn Michael Feathers: Getting Empirical about RefactoringCode-churn driven refactoring: improve where it matters & pays off most - complex &changed often
  13. 13. => Boy Scout Refactoring ● Only task-related ● Time-boxed ● Always ● (+ TDD)Refactoring can go on forever => focus, time-box. Task related => in code thatmatters most now/in near future. (We: 1/3 every task devoted to refactoring.)
  14. 14. Refactoring: Improving the Design of ExistingCodeMartin FowlerWorking Effectively with Legacy CodeMichael Feathers Behead Your Legacy Beast: The Mikado Method D. Brolund, O. Ellnestam
  15. 15. It worked!
  16. 16. Required:Management endorsement
  17. 17. True cost of legacyShow to your management; Legacy code = lot of money lost.
  18. 18. ChallengeLarge-scale refactorings● risky => avoid● sometimes necessary● boy scout rule doesnt help
  19. 19. Summary● Design needs love● Continuous, focused, time-boxed refactoring● True cost of legacy
  20. 20. You too can do it!
  21. 21. Recommended Retrospectives: Group code reviews: 改 Observe Evaluate Teach Learn 善 Adjust UnifySomething that worked great for us
  22. 22. Questions? @HolyJak