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.

Technical Debt

1,226 views

Published on

Graham Brooks - Agile East 2011

Published in: Economy & Finance, Technology
  • Be the first to comment

Technical Debt

  1. 1. Technical Debt The ‘Silent’ Application Killer © ThoughtWorks 2011Tuesday, 8 November 11
  2. 2. Graham Brooks http://www.thoughtworks.com/blogs/current http://www.grahambrooks.com/blog @wookie870 © ThoughtWorks 2011Tuesday, 8 November 11
  3. 3. Outline • Definition • Why is it important? • Symptoms and signs • Debt resolution strategiesTuesday, 8 November 11
  4. 4. Technical DebtTuesday, 8 November 11
  5. 5. Technical Debt Metaphor coined by Ward Cunningham to explain the misalignment between code and current understandingTuesday, 8 November 11
  6. 6. Consciously taking on debt might allow you to get something soonerTuesday, 8 November 11
  7. 7. Burden • Not paying off - borrowing without paying it back • Spending power goes to 0 • All your money goes into paying interestTuesday, 8 November 11
  8. 8. Some might see this as an excuse to write poor code. Never write poor codeTuesday, 8 November 11
  9. 9. Reckless Prudent We must ship now We don’tDeliberate and deal with the have time consequences for design Now we knowInadvertent What is layering? how we should have built itsource: http://martinfowler.com/bliki/TechnicalDebtQuadrant.htmlTuesday, 8 November 11
  10. 10. Evidence is anecdotal and based on personal experience of many projectsTuesday, 8 November 11
  11. 11. No debt ManagementCost of Change Time Tuesday, 8 November 11
  12. 12. A re-write will... • Solve all our problems • If we use language X • The latest framework • A new code generator • A new database • .....Tuesday, 8 November 11
  13. 13. Cost of change TimeTuesday, 8 November 11
  14. 14. Teams like these get better at rewrites. They don’t learn how to continuously deliver value indefinitely.....Tuesday, 8 November 11
  15. 15. No debt ManagementCost of Change Technical Debt Managed Time Tuesday, 8 November 11
  16. 16. Your codebase can never be in Credit For commercial projects technical debt is a fact of life You either have enough or too muchTuesday, 8 November 11
  17. 17. Symptoms and SignsTuesday, 8 November 11
  18. 18. ProductivityTuesday, 8 November 11
  19. 19. Velocity Iteration Tuesday, 8 November 11
  20. 20. Velocity Iteration Tuesday, 8 November 11
  21. 21. Velocity Iteration Tuesday, 8 November 11
  22. 22. Velocity Iteration Tuesday, 8 November 11
  23. 23. Velocity Iteration Tuesday, 8 November 11
  24. 24. Velocity Iteration Tuesday, 8 November 11
  25. 25. Tracer Stories 11Point Point 11Point Point 11Point Point 11Point Point Velocity 7h 5h 7h 10h Time 5-10 months IterationTuesday, 8 November 11
  26. 26. CodeTuesday, 8 November 11
  27. 27. Code ReviewTuesday, 8 November 11
  28. 28. “You know you are working on clean code when each routine you read turns out to be pretty much what you expected.You can call it beautiful code when the code also makes it look like the language was made for the problem” Ward Cunningham Clean Code by Robert C MartinTuesday, 8 November 11
  29. 29. http://www.osnews.com/story/19266/WTFs_mTuesday, 8 November 11
  30. 30. Readability is a keyTuesday, 8 November 11
  31. 31. How often features are used Never Rarely Sometimes 45% Often NEVER USED Always 0 12.5 25 37.5 50 Source: Standish GroupTuesday, 8 November 11
  32. 32. Remove Unused ‘stuff’ • Unused features • Unused files and tools • Unused classes • Unused methods • Unused linesTuesday, 8 November 11
  33. 33. Duplication Direct duplication Exact Code copies Aggressive Algorithmically Equivolent Tool tip: SimianTuesday, 8 November 11
  34. 34. !" #!" $!" %!" &!" !!" #!" $!" %!" 0569?-**" 50-:?-**" (>4,+@?2A"59.-5?-**" (;50-:?A"01D8?F=+" Tuesday, 8 November 11340569?A"0159.-5?A"+.509?-**":6D+6?.="H.5.?-**" ==01?A"01H.5.?A" ?-*90I6-5">4,+@?F=+" (?*90I6-5" .869?-**"(25@.LF?A" ?-*90I6-5":6D+6?.=" K625?-**"5K625?-**" 509<?-**" .869?-**" 1C+.22?A" 0++69?-**"C+.22?-**"0<NO?F=+" .1.869?A"22,01?-**"1590+?-**" !"##$%&!"(%&-4+.509?A"01D8?F=+" (?*90I6-5" 15?-2*90I" Volatility +,615?-**"<Q4<?-**" +,615?-**"5K625?-**" +,615?-**" +,615?-**" @,.509?-2" +,615?-**" 590++69?A"1,509?-**" K625?-**" @+69?-**",/.+,U69?A"9K625?-**" 09=?962F" C0==,5"C0415"
  35. 35. Toxicity 250 branches in a single classTuesday, 8 November 11
  36. 36. Clean Toxic Volatile Volatile requirements? !Refactor Now! Monitor Stable Leave alone Refactor laterTuesday, 8 November 11
  37. 37. ures /feat te sts r of O C m be on L u ti N pl ica Ap C LO Te st TimeTuesday, 8 November 11
  38. 38. Debt resolution strategiesTuesday, 8 November 11
  39. 39. Stop the Line • Works for major changes • Challenging to implement • Smells of a rewrite • ShortTuesday, 8 November 11
  40. 40. Little and often • Make improvement part of the process: • “Improvement as part of every change” • Stangler patternTuesday, 8 November 11
  41. 41. It’s going to get worse before it gets better Desired State Productivity Current Situation Cost of Change TimeTuesday, 8 November 11
  42. 42. Closing ThoughtsTuesday, 8 November 11
  43. 43. First Steps • Imagine you have joined a new team • Run metrics • Estimate debt • Plan next steps • Execute the planTuesday, 8 November 11
  44. 44. Software Rusts Things Change New capabilities Libraries Frameworks OSTuesday, 8 November 11
  45. 45. Every modification of a system might incur technical debt unless it is accompanied by some effort to bring the design into line with the requirements.Tuesday, 8 November 11
  46. 46. Questions?Tuesday, 8 November 11
  47. 47. Thank You! http://www.thoughtworks.com/blogs/current http://www.grahambrooks.com/blog @wookie870 gbrooks@thoughtworks.com © ThoughtWorks 2008Tuesday, 8 November 11

×