SlideShare a Scribd company logo
Sustainable Refactoring: Techniques
for Detecting and Preventing Code
Clones Mercilessly
Amr Noaman Abdel-Hamid
Agile Academy
About Amr
• Agile practitioner, coach, trainer, &
consultant
• Co-Founder of Agile Academy
• SCEA, CSP, 6σ black-belt for IT
• Co-Author of the ‘Process Increments’
method, for software process
improvement
• Initiator of Egypt’s GoAgile program at
2011, a Government initiative to boost
lean & agile software development in
Egypt
• Agile Egypt meetup organizer, the largest
agile community in the Middle East
What’s in
common?
What’s
different?
4
What’s Evil about Dead Code?
Out of the $100
Billion spent on
software in the 90’s,
$70 Billion are spent
on Maintenance
5
Cost of New
Development
30%
Cost of
Maintenance
70%
Reference: Dennis D. Smith, Designing Maintainable Software, Springer, 1999.
Cost of
locating bugs
6
60% 40%
Everything else!
Fixing
Testing
Reviews
Integration
Integration & system testing
Deployment
User Acceptance
. . . .
Cost of
Maintenance
What’s Evil About
Dead Code?
• Creates noise when
locating bugs
• Extremely easy to
pinpoint and remove:
– 4-7% of the code is
dead
– Removing dead code
removed 10% of
duplicate code as well!
– Removing dead code
takes 1-3 days
Reference:
http://www.agilealliance.org/files/2113/8134/26
17/5076a129.pdf
7
Removing Dead Code
Also Removes 10% of
Duplicate Code!
Types of Code Clones
• Exact
– Duplicated chunks of code
• Similar
– No added/changed/deleted lines of code
– Renames exists
• Gapped
– Exact or Similar Clones
– One or two lines of code are
added/changed/deleted
Exact Clones!
Similar Clones
Inconsistent (aka
Gapped) Clones
Dormant Bugs
• 30% of detected bugs are
dormant*
• You don’t know when they
will hit, and what are the
side effects
Ref: An Empirical Study of
Dormant Bugs
Queen’s University, Canada, Rochester Institute
of Technology, USA
Code Clones Hard Numbers
Overall, 20%
effort increase
in maintenance
due to code
clones
14
Reference: https://www.cqse.eu/publications/2009-do-code-clones-matter.pdf
System Code
40% Code clones
52% Inconsistent clones
18% faults in system
Removes 18 production
Dormant bugs
Removing 100 gapped
(inconsistent) clones
16
This Stuff is Risky
Isn’t It?
No, It’s Not!
17
Metric
Release 5.5
(Before
refactoring)
Release 5.6
(During
Refactoring)
Total bugs detected 128 176
% of Regression
bugs
29.7% 25.1%
Average bug fixing
cost (hours)
1.97 1.8
29.7% 25.1%
70.3% 74.9%
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
Release 5.5 Release 5.6
% New Bugs
% Regression Bugs
18
Continuous Review
• Don’t nag for quality!
• Continuously monitor
the code quality
Questions ? 20
Keep In Touch!
amr@agileacademy.co
amr.noaman@gmail.com
www.agileacademy.co
Blog: amr.agileegypt.org
@amrnoaman

More Related Content

Similar to Sustainable Refactoring: Techniques for Detecting and Preventing Code Clones Mercilessly

You Build It, You Secure It: Introduction to DevSecOps
You Build It, You Secure It: Introduction to DevSecOpsYou Build It, You Secure It: Introduction to DevSecOps
You Build It, You Secure It: Introduction to DevSecOps
Sumo Logic
 
DevSecOps - It can change your life (cycle)
DevSecOps - It can change your life (cycle)DevSecOps - It can change your life (cycle)
DevSecOps - It can change your life (cycle)
Qualitest
 
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
Gene Kim
 
Mirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco hering devops for systems of record final
Mirco hering devops for systems of record final
Mirco Hering
 
Leveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps NextLeveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps Next
Perfecto by Perforce
 
Waste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia MeetupWaste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia Meetup
Lemi Orhan Ergin
 
