Your SlideShare is downloading. ×
0
The Technical Debt Trap
Michael J Norton
@DocOnDev
LeanDog LLC*

*The views expressed are not necessarily the views of Lea...
Rant.begin
What is Technical Debt?
What is Technical Debt?
Ward Cunningham




           oopsla’92
What is Technical Debt?
Ward Cunningham
Shipping first time code is
like going into debt.




                   oopsla’92
What is Technical Debt?
Ward Cunningham
Shipping first time code is
like going into debt.
 A little debt speeds
development...
What is Technical Debt?
Ward Cunningham
The danger occurs
when the debt is not
repaid.

Every minute spent on not-
quite-r...
What is Technical Debt?
Ward Cunningham
The danger occurs
when the debt is not
repaid.

Every minute spent on not-
quite-r...
Technical Debt is a Good Idea
Technical Debt is a Good Idea



 WTF?
Technical Debt is a Good Idea
Strategic Design Decision
Technical Debt is a Good Idea
Strategic Design Decision
Allow for Rapid Delivery
To Ellicit Quick Feedback
And Correct Des...
Technical Debt is a Metaphor
Here Be Danger
Metaphors Rock
 We reason by analogy

Can’t keep running
   at this pace

       Building on a weak foundation
           ...
Metaphors Rock
 We reason by analogy

Can’t keep running
   at this pace

       Building on a weak foundation
           ...
Metaphorphosis
When Metaphors go wrong




    Prudent
Metaphorphosis
 When Metaphors go wrong

     Return on Investment
Short-Term Fraudulent       Credit Card
          Inadv...
Metaphorphosis
Metaphorphosis
 When Metaphors go wrong
“cut a lot of corners”
      James Shore
    http://jamesshore.com/Blog/CardMeetin...
That’s not what I said
Ward Cunningham

[Many] have explained the debt metaphor
and confused it with the idea that
you cou...
That’s not what I said
Ward Cunningham

[Many] have explained the debt metaphor
and confused it with the idea that
you cou...
That’s not what I said
Ward Cunningham

... confused it with
the idea that you
could write code
poorly ...            yout...
Clean Code is Required
Ward Cunningham

The ability to pay back debt [...]
depends upon you writing code that
is clean eno...
Clean Code is Required
Ward Cunningham

The ability to pay back debt [...]
depends upon you writing code that
is clean eno...
Dirty Code is a Bad Idea
Ward Cunningham
Dirty code is to technical debt as the
pawn broker is to financial debt.

Don't th...
Is it Technical Debt?
Ask yourself...
Is the code clean?
Is the code tested?
Is there a learning objective?
Is there a pla...
Is it Technical Debt?
If you said no to even one
Is the code clean?
Is the code tested?
Is there a learning objective?
Is ...
You have cruft
Cruft (noun)
1. An unpleasant substance
2. The result of shoddy construction
3. Redundant, old or improperl...
You have a mess
Mess (noun)
1. Disorderly accumulation, heap, or jumble
2. A state of embarrassing confusion
3. An unpleas...
Chill. It’s just semantics, man.
Chill. It’s just semantics, man.
JUST Semantics?

Technical Debt is Good
Chill. It’s just semantics, man.
JUST Semantics?

            Technical Debt is Good
Chill. It’s just semantics, man.
JUST Semantics?

Quick and Dirty is Technical Debt is Good
Chill. It’s just semantics, man.
JUST Semantics?

Quick and Dirty is Good
Chill. It’s just semantics, man.
JUST Semantics?

Quick and Dirty is Good
Messy Code is a Bad Decision
Every Time
Messy Code is a Bad Decision
Every Time
 You are a professional developer
             (Professionals behave ethically)
Messy Code is a Bad Decision
Every Time
 You are a professional developer
               (Professionals behave ethically)
...
Messy Code is a Bad Decision
Every Time
 You are a professional developer
               (Professionals behave ethically)
...
Grammy Doesn’t Love Me!
Setting Expectations
The Trap
Mess begets mess
The Trap
Mess begets mess
 Precedent for Speed over Quality
 Expectation of increased velocity
 Mess slows you down
 Must ...
The Trap
Mess begets mess
 Precedent for Speed over Quality
 Expectation of increased velocity
 Mess slows you down
 Must ...
