Technical Debt - osbridge
-
Upload
enaramore -
Category
Technology
-
view
1.581 -
download
0
description
Transcript of Technical Debt - osbridge
Technical DebtElizabeth NaramoreOpen Source Bridge
June 2011
(Me.)
Technical Debt
1. What is it?
Technical Debt
2. Why should we care?
Technical Debt
3. What do we do about it?
“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 non-quite-right code counts as interest on that debt.”
--Ward Cunningham, 1992
“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 non-quite-right code counts as interest on that debt.”
--Ward Cunningham, 1992
“I think that there were plenty of cases where people would rush software out the door and learn things but never put that learning back into the program, and that by analogy, was borrowing money thinking that you never had to pay it back.... eventually all your income goes to interest and your purchasing power goes to zero.”
--Ward Cunningham, 1992
“I think that there were plenty of cases where people would rush software out the door and learn things but never put that learning back into the program, and that by analogy, was borrowing money thinking that you never had to pay it back.... eventually all your income goes to interest and your purchasing power goes to zero.”
--Ward Cunningham, 1992
1. What is Technical Debt?
Code or practicesthat will hinder your progressin the future.
1. What is Technical Debt?
Code or practicesthat will hinder your progressin the future.
2. Why should we care?
Too much technical debtcan cripple your teamor organization.
2. Why should we care?
Too much technical debtcan cripple your teamor organization.
3. What can we do about it?
Easy there, tiger. We’ll get to that.
Where do wefind it?
In our own code.
For example...
Untested code.
You have technical debt if you have...
Untested code.
How much time is wasted when changes break stuff and create more bugs?
You have technical debt if you have...
Suppressed errors.
You have technical debt if you have...
Suppressed errors.
(Psst. This doesn’t really make the error go away. I’ve tried.)
You have technical debt if you have...
Confusing code, inconsistencies & workarounds
You have technical debt if you have...
Confusing code, inconsistencies & workarounds
How much time has been wasted trying to sort through spaghetti code?
You have technical debt if you have...
Legacy code
You have technical debt if you have...
Legacy code.
How much time has been wasted trying to sift through cruft?
You have technical debt if you have...
Code that doesn’t follow standards.
You have technical debt if you have...
Code that doesn’t follow standards.
Code that is hard to read takes time to read.
You have technical debt if you have...
Duplicate code blocks.
You have technical debt if you have...
Duplicate code blocks.
Good for quilts. Not so good for fixing mistakes in code.
You have technical debt if you have...
In things that affect our code.
For example...
•Non-existent or improperly used VCS.•Unstable deployment process.•Individual code ownership.•Lack of documentation.•Unshared knowledge.•Third party code that needs updated/patched
You have technical debt if you have...
Guess what?
We all have it.
Don’t panic.
Sometechnical debt
is ok.
It allows you to hit a deadline.
It might make sense if...
It allows you to experiment.
It might make sense if...
The code is rarely touched.
It might make sense if...
You are coding for reasonable expectations.
It might make sense if...
Your code is at the end of the life cycle.
It might make sense if...
This kind of debtis known as
prudenttechnical debt.
So when is debtnot ok?
All the other times.
This kind of debtis known as
recklesstechnical debt.
Sometimes we knowwe are taking
shortcuts,but we do it anyway.
This kind of debtis known asdeliberate
technical debt.
Sometimes we don’t know any better,
or the debt is not our fault.
This could come from:
•inexperienced team members•changing project requirements•post-release retrospectives•security patches or updates from third parties
This kind of debtis known asinadvertent
technical debt.
4 ways to classifytechnical debt:
prudent vs. recklessdeliberate vs. inadvertent
Martin Fowler’s Quadrant
Martin Fowler’s Quadrant
By minimizing deliberate debt, we can better handle
inadvertent debt.
So now that we know what it is, let’s move on.
3. What can we do about it?
We tackle our debt with
D.E.B.T.(see what I did there?)
Discover
Where is our technical debt?
•Ask your developers•Use the list mentioned before•Use software like Sonar
Where is our technical debt?
Sonar
SonarApache Jackrabbit:
Sonar
Sonar + Technical Debt Plugin
EstimateHow much is it costing us?
The Simple-ish Formula
Amount of the “loan” = cost to fix“Interest Rate” = Adverse impact on
development
EstimateHow much is it costing us?
Determining the “interest rate” is hard.
Use estimation techniques that work for you.
Break Down
Break DownWhat do we do with this mass of technical debt?
All debt breaks down into 2 categories:
1. Debts where we continue to pay interest.2. Debts where we pay on the principal.
Task and Track
Task and Track
The key is making it visible.
Task and Track
The key is making it visible.
Task and Track
Add tasks to bug trackerAdd to task board
Show progress to all
Paying it Off
Paying it Off
Focus on high interest items
OR
Focus on small tickets
Paying it OffDedicate time.
• Use time right after a release• Tech debt iteration/sprint• Time each day for tech debt• Refactor as you go• Use off-season time• Designated Debt Payer
Paying it Off
Keep track of your progress
AND
communicate to all.
Prevention
Prevention
• Break past habits • Group consensus & commitment• Teach your “children” well• Never file for bankruptcy• Live within your means• Anticipate your needs
A few words aboutchange
management.
You should read this.
Change Management
Change Management
1. Direct the rider.
Change Management
2. Motivate the elephant.
Change Management
3. Shape the path.
Want to contact me?
http://naramore.net/blog@ElizabethN
[email protected] IRC: ElizabethN
THANKS!
Image used with permission from Martin Fowler