The Journey to DevSecOps
The Journey to DevSecOpsThe Journey to DevSecOps
The Journey to DevSecOps
SeniorStoryteller
 
The Journey to DevSecOps
The Journey to DevSecOpsThe Journey to DevSecOps
The Journey to DevSecOps
Shannon Lietz
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
Maven Logix
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)lqi
 
Enhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsEnhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code Forensics
TechWell
 
Software Security Assurance for DevOps
Software Security Assurance for DevOpsSoftware Security Assurance for DevOps
Software Security Assurance for DevOps
Black Duck by Synopsys
 
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
Future Processing
 
Solving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous TestingSolving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous Testing
Perfecto by Perforce
 
Code Reviews
Code ReviewsCode Reviews
Code Reviews
phildenoncourt
 
caring_about_code_quality
caring_about_code_qualitycaring_about_code_quality
caring_about_code_qualityKetan Patel
 
Cyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemCyber security - It starts with the embedded system
Cyber security - It starts with the embedded system
Rogue Wave Software
 
Evading & Bypassing Anti-Malware applications using metasploit
Evading & Bypassing Anti-Malware applications using metasploitEvading & Bypassing Anti-Malware applications using metasploit
Evading & Bypassing Anti-Malware applications using metasploit
n|u - The Open Security Community
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008
vipulkocher
 

Similar to Sustainable Refactoring: Techniques for Detecting and Preventing Code Clones Mercilessly (20)

You Build It, You Secure It: Introduction to DevSecOps
You Build It, You Secure It: Introduction to DevSecOpsYou Build It, You Secure It: Introduction to DevSecOps
You Build It, You Secure It: Introduction to DevSecOps
 
DevSecOps - It can change your life (cycle)
DevSecOps - It can change your life (cycle)DevSecOps - It can change your life (cycle)
DevSecOps - It can change your life (cycle)
 
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
DOES15 - Mirco Hering - Adopting DevOps Practices for Systems of Record – An ...
 
Mirco hering devops for systems of record final
Mirco hering devops for systems of record finalMirco hering devops for systems of record final
Mirco hering devops for systems of record final
 
Leveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps NextLeveraging AI and ML in Test Management Systems - DevOps Next
Leveraging AI and ML in Test Management Systems - DevOps Next
 
Waste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia MeetupWaste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia Meetup
 
The Journey to DevSecOps
The Journey to DevSecOpsThe Journey to DevSecOps
The Journey to DevSecOps
 
The Journey to DevSecOps
The Journey to DevSecOpsThe Journey to DevSecOps
The Journey to DevSecOps
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
Enhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code ForensicsEnhancing Developer Productivity with Code Forensics
Enhancing Developer Productivity with Code Forensics
 
Software Security Assurance for DevOps
Software Security Assurance for DevOpsSoftware Security Assurance for DevOps
Software Security Assurance for DevOps
 
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
[QE 2018] Paul Gerrard – Automating Assurance: Tools, Collaboration and DevOps
 
Solving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous TestingSolving the 3 Biggest Questions in Continuous Testing
Solving the 3 Biggest Questions in Continuous Testing
 
Code Reviews
Code ReviewsCode Reviews
Code Reviews
 
caring_about_code_quality
caring_about_code_qualitycaring_about_code_quality
caring_about_code_quality
 
Cyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemCyber security - It starts with the embedded system
Cyber security - It starts with the embedded system
 
Automation and Technical Debt
Automation and Technical DebtAutomation and Technical Debt
Automation and Technical Debt
 
Evading & Bypassing Anti-Malware applications using metasploit
Evading & Bypassing Anti-Malware applications using metasploitEvading & Bypassing Anti-Malware applications using metasploit
Evading & Bypassing Anti-Malware applications using metasploit
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 