Avoid The Trap
Incremental Fixes Fail




      http://www.jacoozi.com/blog/wp-content/uploads/2007/01/refactoring_coc_big...
Avoid The Trap
Clean Constantly
Avoid The Trap
Clean Constantly
 Never make an intentional mess
 Monitor your “Technical Debt”
 Follow the Boy Scout Rule
...
Avoid The Trap
Clean Constantly
 Never make an intentional mess
 Monitor your “Technical Debt”
 Follow the Boy Scout Rule
...
Monitoring Cruft/Debt
A few key metrics
Monitoring Cruft/Debt
A few key metrics
 Code Coverage
 Cyclomatic Complexity
 Coupling
Monitoring Cruft/Debt
Code Coverage
Monitoring Cruft/Debt
Code Coverage
 Code exercised by automated tests
 Monitor test types separately
 Don’t set a coverag...
Monitoring Cruft/Debt
Code Coverage
 Code exercised by automated tests
 Monitor test types separately
 Don’t set a coverag...
Monitoring Cruft/Debt
Cyclomatic Complexity
Monitoring Cruft/Debt
Cyclomatic Complexity
 Number of logical branches in code
 Direct relationship with bugs
 Typically ...
Monitoring Cruft/Debt
Cyclomatic Complexity
 Number of logical branches in code
 Direct relationship with bugs
 Typically ...
Monitoring Cruft/Debt
Coupling
Monitoring Cruft/Debt
Coupling
 Interconnectedness of systems
 High Coupling = Difficult to Change
 Afferent (Toward) and E...
Monitoring Cruft/Debt
Coupling
 Interconnectedness of systems
 High Coupling = Difficult to Change
 Afferent (Toward) and E...
Lean Start-Ups
No exceptions
Lean Start-Ups
No exceptions
 Quick Does NOT Mean Crappy
 You must have a plan for payback
 Be careful of the precedent yo...
Lean Start-Ups
No exceptions
 Quick Does NOT Mean Crappy
 You must have a plan for payback
 Be careful of the precedent yo...
Rant.end
Thank You!
The Technical Debt Trap
Michael J Norton
@DocOnDev
LeanDog LLC*
doc@leandog.com

*The views expressed are not n...
Upcoming SlideShare
Loading in...5
×

The Technical Debt Trap - Michael "Doc" Norton

4,137

Published on

Technical Debt has become a catch-all phrase for any code that needs to be re-worked. Much like Refactoring has become a catch-all phrase for any activity that involves changing code.

These fundamental misunderstandings and comfortable yet mis-applied metaphors have resulted in a plethora of poor decisions.

What is technical debt?

What is not technical debt?

Why should we care?

What is the cost of misunderstanding?

