Managing Technical Debt Using Agile Michael Hall Three
Managing Technical Debt Using Agile Michael Hall Three Beacons mike@threebeacons. com 214. 783. 3936
Premise “All known compound objects decay and become more complex with the passage of time. Software is no exception. ” www. synerzip. com © Three Beacons LLC, 2011 2
What is Technical Debt? • “Technical Debt” term coined by Ward Cunningham in 1992 • Also called “design debt” • Choosing a design or construction approach that is expedient • But increases complexity and is costlier in the long term www. synerzip. com © Three Beacons LLC, 2011 3
The Debt Metaphor • Use a credit card to obtain something now • Pay for it later financial debt • Plus interest www. synerzip. com (short term) (future payment due) (the cost of being able to do this) © Three Beacons LLC, 2011 4
Technical Debt • The consequences of: slapdash architecture poor design hasty coding (versus rapid) lack of quality focus others? The danger occurs when the debt is not repaid quickly. Every minute spent on not-quite-right code results in interest on that debt. www. synerzip. com © Three Beacons LLC, 2011 5
Technical Debt T or F: all technical debt is bad and should be avoided at all costs. www. synerzip. com © Three Beacons LLC, 2011 6
Types of Technical Debt An outline to use when discussing technical debt 1. Unintentional 2. Intentional A. Short term B. Long term www. synerzip. com © Three Beacons LLC, 2011 7
Types of Technical Debt www. synerzip. com © Three Beacons LLC, 2011 8
Technical debt quadrant RECKLESS PRUDENT “We will ship on time and revise the quick fix as our top priority in the next release. ” “We don’t have time to mess with coding standards. ” * INTENTIONAL UNINTENTIONAL “There is a standard way of doing this? ” www. synerzip. com “We now know what to avoid. ” © Three Beacons LLC, 2011 9
Technical debt quadrant If you must take on technical debt for valid reasons, then “respect the asterisk”. * Short term: Only if the commitment is there to schedule, prioritize, and fix soon (e. g. in the next sprint). Long term: Only if the commitment is there to sponsor projects to resolve the debt. www. synerzip. com © Three Beacons LLC, 2011 10
Cost of Technical Debt www. synerzip. com © Three Beacons LLC, 2011
Technical Debt - impact “The all too common problem is that development organizations let their debt get out of control and spend most of their future development effort paying crippling interest payments. ” Jeff Atwood, www. codinghorror. com Programming and Human Factors CASE STUDY www. synerzip. com © Three Beacons LLC, 2011 12
Technical Debt – impacts • Person • Team • Business CASE STUDY 1990 2000 www. synerzip. com 2000 2010 © Three Beacons LLC, 2011 13
Techniques for PREVENTING Technical Debt www. synerzip. com © Three Beacons LLC, 2011
1. Draw the Line Culture shift: • From this day forward … • We no longer allow technical debt! • Only exception: tactical or strategic business justification • Even then, we “respect the asterisk” www. synerzip. com * © Three Beacons LLC, 2011 15
2. Strong “Definition of Done” • Things to consider: Coding standards adherence Code reviews Static analysis Dynamic purification Complexity analysis Written unit tests 0 known bugs 100% test cases pass Test cases automated Etc. • Visible for User Story Sprint Release www. synerzip. com © Three Beacons LLC, 2011 16
3. Test-Driven Development TDD: write test, fail the test, then write code to pass the test. Refactor when needed. Develop higher quality streamlined code! www. synerzip. com © Three Beacons LLC, 2011 17
4. Collaborative Designs • Whiteboard sessions on design topics • Leverage collective experience of the team • Wisdom of the crowd • User Design Studio • Less reliance on subject matter experts • Etc. Increase the chance of an optimal design! www. synerzip. com © Three Beacons LLC, 2011 18
Recap • Draw the line! • Strong definition of done • TDD • Collaborative designs Use these agile techniques to help prevent technical debt www. synerzip. com © Three Beacons LLC, 2011 19
Techniques for Managing NEW Technical Debt www. synerzip. com © Three Beacons LLC, 2011
1. Debt Backlog • Used when technical debt is business justified • Tracks debt by name • Lists work tasks associated with each debt • Includes an estimate • Tracks the commitment to fix schedule • Form: product backlog entries, separate Excel spreadsheet, special designation in defect DB, tool entry, sticky notes, etc. • Helps to keep the debt service level visible! Track the debt as you go! www. synerzip. com © Three Beacons LLC, 2011 21
Debt Backlog - example www. synerzip. com © Three Beacons LLC, 2011 22
2. Automatic Payment Plan • Pay as you go • Slow team’s velocity down to service the debt as it is incurred • Include technical debt items in upcoming sprints • As quickly as feasible • In line with fulfilling commitment made when debt was justified Service the debt as you go! Keep it as close to $0 as possible. www. synerzip. com © Three Beacons LLC, 2011 23
3. Makeup Stories • “Makeup”: a story that apologizes to the code base And promises to fix it! • Placeholder indicating non user story work For when you incur technical debt For any reason you circumvented quality Use a different color card (red or pink is good) • Add it to the product backlog • Prioritize into next sprint (if possible) Good way to track technical debt. www. synerzip. com © Three Beacons LLC, 2011 24
Makeup Stories - example www. synerzip. com © Three Beacons LLC, 2011 25
4. Adopt a Debt! • “Adopt” approach • If a user story leverages the debt area, “adopt” the debt card as part of the user story effort • Add the makeup story estimate into the user story User Story Makeup Story Good way to insure that makeup stories get worked. www. synerzip. com © Three Beacons LLC, 2011 26
5. Dedicated Sprint to Service Debt • Similar to a “bugfix sprint” • Do this only if really needed Preponderance of business debt occurring during project Team concerned about debt growth Upcoming features rely on code that has debt • Or, combine for a bugfix/debt sprint Periodically pay down your debt throughout the project! www. synerzip. com © Three Beacons LLC, 2011 27
Recap • Debt backlog • Service the debt commitment • Makeup stories • Adoption • Dedicated debt sprint Use these agile techniques to manage new technical debt www. synerzip. com © Three Beacons LLC, 2011 28
Techniques for Managing LEGACY Technical Debt www. synerzip. com © Three Beacons LLC, 2011
1. Re-Do Project • Business decides on a total re design and re write • Happens rarely, hard to justify • Hard for execs to see the value • Often timed with new technology introduction • How to insure that the new system is really better? Rigorous quality plan Strong Definition of Done Iterative development Feedback loops Inspect & adapt Watchful eyes Not an answer: “better people” www. synerzip. com © Three Beacons LLC, 2011 30
2. “Small Chunks” Approach • Smaller chunks of effort • In conjunction with normal dev flow • Can work well across an API abstraction • Often requires an architectural assessment • Can require code changes to other parts of legacy base (risky) • Happens more often than Re Do projects • Must insure end result is worth the effort! www. synerzip. com © Three Beacons LLC, 2011 31
3. 70/30 Rule • 70% new user stories • 30% paying down the debt of a legacy system • Rule can also be used to manage new technical debt • Helps to have a PO with history of the legacy system • Socialize that legacy improvements are part of this project! Ask for commitment Ask to be held accountable Do your part Ask others to continue the tradition 70 www. synerzip. com © Three Beacons LLC, 2011 30 32
4. “While There” Rule • While adding a new feature • Any legacy function modified for the feature must be rewritten according to quality plan Variable names Coding guidelines Braces alignment Etc. • Works well for support team also (while fixing bugs) • CAUTION: may introduce bugs Final thought on case study: • We improved almost 50% of the 4 M LOC • Significant drop in critical defects reported from customers • But, we introduced at least 10 new bugs on existing functionality • Each time – required additional justification to continue the effort www. synerzip. com © Three Beacons LLC, 2011 33
Recap • Re Do project • Small chunks approach • 70/30 rule • “While there” rule Use these agile techniques to manage legacy technical debt www. synerzip. com © Three Beacons LLC, 2011 34
Conclusion www. synerzip. com © Three Beacons LLC, 2011
A Sobering Thought “Developers know their code has technical debt, but they feel powerless to stop adding to it. ” – David Rooney, “Technical Debt: Challenging the Metaphor” There is hope – using Agile. www. synerzip. com © Three Beacons LLC, 2011 36
Managing Technical Debt - conclusion “Take my advice: go well, not fast. Care about your code. Take the time to do things right. In software, slow and steady wins the race; and speed kills. – Robert C. Martin (Uncle Bob), president of Object Mentor and agile methods author www. synerzip. com © Three Beacons LLC, 2011 37
Good References www. synerzip. com © Three Beacons LLC, 2011 38
Questions? Agile Software Product Development Partner www. synerzip. com Hemant Elhence, hemant@synerzip. com 469. 322. 0349 www. threebeacons. com Short/Long term Agile coaching Facilitated improvement Agile Methods training: Scrum Team Training Agile / Scrum User Stories – Requirements w/ Agility Product Owner Role Scrum. Master Role Etc. All courses can be delivered onsite at your location Michael Hall, mike@threebeacons. com 214. 783. 3936 www. synerzip. com © Three Beacons LLC, 2011 39
Synerzip in a Nut-shell 1. Software product development partner for small/mid sized technology companies n n n 2. Dedicated team of high caliber software professionals for each client n n n 3. n 5. Seamlessly extends client’s local team, offering full transparency Stable teams with very low turn over NOT just “staff augmentation”, but provide full mgmt support Actually reduces risk of development/delivery n 4. Exclusive focus on small/mid sized technology companies, typically venture backed companies in growth phase By definition, all Synerzip work is the IP of its respective clients Deep experience in full SDLC – design, dev, QA/testing, deployment Experienced team uses appropriate level of engineering discipline Practices Agile development – responsive, yet disciplined Reduces cost – dual shore team, 50% cost advantage Offers long term flexibility – allows (facilitates) taking offshore team captive – aka “BOT” option Confidential www. synerzip. com © Three Beacons LLC, 2011
Synerzip Clients www. synerzip. com © Three Beacons LLC, 2011 Confidential
Thank You! Call Us for a Free Consultation! Agile Software Product Development Partner www. synerzip. com www. threebeacons. com Hemant Elhence hemant@synerzip. com Michael Hall mike@threebeacons. com 469. 322. 0349 www. synerzip. com 214. 783. 3936 © Three Beacons LLC, 2011 42
- Slides: 42