managing technical debt
DESCRIPTION
Managing Technical Debt. Pierre G. Boutquin. Welcome!. Welcome to the Toronto ALM User Group “TALMUG”. Thank You, Sponsors!. Agenda or Summary Layout. Intro. Part I. Part II. Choosing or Not Choosing Technical Debt. A second line of text could go here. Agenda; TALMUG; Me. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/1.jpg)
Managing Technical DebtPierre G. Boutquin
![Page 2: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/2.jpg)
Welcome!
Welcome to the Toronto ALM User Group“TALMUG”
![Page 3: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/3.jpg)
Thank You, Sponsors!
![Page 4: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/4.jpg)
Choosing or Not Choosing Technical Debt
Agenda or Summary LayoutA second line of text could go here
Agenda; TALMUG; Me
Debt Characteristics
Discovering and Preventing Technical Debt
Discussion
Intro
Part I
Part II
Part III
End
???
![Page 5: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/5.jpg)
Work ExperienceAbout Me
![Page 6: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/6.jpg)
Programming ExperienceAbout Me
![Page 7: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/7.jpg)
AuthorAbout Me
![Page 8: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/8.jpg)
About today’s talk…Under Promising…
![Page 9: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/9.jpg)
History of a Metaphor
Ward Cunningham
1992
![Page 10: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/10.jpg)
Part I: Debt Characteristics
![Page 11: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/11.jpg)
Deliberate vs. Inadvertent Prudent vs. Reckless
Debt: Good or Bad?Depends…
http://martinfowler.com/bliki/TechnicalDebtQuadrant.html
![Page 12: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/12.jpg)
Faster Short Term Benefit Extra Cost
Why Debt?Trade-Off…
![Page 13: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/13.jpg)
Extra Cost (Interest) As Long as Debt (Principal) NOT Paid Off
Debt DrawbackPrincipal/Interest
![Page 14: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/14.jpg)
Perpetual Debt Growing Interest
Unmanaged DebtAka My Credit Card
![Page 15: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/15.jpg)
Deliberate Trade-Off: Maybe Prudent
Inadvertent Debt: Likely Reckless
Incurring DebtReckless vs. Prudent
![Page 16: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/16.jpg)
Benefits Outweigh Extra Costs Affordable Repayment Plan
Deliberate DebtWhen Prudent?
![Page 17: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/17.jpg)
Deliberate Decision Positive Cost/Benefit Planned, Affordable Repayment Prudent Total Debt
Acceptable Debt4 Criteria:
![Page 18: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/18.jpg)
Inadvertent Decision Negative or Small Cost/Benefit Repayment Not Planned/Too High Reckless Total Debt
Unwise Debt4 Tell-Tale Signs
![Page 19: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/19.jpg)
Total Level of Deliberateness Size of Cost/Benefit Affordability of Repayment Total Debt Load
PART I - ConclusionDebt Criteria:
![Page 20: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/20.jpg)
Part II: Deliberate Technical DebtChoosing or Not Choosing Debt…
![Page 21: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/21.jpg)
Good: Deliver Early/On Time Bad: Detestable Code Ugly: The Spike
Deliberate Technical DebtWhy???
![Page 22: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/22.jpg)
Maybe: Date Driven Development Yes: Feature Driven Development
Deliberate Technical DebtAvoidable?
![Page 23: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/23.jpg)
Shipping Date is Fixed Features Are Negotiable Often Less Desirable
Deliberate Technical DebtDate-Driven Project
![Page 24: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/24.jpg)
Features Are Fixed Shipping Date Is Negotiable Often More Desirable
Deliberate Technical DebtFeature-Driven Project
![Page 25: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/25.jpg)
Release Planning Tool Combines Well With Prioritization
The MVP Concept“Minimal Viable Product”
![Page 26: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/26.jpg)
PrioritizationSometimes…
![Page 27: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/27.jpg)
Agile/Scrum: Backlog Traditional: Prioritization Needs Forethought
PrioritizationKey: By Business Value
![Page 28: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/28.jpg)
MUST: Part of MVP SHOULD: High-Priority COULD: Nice to Have WOULD: Maybe Later
MoSCoW Prioritization
![Page 29: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/29.jpg)
Part III: Minimizing Inadvertent Debt
Discovering and Preventing Debt…
![Page 30: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/30.jpg)
Process Tools
Minimizing: How?2 Angles:
![Page 31: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/31.jpg)
Process: SDLC process: Engineering Practices
Test First Development
Minimizing: How?Process vs. process
![Page 32: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/32.jpg)
Communications Technical Excellence
Minimizing: Type of Tools2 Objectives:
![Page 33: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/33.jpg)
Standup Meeting Shared SME Design Reviews Code Reviews
Minimizing: Communication ToolsTools We Use:
![Page 34: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/34.jpg)
Unit Tests Code Contracts Static Code Analysis
Adherence to Coding Standard Good Coding Practices
Code Metrics
Minimizing: Technical ToolsTools We Use:
![Page 35: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/35.jpg)
Tool: Unit TestsRecommended Book: “The Art of Unit Testing”
http://www.manning.com/osherove2/
![Page 36: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/36.jpg)
A Unit Test is an automated piece of code that invokes the unit of work being tested and then checks some assumptions about a single end result of that unit.
A unit test is almost always written using a unit-testing framework. It can be written easily and runs quickly.
Tool: Unit TestsRoy Osherove’s Definition:
![Page 37: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/37.jpg)
A Unit Test is trustworthy, readable and maintainable. It is consistent in its results as long as the production code has not changed.
Tool: Unit TestsRoy Osherove’s Definition (cont’d):
![Page 38: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/38.jpg)
• /// <summary>• /// This test demonstrates that constructor of • /// the <see cref="VenomSender" /> class is creating a topic session• /// when it is being given valid configuration.• /// </summary>• [TestMethod]• public void Constructor_ValidTibcoConfig_ReturnsNonNullTopicSession()• {• // ARRANGE• var tibcoConfig = TestUtils.CreateValidTibcoConfig();
• // ACT• var venomSender = new VenomSender(tibcoConfig);
• // ASSERT• Assert.IsNotNull(venomSender.TopicSession);• }
Unit Test Tips: Naming Convention[UnitOfWork]_[Condition]_[ExpectedResult]
![Page 39: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/39.jpg)
• /// <summary>• /// This test demonstrates that constructor of • /// the <see cref="VenomSender" /> class is creating a topic session• /// when it is being given valid configuration.• /// </summary>• [TestMethod]• public void Constructor_ValidTibcoConfig_ReturnsNonNullTopicSession()• {• // ARRANGE• var tibcoConfig = TestUtils.CreateValidTibcoConfig();
• // ACT• var venomSender = new VenomSender(tibcoConfig);
• // ASSERT• Assert.IsNotNull(venomSender.TopicSession);• }
Unit Test Tips: Design PatternDesign Pattern: AAA
![Page 40: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/40.jpg)
Use Happy Path Factory Helper Then, Create Single Sad Path Test Both Exception Type & Message
Unit Test Tips: Sad PathsMaintainability Tip:
![Page 41: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/41.jpg)
• /// <summary>• /// This test demonstrates that constructor of • /// the <see cref="VenomSender" /> class is throwing an exception• /// when it is being passed a null SslCertStoreName.• /// </summary>• [TestMethod]• public void Constructor_nullSslCertStoreName_ThrowsException()• {• // ARRANGE• var tibcoConfig = TestUtils.CreateValidTibcoConfig();• tibcoConfig.SslCertStoreName = null;
• // ACT• var venomSender = new VenomSender(tibcoConfig);
• // ASSERT• // etc,• }
Unit Test Tips: Sad PathDesign Pattern:
![Page 42: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/42.jpg)
Method-Level Measure Calculated from Control Flow Graph Smaller Values Better <= 25 Acceptable
Code MetricsCyclomatic Complexity
![Page 43: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/43.jpg)
Synthesis of Three Metrics Cyclomatic Complexity Lines of Code Computational Complexity
Icons Color-Coded GREEN (>20) YELLOW (10-20) RED (<10)
Not Expressed in Units!
Code MetricsMaintainability Index
![Page 44: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/44.jpg)
New to Me No Best Practices To Share Yet…
Code ContractsNow Part of .NET!
![Page 45: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/45.jpg)
Partially Matter of Opinion Let Tool Decide
StyleCop ReSharper
Coding StandardThe Final Word…
![Page 46: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/46.jpg)
Managing Technical Debt
![Page 47: Managing Technical Debt](https://reader036.vdocument.in/reader036/viewer/2022070500/5681687b550346895ddeee94/html5/thumbnails/47.jpg)
Questions?