What do we do about it?

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,137
On Slideshare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
45
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide









  • Design decisions that allow for more rapid delivery / illicit quick feedback / gather data necessary to correct design
  • - Sales site for complex product. Create product configuration views.
    - Plan to sell several different products. Starting with just one. Don’t extract interface yet.


  • - Sales site for complex product. Create product configuration views.
    - Plan to sell several different products. Starting with just one. Don’t extract interface yet.


  • - Sales site for complex product. Create product configuration views.
    - Plan to sell several different products. Starting with just one. Don’t extract interface yet.





















































  • Not acceptable to violate accounting practices, violate safety laws, or risk patient’s health

  • Not acceptable to violate accounting practices, violate safety laws, or risk patient’s health

  • Not acceptable to violate accounting practices, violate safety laws, or risk patient’s health

  • Not acceptable to violate accounting practices, violate safety laws, or risk patient’s health

  • Not acceptable to violate accounting practices, violate safety laws, or risk patient’s health

  • Not acceptable to violate accounting practices, violate safety laws, or risk patient’s health






























  • NDepend
    JDepend

  • NDepend
    JDepend

  • NDepend
    JDepend

  • NDepend
    JDepend

  • NDepend
    JDepend








  • Transcript of "The Technical Debt Trap - Michael "Doc" Norton"

    1. 1. The Technical Debt Trap Michael J Norton @DocOnDev LeanDog LLC* *The views expressed are not necessarily the views of LeanDog LLC (but they could be)
    2. 2. Rant.begin
    3. 3. What is Technical Debt?
    4. 4. What is Technical Debt? Ward Cunningham oopsla’92
    5. 5. What is Technical Debt? Ward Cunningham Shipping first time code is like going into debt. oopsla’92
    6. 6. What is Technical Debt? Ward Cunningham Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite. oopsla’92
    7. 7. What is Technical Debt? Ward Cunningham The danger occurs when the debt is not repaid. Every minute spent on not- quite-right code counts as interest on that debt. oopsla’92
    8. 8. What is Technical Debt? Ward Cunningham The danger occurs when the debt is not repaid. Every minute spent on not- quite-right code counts as interest on that debt. oopsla’92
    9. 9. Technical Debt is a Good Idea
    10. 10. Technical Debt is a Good Idea WTF?
    11. 11. Technical Debt is a Good Idea Strategic Design Decision
    12. 12. Technical Debt is a Good Idea Strategic Design Decision Allow for Rapid Delivery To Ellicit Quick Feedback And Correct Design
    13. 13. Technical Debt is a Metaphor Here Be Danger
    14. 14. Metaphors Rock We reason by analogy Can’t keep running at this pace Building on a weak foundation Puts pressure on It’s raining men our design
    15. 15. Metaphors Rock We reason by analogy Can’t keep running at this pace Building on a weak foundation Puts pressure on It’s raining men our design (hallelujah)
    16. 16. Metaphorphosis When Metaphors go wrong Prudent
    17. 17. Metaphorphosis When Metaphors go wrong Return on Investment Short-Term Fraudulent Credit Card Inadvertent RecklessScheme Pyramid Debt Auto Loan High Interest in the Third Quadrant Home Loan Voluntary Intentional Loan Shark Long-Term Prudent Student Loan Pragmatic Leverage Operational
    18. 18. Metaphorphosis
    19. 19. Metaphorphosis When Metaphors go wrong “cut a lot of corners” James Shore http://jamesshore.com/Blog/CardMeeting/Voluntary-Technical-Debt.html “quick and dirty” Martin Fowler “sloppy” http://www.martinfowler.com/bliki/TechnicalDebt.html David Laribee “just hack it in” http://msdn.microsoft.com/en-us/magazine/ee819135.aspx Steve McConnell http://blogs.construx.com/blogs/stevemcc/archive/2007/11/01/technical-debt-2.aspx
    20. 20. That’s not what I said Ward Cunningham [Many] have explained the debt metaphor and confused it with the idea that you could write code poorly with the intention of doing a good job later. http://www.youtube.com/watch?v=pqeJFYwnkjE&feature=player_embedded youtube.com 2009
    21. 21. That’s not what I said Ward Cunningham [Many] have explained the debt metaphor and confused it with the idea that you could write code poorly with the intention of doing a good job later. http://www.youtube.com/watch?v=pqeJFYwnkjE&feature=player_embedded youtube.com 2009
    22. 22. That’s not what I said Ward Cunningham ... confused it with the idea that you could write code poorly ... youtube.com 2009
    23. 23. Clean Code is Required Ward Cunningham The ability to pay back debt [...] depends upon you writing code that is clean enough to be able to refactor as you come to understand your problem. youtube.com 2009
    24. 24. Clean Code is Required Ward Cunningham The ability to pay back debt [...] depends upon you writing code that is clean enough to be able to refactor as you come to understand your problem. youtube.com 2009
    25. 25. Dirty Code is a Bad Idea Ward Cunningham Dirty code is to technical debt as the pawn broker is to financial debt. Don't think you are ever going to get your code back. http://twitter.com/WardCunningham/status/3742903303 twitter 2009
    26. 26. Is it Technical Debt? Ask yourself... Is the code clean? Is the code tested? Is there a learning objective? Is there a plan for payback? Is the business truly informed?
    27. 27. Is it Technical Debt? If you said no to even one Is the code clean? Is the code tested? Is there a learning objective? Is there a plan for payback? Is the business truly informed? Then you don’t have Technical Debt
    28. 28. You have cruft Cruft (noun) 1. An unpleasant substance 2. The result of shoddy construction 3. Redundant, old or improperly written code
    29. 29. You have a mess Mess (noun) 1. Disorderly accumulation, heap, or jumble 2. A state of embarrassing confusion 3. An unpleasant or difficult situation
    30. 30. Chill. It’s just semantics, man.
    31. 31. Chill. It’s just semantics, man. JUST Semantics? Technical Debt is Good
    32. 32. Chill. It’s just semantics, man. JUST Semantics? Technical Debt is Good
    33. 33. Chill. It’s just semantics, man. JUST Semantics? Quick and Dirty is Technical Debt is Good
    34. 34. Chill. It’s just semantics, man. JUST Semantics? Quick and Dirty is Good
    35. 35. Chill. It’s just semantics, man. JUST Semantics? Quick and Dirty is Good
    36. 36. Messy Code is a Bad Decision Every Time
    37. 37. Messy Code is a Bad Decision Every Time You are a professional developer (Professionals behave ethically)
    38. 38. Messy Code is a Bad Decision Every Time You are a professional developer (Professionals behave ethically) You are going to create unintentional cruft (You can’t help it. It’s unintentional.)
    39. 39. Messy Code is a Bad Decision Every Time You are a professional developer (Professionals behave ethically) You are going to create unintentional cruft (You can’t help it. It’s unintentional.) You have to clean up the existing cruft (Intent doesn’t alter Responsibility)
    40. 40. Grammy Doesn’t Love Me! Setting Expectations
    41. 41. The Trap Mess begets mess
    42. 42. The Trap Mess begets mess Precedent for Speed over Quality Expectation of increased velocity Mess slows you down Must generate more mess to keep up
    43. 43. The Trap Mess begets mess Precedent for Speed over Quality Expectation of increased velocity Mess slows you down Must generate more mess to keep up Ask permission to do your job correctly
    44. 44. Avoid The Trap Incremental Fixes Fail http://www.jacoozi.com/blog/wp-content/uploads/2007/01/refactoring_coc_big.jpg
    45. 45. Avoid The Trap Clean Constantly
    46. 46. Avoid The Trap Clean Constantly Never make an intentional mess Monitor your “Technical Debt” Follow the Boy Scout Rule Quality is your responsibility
    47. 47. Avoid The Trap Clean Constantly Never make an intentional mess Monitor your “Technical Debt” Follow the Boy Scout Rule Quality is your responsibility NEVER ask permission to do your job correctly
    48. 48. Monitoring Cruft/Debt A few key metrics
    49. 49. Monitoring Cruft/Debt A few key metrics Code Coverage Cyclomatic Complexity Coupling
    50. 50. Monitoring Cruft/Debt Code Coverage
    51. 51. Monitoring Cruft/Debt Code Coverage Code exercised by automated tests Monitor test types separately Don’t set a coverage target 100% Coverage is a smell
    52. 52. Monitoring Cruft/Debt Code Coverage Code exercised by automated tests Monitor test types separately Don’t set a coverage target 100% Coverage is a smell Monitor trends, not points
    53. 53. Monitoring Cruft/Debt Cyclomatic Complexity
    54. 54. Monitoring Cruft/Debt Cyclomatic Complexity Number of logical branches in code Direct relationship with bugs Typically high in concentrated areas Reduce Conditionals
    55. 55. Monitoring Cruft/Debt Cyclomatic Complexity Number of logical branches in code Direct relationship with bugs Typically high in concentrated areas Reduce Conditionals Monitor trends, not points
    56. 56. Monitoring Cruft/Debt Coupling
    57. 57. Monitoring Cruft/Debt Coupling Interconnectedness of systems High Coupling = Difficult to Change Afferent (Toward) and Efferent (Away) Dependency Injection
    58. 58. Monitoring Cruft/Debt Coupling Interconnectedness of systems High Coupling = Difficult to Change Afferent (Toward) and Efferent (Away) Dependency Injection Monitor trends, not points
    59. 59. Lean Start-Ups No exceptions
    60. 60. Lean Start-Ups No exceptions Quick Does NOT Mean Crappy You must have a plan for payback Be careful of the precedent you set Quality is STILL your responsibility
    61. 61. Lean Start-Ups No exceptions Quick Does NOT Mean Crappy You must have a plan for payback Be careful of the precedent you set Quality is STILL your responsibility NEVER ask permission to do your job correctly
    62. 62. Rant.end
    63. 63. Thank You! The Technical Debt Trap Michael J Norton @DocOnDev LeanDog LLC* doc@leandog.com *The views expressed are not necessarily the views of LeanDog LLC (but they could be)
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×