SlideShare a Scribd company logo
1 of 21
Download to read offline
TDD in Product Development
Beroza Paul
Sr. software engineer
Truth about Software Product Development
● Industry average experience is about 1-25 bugs per 1000 lines of code for
delivered software.
● 7-12 bugs per 1,000 lines of code find their way to the customers
● Fixing a bug takes 30 times longer than writing a line of code
● 75% of a developer’s time is spent on debugging (1500 hours a year!)
Source: Code Complete by Steve McConnell
Production Bug is Expensive!
● Fixing a production bug may cost 100x more than fixing a bug at
design time.
● Fixing a production bug may cost 15x more than fixing a bug at
implementation time.
Source: The Economics of Software Quality
Relative Costs of Fixing Bugs
How to reduce this cost?
Facts of Production Bug
● Most production bugs caused by simple programming mistakes
● 58% of them are trivial and can be addressed with test coverage
● Tiny mistakes will have huge impact on production
How to reduce trivial bugs?
Test Driven Development (TDD)?
TDD Life Cycle
TTD Reduces total cost?
Source: The Economics of Software Quality
TTD Results in Fewer Bugs?
● A case study of engineering teams at Microsoft and IBM showed that
the defect density decreased between 40% and 90% relative to similar
projects that did not use the TDD practice.
Source: Quality improvements
TDD Produces Better Quality?
● A study carried out among developers with 10+ years of professional
experience (on average), to investigate their perceptions when
employing TTD. Many of them agreed that “TDD allows greater quality
and maintainability”
Source: TDD analysis
TDD Promotes Simpler Design?
● The Department of Computer Science at North Carolina State
University, ran an experiment with two groups of programmers: one
used TDD and the other the linear approach.
● It turned out that “92% of developers believed that TDD yields higher
quality code, 79% thought that TDD promotes simpler design.
Source: TDD investigation
When TDD is wrong choice?
Developing GUI With TDD
● Trying to test the exact placement of UI components is pointless. First
because layout is subjective and should be "tested" by humans
TDD experience in team
● An enthusiastic team and at least one experienced developer who
knows how to write good tests and also knows a few things about
good architecture, otherwise think twice before going down the TDD
road.
TDD slows down initial process
● If you’re pressed for time and need to quickly launch your product or
solution, the TDD approach may not be your best choice
Test Code Requires Maintenance
● All lines of code require maintenance, which means cost. The cost is
easiest to acknowledge when a change to existing functionality is
made.
TDD approach is difficult
● In TDD we need mocks/stubs etc. When we start using mocks, after a
while, we will want to start using Dependency Injection (DI) and a
Inversion of Control (IoC) container. To do that you need to use
interfaces for everything. At the end we end up writing lot more code.
Thank you!
Reference
● https://www.youtube.com/watch?v=ln4WnxX-wrw
● https://fortegrp.com/test-driven-development-benefits15

More Related Content

Similar to Test driven development (TDD) in product development.pdf

Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
Svetlin Nakov
 
Test driven development
Test driven developmentTest driven development
Test driven development
Sunil Prasad
 
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINALJun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Alex Tarra
 

Similar to Test driven development (TDD) in product development.pdf (20)

A Study: The Analysis of Test Driven Development And Design Driven Test
A Study: The Analysis of Test Driven Development And Design Driven TestA Study: The Analysis of Test Driven Development And Design Driven Test
A Study: The Analysis of Test Driven Development And Design Driven Test
 
Pm soln9416141129710
Pm soln9416141129710Pm soln9416141129710
Pm soln9416141129710
 
Indy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-muleIndy meetup#7 effective unit-testing-mule
Indy meetup#7 effective unit-testing-mule
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
Introducing Continuous Integration Using Vsts
Introducing Continuous Integration Using VstsIntroducing Continuous Integration Using Vsts
Introducing Continuous Integration Using Vsts
 
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINALJun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
Jun 08 - PMWT Featured Paper -Tarabykin - XP PAPER - FINAL
 
