Software developers use the term “Technical Debt” as a metaphor to convey the compromise between hitting the release date to meet the deadline and cleaning your code to ensure the quality. This could relate to financial debt when you could get money in a quicker and easier way but it comes with the duty of paying interest. In software development, incurring “Technical Debt” comes with extra work in the future and some other consequences.
3. www.axon.vnfb.com/AxonActiveVietNam
3 mins Check-in
50 mins talk in Technical Debt
What it is
Metaphors
Cost
Bad or good
7 mins Hard choices game introduction
15 mins Break
25 mins Play the game
20 mins Talk in how to deal with the debt
10 mins + after
What is your experience?
Timeline
Technical Debt
4. www.axon.vnfb.com/AxonActiveVietNam
Check-in
• How are you today?
• Have you though about how you can buy a
house/car?
• Do you think (financial) debt is good or bad?
• How often do you prepare meals in your kitchen?
Technical Debt
17. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
“Technical Debt includes internal things that you choose not to
do now, but which will impede future development if left undone.
This includes deferred refactoring, but doesn’t include deferred
functionality”
What is Technical Debt?
Ward Cunningham
internal things : might architecture/design structure
impede: delay
deferred: postpone
18. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
“You have a piece of functionality that you need to add to your
system. You see two ways to do it, one is quick to do but is
messy – you are sure that it will make further changes harder in
the future. The other results in a cleaner design, but will take
longer to put in place”
What is Technical Debt?
Martin Fowler
22. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Imagine that you have a project that has two potential options..
Decision making
Quick and dirty way,
get your features sooner, but make the
future changes very hard
Clean and smart way,
takes longer to implement but make changes
easier in the future
23. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
In development, releasing code as a quick and easy approach is like incurring
debt - it comes with the obligation of interest, which comes in the form of extra
work in the future.
Taking the time to refactor is equivalent to paying down principal
28. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
BAD
If you don’t pay the debt now (fix the code today) you will have to pay some
interest in the future (spend more time to fix the same code)
Re-build the whole codebase
Technical debt costs money, time and
effort to stakeholders, developers,
companies, even to economies
29. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
BAD
“Most companies have to spend 80% of their software development budget
maintaining code”
Aaron Erickson, Informit.com
“Technical debt is like smoking addiction. Once you start hacking your code,
the code asks for more. You never know what that will cost in the future.”
Lemi Orhan Ergin, Agilistanbul.com
“High amount of Technical Debt is #1 impediment to teams being agile”
Dan Rawsthorne
30. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
GOOD
• Most people borrow money when they start a business, and they hope that
the investment will pay off.
• House loan or a car loan, generally considered acceptable types of debt.
• With credit card, you can pay a week or a month later.
• Most people would agree that it’s absolutely fine to leave the kitchen a mess
for a little while.
• Similar, it’s OK to have technical debt for some period of time.
31. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
GOOD
• It is NOT some terrible monster that needs to be avoided.
• In software development, there is always a constant need to balance speed
and quality
• Some quality have to be sacrificed to release features within a
reasonable timeframe. Then, can get feedbacks soon.
• Shortcuts will be tasked as future projects (pay off)
32. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
GOOD
• Since there’s always someone who is cooking in the kitchen
(since developers add/modify/remove code all the time)
• There’s no such thing as software without technical debt
Actually
Question
• How long are we allowed to leave the kitchen in such a mess?
• There’s no one-size-fits-all answer
Prefer approach
• Before someone else wants to use the kitchen, clean it up and put
everything back in its place
• Before you move to the next feature or bug fix, make sure you already pay
off technical debt in the codebase.
34. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Design & Architectural Debt
• Perhaps the most well-known type of technical debt, which is caused by
poor design and architecture
• Developers put bad code into codebase. Root causes:
• Copy-paste programming (duplications)
• The absence of design patterns
• Not following coding standards or best practices
• But why would developers — even the best ones — write bad code?
35. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Design & Architectural Debt
• In theory, if you apply care to the quality, then you will
constantly have low technical debt.
• In reality, almost all development teams work under
pressure and at some point are forced to take
shortcuts that sacrifice the quality of their code
boost their short-term productivity to quickly deliver
customer features
36. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Testing Debt
Lack of testing or poor testing quality. The most common patterns
• Complete absence of (automated) testing
• Tests that should run but don’t
• Tests that are unreliable because they randomly fail or take too long to
finish
• Mismatches between test scenarios and actual testing
• Outdated tests
• Too much time spending for regression testing
Writing software without testing is like participating in extreme sports without
wearing any protective gear.
39. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Documentation Debt
• Documentation is hard work
• Writing clean and readable code over comments and documentation
• Partially agree
• Things that need to be well documented and kept continuously up to date:
• API and common libraries documentation
• Requirements, user stories, and any other sources that describe the
system functionality (JIRA, Confluence, etc.)
• High-level design and architecture documentation
42. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Everyday Indicators of Technical Debt
“Don’t worry about the documentation for now”
“The only one who can change this code is Thomas”
“It’s ok for now but we’ll refactor it later.”
“ToDo/FixMe: this should be fixed before release”
“Let’s just copy and paste this part”
“I know if I touch that code everything else breaks”
“Let’s finish the testing in the next release”
“The release is coming up, so just get it done”
45. www.axon.vnfb.com/AxonActiveVietNam
Game rules
• The game may be played by 4 or 5 people
• The first player to reach END gets 5 points, second gets 3 points,
third gets 1 point
• When a player reaches End, he or she also gets 1 point for each tool card
• To enter the "Finish" cell the player should roll anything equal or greater than the
remaining squares
• The game ends when there is 1 player remaining on the board
• The player with the most points at the end of the game WINS
• When a player crosses a “hard choices” square, he or she must decide whether to go
over the shortcut bridge or whether to go the long way and try to collect one or more
tool cards
“hard choices”
square
49. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Establish a debt payment plan
• When faced with different types of debt, where do we start?
• it depends on the team’s skill sets and level
• key is to put a plan in place prioritize and execute on it
• Minimal iteration debt payment
• half a day in a week
• every sprint
• Monitor the debt and keep it manageable
• Pay of the debt continuously
• calculate effort within tasks
• buffer tasks for refactoring 10% of the team's time
51. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Assess existing debt
Inspect and assess the level of existing debt we have and also register it.
SonarQube helps us assess debt across multiple categories like duplication, rule
violation, code coverage, complexity, documentation
52. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Assess existing debt
Wow, this module is
really bad. It’s going to
be very hard to make
any changes to it
Wow, this module is
really bad. It’s going to
be very hard to make
any changes to it
Bobby
Developer
Bruno
Product Owner
53. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Assess existing debt
Bobby
Developer
Bruno
Product Owner
Hello Bruno, I think we should
take some time to refactor
this module in the next
release
Hello Bruno, I think we should
take some time to refactor
this module in the next
release
55. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Assess existing debt
Bobby
Developer
Bruno
Product Owner
But if we don’t refactor it
soon, I have a gut feeling it’s
going to cause major
problems later
But if we don’t refactor it
soon, I have a gut feeling it’s
going to cause major
problems later
58. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Before
•What is a good amount of debt?
• it depends on your appetite for risk
•Manage and monitor it and when we reach a certain threshold
• need to slow down on new features until we have our debt under control.
• negotiate with your PO
60. www.axon.vnfb.com/AxonActiveVietNamTechnical Debt
Establish a debt limit
•What is a good amount of debt?
• it depends on your appetite for risk
•Manage and monitor it and when we reach a certain threshold
• need to slow down on new features until we have our debt under control.
• negotiate with your PO
Software is eating the world
You can find cars, phones, houses, aircrafts, and lot of devices we use in our everyday lives that are controlled by some type of software system.
Now that everyone is aware that software has indeed eaten the world, we need to understand why technical debt is eating software
http://thinkapps.com/blog/development/technical-debt-definition-importance/
Anyone who are using Credit card?
Financial debt is a silent killer
Financial debt hides problems and leads to other problems
If you Google the term “technical debt,” I’m sure you will find many good definitions, descriptions, and explanations.
Let me explain the concept of technical debt using a kitchen metaphor.
Imagine that you are an excellent cook. It’s Friday night and you have invited some friends to your place for a dinner party. You want to prepare a delicious meal. But, at the same time, you want to spend as much time as you can with your guests.
When dinner is ready to be served, you decide to leave the kitchen without cleaning up and go back to your friends. The next morning, you wake up and want to make a quick breakfast before starting your day. The kitchen is a mess from the previous night’s meal. But you woke up late and don’t want to lose the whole day by doing a deep clean.
http://thinkapps.com/blog/development/technical-debt-definition-importance/
The big difference, however, is that financial debt is usually relatively stable, whereas technical debt increases exponentially over time.
There’s no one-size-fits-all answer. I can’t give you a specific number in hours or days or even weeks.
The higher the quality, the lower the technical debt that you have to pay and vice versa.
This choice usually allows teams to run a 100m sprint and boost their short-term productivity to quickly deliver customer features. If they don’t get back as soon as possible to improve the quality, however, future changes that they will need to make to that part of the code will be more expensive.
And the next time they have to fix something in the code within a tight deadline, they will be imprisoned again in the same cell. They will not have the time to properly refactor the code and will add some more technical debt. And it becomes a vicious cycle that never ends.
Test suites are the safety pillow for every software system
Increase in testing
If the team does the same tests again and again on every release or testing takes too much time, the debt seems to be in critical level.
Developers sometimes seem to consider documentation to be hard work
Partially agree with those who prefer writing clean and readable code rather than comments and documentation
But, that is only one side of the coin.
You don’t need to keep every little piece of the system updated but a document presenting the overall architecture and possible integrations should always be available
Knowledge debt, only 1 person know a feature/implementation deeply
Give example, admin tool
Last but not least, there is a type of technical debt known as defect debt.
Defect debt describes the known defects that are not yet fixed because they are low priority, low severity, or there’s a known work-around. Some other cases include defects that have been reported but are rarely reproduced or are reproduced only under extreme or corner cases.
Sometimes defect debt is computed as part of the design debt. But in some cases, it’s better to have a clear picture of the defect debt on its own, such as when you need to make important decisions about the future of a product.
The first step is to register our debt. Whenever we make a decision to take a shortcut or a quick and dirty approach, we need to log our decision and add it to our technical debt backlog, along with an estimate of how long it would take to fix. The estimate of course only makes sense if we are going to pay the debt off immediately. Usually, the longer we wait, the longer it will take to apply the fix and our initial estimate becomes invalid. Our technical debt register provides visibility into the prudent and deliberate debt decision we are making and when we plan to pay them back.
When faced with different types of debt, where do we start? Once again, it depends. Does the team know how to write tests to increase code coverage? Does the team know how to reduce complexity? If not, come up with a training and coaching plan. Does the team understand the rules they are violating? If so, start there. How about removing duplication and refactoring? Where to start is going to depend on the team’s skill sets and level, but the key is to put a plan in place and execute on it. Don’t quickly jump to the most complex class. Remember, there are long-term debts and short-term debts. We want to first reduce our short-term debt which is usually like credit card debt. This kind of debt has the highest interest rate. In code, this means we want to tackle first the classes that are constantly changing the most. The more changes we make the more interest we pay. If we have a class with no test coverage at all or one that is very complex but is never or rarely modified, we need to leave it alone for now. Consider it a low-interest debt and focus on the higher interest debts first.
What about debt in our existing code base? And what about the inadvertent debt that we might be piling on without knowing it? For that, we have to inspect and assess the level of existing debt we have and also register it. Luckily, there are tools that help us do that. SonarQube helps us assess debt across multiple categories like duplication, rule violation, code coverage, complexity, documentation, etc… and provides us with multiple ways to visualize the debt and plan on how to pay it back
What about debt in our existing code base? And what about the inadvertent debt that we might be piling on without knowing it? For that, we have to inspect and assess the level of existing debt we have and also register it. Luckily, there are tools that help us do that. SonarQube helps us assess debt across multiple categories like duplication, rule violation, code coverage, complexity, documentation, etc… and provides us with multiple ways to visualize the debt and plan on how to pay it back