Sustainable Refactoring: Techniques for Detecting and Preventing Code Clones Mercilessly

  • 1. Sustainable Refactoring: Techniques for Detecting and Preventing Code Clones Mercilessly Amr Noaman Abdel-Hamid Agile Academy
  • 2. About Amr • Agile practitioner, coach, trainer, & consultant • Co-Founder of Agile Academy • SCEA, CSP, 6σ black-belt for IT • Co-Author of the ‘Process Increments’ method, for software process improvement • Initiator of Egypt’s GoAgile program at 2011, a Government initiative to boost lean & agile software development in Egypt • Agile Egypt meetup organizer, the largest agile community in the Middle East
  • 4. 4
  • 5. What’s Evil about Dead Code? Out of the $100 Billion spent on software in the 90’s, $70 Billion are spent on Maintenance 5 Cost of New Development 30% Cost of Maintenance 70% Reference: Dennis D. Smith, Designing Maintainable Software, Springer, 1999.
  • 6. Cost of locating bugs 6 60% 40% Everything else! Fixing Testing Reviews Integration Integration & system testing Deployment User Acceptance . . . . Cost of Maintenance
  • 7. What’s Evil About Dead Code? • Creates noise when locating bugs • Extremely easy to pinpoint and remove: – 4-7% of the code is dead – Removing dead code removed 10% of duplicate code as well! – Removing dead code takes 1-3 days Reference: http://www.agilealliance.org/files/2113/8134/26 17/5076a129.pdf 7
  • 8. Removing Dead Code Also Removes 10% of Duplicate Code!
  • 9. Types of Code Clones • Exact – Duplicated chunks of code • Similar – No added/changed/deleted lines of code – Renames exists • Gapped – Exact or Similar Clones – One or two lines of code are added/changed/deleted
  • 13. Dormant Bugs • 30% of detected bugs are dormant* • You don’t know when they will hit, and what are the side effects Ref: An Empirical Study of Dormant Bugs Queen’s University, Canada, Rochester Institute of Technology, USA
  • 14. Code Clones Hard Numbers Overall, 20% effort increase in maintenance due to code clones 14 Reference: https://www.cqse.eu/publications/2009-do-code-clones-matter.pdf System Code 40% Code clones 52% Inconsistent clones 18% faults in system
  • 15. Removes 18 production Dormant bugs Removing 100 gapped (inconsistent) clones
  • 16. 16 This Stuff is Risky Isn’t It?
  • 17. No, It’s Not! 17 Metric Release 5.5 (Before refactoring) Release 5.6 (During Refactoring) Total bugs detected 128 176 % of Regression bugs 29.7% 25.1% Average bug fixing cost (hours) 1.97 1.8 29.7% 25.1% 70.3% 74.9% 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Release 5.5 Release 5.6 % New Bugs % Regression Bugs
  • 18. 18
  • 19. Continuous Review • Don’t nag for quality! • Continuously monitor the code quality

Editor's Notes

  1. The driving habits and practices are the same The car is different, the tool, the apparatus
  2. Notes: In the quick-wins stage, it is advisable to work in the same order, remove dead code, then code duplicates, then apply coding style
  3. Technical Dept: 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. Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future.
  4. Technical Dept: 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. Technical Debt is a wonderful metaphor developed by Ward Cunningham to help us think about this problem. In this metaphor, doing things the quick and dirty way sets us up with a technical debt, which is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future.
  5. Would it make any difference? 60% of time spent on maintenance is consumed in locating the bug
  6. Notes: In the quick-wins stage, it is advisable to work in the same order, remove dead code, then code duplicates, then apply coding style
  7. Notes: The effort spent on both releases is the same (4 months each) The number of bugs increased, but this does not indicate less quality, because it depends on many factors like the complexity of the new feature requests. Anyway, the raise in the number of bugs is not dramatic The percentage of regression bugs is the very interesting, because it dropped from about 30 to 25%. This drop may not be a strong indication of good quality, but for sure it is an indication that the applied refactorings did not affect the code quality negatively, which is very interesting. Also, the average bug fixing cost dropped, which may give an indication that code quality is better, or at least the code didn’t go bad due to applied refactorings.
  8. Notes: In the quick-wins stage, it is advisable to work in the same order, remove dead code, then code duplicates, then apply coding style
  9. Notes: In the quick-wins stage, it is advisable to work in the same order, remove dead code, then code duplicates, then apply coding style