tem7
tem7tem7
tem7
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
 
Technical Debt.pptx
Technical Debt.pptxTechnical Debt.pptx
Technical Debt.pptx
 
Agile software development
Agile software development Agile software development
Agile software development
 
Behavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & JasmineBehavior Driven Development with AngularJS & Jasmine
Behavior Driven Development with AngularJS & Jasmine
 
Software Quality for Developers
Software Quality for DevelopersSoftware Quality for Developers
Software Quality for Developers
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
 
IS3242 Case Presentation
IS3242 Case PresentationIS3242 Case Presentation
IS3242 Case Presentation
 
Test-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate WorkplaceTest-Driven Development in the Corporate Workplace
Test-Driven Development in the Corporate Workplace
 
Cleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven DevelopmentCleaner Code Through Test-Driven Development
Cleaner Code Through Test-Driven Development
 
Data Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsData Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps Fundamentals
 
Develop, deploy, and operate services at reddit scale oscon 2018
Develop, deploy, and operate services at reddit scale   oscon 2018Develop, deploy, and operate services at reddit scale   oscon 2018
Develop, deploy, and operate services at reddit scale oscon 2018
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

Test driven development (TDD) in product development.pdf

  • 1. TDD in Product Development Beroza Paul Sr. software engineer
  • 2. Truth about Software Product Development ● Industry average experience is about 1-25 bugs per 1000 lines of code for delivered software. ● 7-12 bugs per 1,000 lines of code find their way to the customers ● Fixing a bug takes 30 times longer than writing a line of code ● 75% of a developer’s time is spent on debugging (1500 hours a year!) Source: Code Complete by Steve McConnell
  • 3. Production Bug is Expensive! ● Fixing a production bug may cost 100x more than fixing a bug at design time. ● Fixing a production bug may cost 15x more than fixing a bug at implementation time. Source: The Economics of Software Quality
  • 4. Relative Costs of Fixing Bugs
  • 5. How to reduce this cost?
  • 6. Facts of Production Bug ● Most production bugs caused by simple programming mistakes ● 58% of them are trivial and can be addressed with test coverage ● Tiny mistakes will have huge impact on production
  • 7. How to reduce trivial bugs?
  • 10. TTD Reduces total cost? Source: The Economics of Software Quality
  • 11. TTD Results in Fewer Bugs? ● A case study of engineering teams at Microsoft and IBM showed that the defect density decreased between 40% and 90% relative to similar projects that did not use the TDD practice. Source: Quality improvements
  • 12. TDD Produces Better Quality? ● A study carried out among developers with 10+ years of professional experience (on average), to investigate their perceptions when employing TTD. Many of them agreed that “TDD allows greater quality and maintainability” Source: TDD analysis
  • 13. TDD Promotes Simpler Design? ● The Department of Computer Science at North Carolina State University, ran an experiment with two groups of programmers: one used TDD and the other the linear approach. ● It turned out that “92% of developers believed that TDD yields higher quality code, 79% thought that TDD promotes simpler design. Source: TDD investigation
  • 14. When TDD is wrong choice?
  • 15. Developing GUI With TDD ● Trying to test the exact placement of UI components is pointless. First because layout is subjective and should be "tested" by humans
  • 16. TDD experience in team ● An enthusiastic team and at least one experienced developer who knows how to write good tests and also knows a few things about good architecture, otherwise think twice before going down the TDD road.
  • 17. TDD slows down initial process ● If you’re pressed for time and need to quickly launch your product or solution, the TDD approach may not be your best choice
  • 18. Test Code Requires Maintenance ● All lines of code require maintenance, which means cost. The cost is easiest to acknowledge when a change to existing functionality is made.
  • 19. TDD approach is difficult ● In TDD we need mocks/stubs etc. When we start using mocks, after a while, we will want to start using Dependency Injection (DI) and a Inversion of Control (IoC) container. To do that you need to use interfaces for everything. At the end we end up writing lot more code.