Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Technical Debt

Technical Debt

Le terme "dette technique" est devenu fourre-tout dès qu'on veut décrire un bout de code qui mérite d'être repris. Cette mauvaise interprétation de la métaphore et confusion mène à des décisions désastreuses sur nos projets. Qu'est-ce qui est dette technique ? Qu'est ce qui ne l'est pas ? Pourquoi devrions-nous nous en préoccuper ? Quel est le coût de la confusion ? Que faire ? Cette présentation me permettra de discuter des origines de la métaphore, expliquer ce qu'est la dette technique, et comment l'identifier au sein d'un projet et la gérer.

Mehdi Lahmam B.

May 24, 2019
Tweet

More Decks by Mehdi Lahmam B.

Other Decks in Programming

Transcript

  1. 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. — Ward Cunningham, 1992 “
  2. 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. The danger occurs when the debt is not repaid. Every minute spent on not quite right code counts as interest on that debt. — Ward Cunningham, 1992 “
  3. The danger occurs when the debt is not repaid. Every

    minute spent on not quite right code counts as interest on that debt. “
  4. The danger occurs when the debt is not repaid. Every

    minute spent on not quite right code counts as interest on that debt. “
  5. The danger occurs when the debt is not repaid. Every

    minute spent on not quite right code counts as interest on that debt. “
  6. The danger occurs when the debt is not repaid. Every

    minute spent on not quite right code counts as interest on that debt. “
  7. Technical debt is a strategic design decision Allow for rapid

    delivery To elicit quick feedback And correct design
  8. Technical debt is an indication of learning Now know what

    you need Implementation doesn’t match
  9. Prudent Reckless Deliberate Inadvertent “We must ship now and deal

    with consequences” “We don’t have time for design” “Tests? What tests?” “Now we know how we should have done it”
  10. [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. — Ward Cunningham, 2009 “
  11. 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. — Ward Cunningham, 2009 “
  12. 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. “
  13. Manager: When will the new permission be done? Junior developer:

    Mmmm, I hope tomorrow, in the end of the day. Manager: We need it today. Can’t you find a “creative” way to do it? Junior developer: Let me think… Manager: We have 5 clients that really need this today. Else they will probably not sign the contract. Junior developer: But the… Manager: Look, it’s important that you understand the business value of it. Isn’t it just a new condition in the code? Just put it there, and we’ll “fix it” later. Junior developer: Ok. Manager: So we’ll be able to deploy today? Junior developer: Aham.
  14. Manager: When will the new permission be done? Junior developer:

    Mmmm, I hope tomorrow, in the end of the day. Manager: We need it today. Can’t you find a “creative” way to do it? Junior developer: Let me think… Manager: We have 5 clients that really need this today. Else they will probably not sign the contract. Junior developer: But the… Manager: Look, it’s important that you understand the business value of it. Isn’t it just a new condition in the code? Just put it there, and we’ll “fix it” later. Junior developer: Ok. Manager: So we’ll be able to deploy today? Junior developer: Aham. * Any resemblance to actual persons, living or dead, 
 or actual events is purely coincidental
  15. Is there a learning opportunity? Is there a plan for

    payback? Is the business truly informed? Is the code clean? Is the code tested? Do I have a technical debt?
  16. Prudent Reckless Deliberate Inadvertent “We must ship now and deal

    with consequences” “We don’t have time for design” “What’s layering?” “Now we know how we should have done it”
  17. Prudent Reckless Deliberate Inadvertent “We must ship now and deal

    with consequences” “We don’t have time for design” “What’s layering?” “Now we know how we should have done it” Incompetent
  18. Prudent Reckless Deliberate Inadvertent “We must ship now and deal

    with consequences” “We don’t have time for design” “What’s layering?” “Now we know how we should have done it” Irresponsible Incompetent
  19. Prudent Reckless Deliberate Inadvertent “We must ship now and deal

    with consequences” “We don’t have time for design” “What’s layering?” “Now we know how we should have done it” Irresponsible Incompetent Technical debt Technical debt
  20. Precedent for speed over quality Expectation of increased velocity Cruft

    slows you down Must write more cruft to keep up Ask permission to do your job correctly
  21. It makes even experienced developers fall into rookie mistakes It

    kills developers’s passion, sometimes permanently, making the best developers leave It destroys accountability, since the hurry becomes a   good excuse for mistakes It erodes trust between management and the tech team, sometimes permanently
  22. Cleaning iteration A failing strategy Schedule iterations for cleaning code

    Defer quality to cleaning sprint Focus on speed/velocity at all other times
  23. Clean constantly A wining strategy Never make an intentional mess

    Monitor your technical debt Follow the Boy Scout Rule 
 Remember quality is your responsibility Never ask permission to do your job correctly
  24. Tech debt Cruft Happens Needs to be monitored Is not

    technical debt A strategic decision Require business to 
 be informed Includes a pay-back plan