managing technical debt n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Managing Technical Debt PowerPoint Presentation
Download Presentation
Managing Technical Debt

Loading in 2 Seconds...

play fullscreen
1 / 47

Managing Technical Debt - PowerPoint PPT Presentation


  • 121 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Managing Technical Debt' - davin


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
managing technical debt

Managing Technical Debt

Pierre G. Boutquin

welcome
Welcome!

Welcome to the Toronto ALM User Group“TALMUG”

agenda or summary layout
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

Debt Characteristics

Discovering and Preventing Technical Debt

Discussion

Part III

End

???

about me
About Me

Work Experience

about me1
About Me

Programming Experience

about me2
About Me

Author

under promising
Under Promising…

About today’s talk…

history of a metaphor
History of a Metaphor

1992

Ward Cunningham

debt good or bad
Debt: Good or Bad?

Depends…

  • Deliberate vs. Inadvertent
  • Prudent vs. Reckless

http://martinfowler.com/bliki/TechnicalDebtQuadrant.html

why debt
Why Debt?

Trade-Off…

  • Faster Short Term Benefit
  • Extra Cost
debt drawback
Debt Drawback

Principal/Interest

  • Extra Cost (Interest)
  • As Long as Debt (Principal) NOT Paid Off
unmanaged debt
Unmanaged Debt

Aka My Credit Card

  • Perpetual Debt
  • Growing Interest
incurring debt
Incurring Debt

Reckless vs. Prudent

  • Deliberate Trade-Off: Maybe Prudent
  • Inadvertent Debt: Likely Reckless
deliberate debt
Deliberate Debt

When Prudent?

  • Benefits Outweigh Extra Costs
  • Affordable Repayment Plan
acceptable debt
Acceptable Debt

4 Criteria:

  • Deliberate Decision
  • Positive Cost/Benefit
  • Planned, Affordable Repayment
  • Prudent Total Debt
unwise debt
Unwise Debt

4 Tell-Tale Signs

  • Inadvertent Decision
  • Negative or Small Cost/Benefit
  • Repayment Not Planned/Too High
  • Reckless Total Debt
part i conclusion
PART I - Conclusion

Debt Criteria:

  • Total Level of Deliberateness
  • Size of Cost/Benefit
  • Affordability of Repayment
  • Total Debt Load
part ii deliberate technical debt
Part II: Deliberate Technical Debt

Choosing or Not Choosing Debt…

deliberate technical debt
Deliberate Technical Debt

Why???

  • Good: Deliver Early/On Time
  • Bad: Detestable Code
  • Ugly: The Spike
deliberate technical debt1
Deliberate Technical Debt

Avoidable?

  • Maybe: Date Driven Development
  • Yes: Feature Driven Development
deliberate technical debt2
Deliberate Technical Debt

Date-Driven Project

  • Shipping Date is Fixed
  • Features Are Negotiable
  • Often Less Desirable
deliberate technical debt3
Deliberate Technical Debt

Feature-Driven Project

  • Features Are Fixed
  • Shipping Date Is Negotiable
  • Often More Desirable
the mvp concept
The MVP Concept

“Minimal Viable Product”

  • Release Planning Tool
  • Combines Well With Prioritization
prioritization
Prioritization

Sometimes…

prioritization1
Prioritization

Key: By Business Value

  • Agile/Scrum: Backlog
  • Traditional: Prioritization Needs Forethought
moscow prioritization
MoSCoW Prioritization
  • MUST: Part of MVP
  • SHOULD: High-Priority
  • COULD: Nice to Have
  • WOULD: Maybe Later
part iii minimizing inadvertent debt
Part III: Minimizing Inadvertent Debt

Discovering and Preventing Debt…

minimizing how
Minimizing: How?

2 Angles:

  • Process
  • Tools
minimizing how1
Minimizing: How?

Process vs. process

  • Process: SDLC
  • process: Engineering Practices
    • Test First Development
minimizing type of tools
Minimizing: Type of Tools

2 Objectives:

  • Communications
  • Technical Excellence
minimizing communication tools
Minimizing: Communication Tools

Tools We Use:

  • Standup Meeting
  • Shared SME
  • Design Reviews
  • Code Reviews
minimizing technical tools
Minimizing: Technical Tools

Tools We Use:

  • Unit Tests
  • Code Contracts
  • Static Code Analysis
    • Adherence to Coding Standard
    • Good Coding Practices
  • Code Metrics
tool unit tests
Tool: Unit Tests

Recommended Book: “The Art of Unit Testing”

http://www.manning.com/osherove2/

tool unit tests1
Tool: Unit Tests

Roy Osherove’s Definition:

  • 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 tests2
Tool: Unit Tests

Roy Osherove’s Definition (cont’d):

  • A Unit Test is trustworthy, readable and maintainable. It is consistent in its results as long as the production code has not changed.
unit test tips naming convention
Unit Test Tips: Naming Convention

[UnitOfWork]_[Condition]_[ExpectedResult]

  • /// <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 voidConstructor_ValidTibcoConfig_ReturnsNonNullTopicSession()
  • {
  • // ARRANGE
  • var tibcoConfig = TestUtils.CreateValidTibcoConfig();
  • // ACT
  • var venomSender = new VenomSender(tibcoConfig);
  • // ASSERT
  • Assert.IsNotNull(venomSender.TopicSession);
  • }
unit test tips design pattern
Unit Test Tips: Design Pattern

Design Pattern: AAA

  • /// <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 voidConstructor_ValidTibcoConfig_ReturnsNonNullTopicSession()
  • {
  • // ARRANGE
  • var tibcoConfig = TestUtils.CreateValidTibcoConfig();
  • // ACT
  • var venomSender = new VenomSender(tibcoConfig);
  • // ASSERT
  • Assert.IsNotNull(venomSender.TopicSession);
  • }
unit test tips sad paths
Unit Test Tips: Sad Paths

Maintainability Tip:

  • Use Happy Path Factory Helper
  • Then, Create Single Sad Path
  • Test Both Exception Type & Message
unit test tips sad path
Unit Test Tips: Sad Path

Design Pattern:

  • /// <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 voidConstructor_nullSslCertStoreName_ThrowsException()
  • {
  • // ARRANGE
  • var tibcoConfig = TestUtils.CreateValidTibcoConfig();
  • tibcoConfig.SslCertStoreName = null;
  • // ACT
  • var venomSender = new VenomSender(tibcoConfig);
  • // ASSERT
  • // etc,
  • }
code metrics
Code Metrics

Cyclomatic Complexity

  • Method-Level Measure
  • Calculated from Control Flow Graph
  • Smaller Values Better
  • <= 25 Acceptable
code metrics1
Code Metrics

Maintainability Index

  • 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 contracts
Code Contracts

Now Part of .NET!

  • New to Me
  • No Best Practices To Share Yet…
coding standard
Coding Standard

The Final Word…

  • Partially Matter of Opinion
  • Let Tool Decide
    • StyleCop
    • ReSharper