SlideShare a Scribd company logo
1 of 16
Agenda
• Goals of the session
• Benefits
• Preparation
• Do’s
• Introduction to TDD
• Kata
• Don’t do’s
• Learning resources
• Questions and Answers
Goals
• Learning to collaborate
• Practice a technique for paired programming
• Introduction to TDD
• Retrospect on don’t do’s of paired
programming
Why Paired Programming?
What would you need?
• Technique
• Machine setup
• Lots of patience and willingness to collaborate
Do’s
• Let the partner express idea fully
• Be willing to try parter’s idea
• Provide feedback during the participation
• Code when its your turn
• Show persistence and patience
TDD - Test Driven Development
What Is TDD?
• Test-driven development (TDD) is a software development process
that relies on the repetition of a very short development cycle.
• TDD process defines codebase tests that drive what code you write
TDD - Test Driven Development
How to TDD?
Add test: before any code is written, an automated test is created that takes into account all
the possible inputs, outputs and error conditions.
Run test: the test is run for the first time. The test will fail because this is simply because no
code yet exists to satisfy the test.
Write code: the code is written, or improved to overcome any identified failings. This process
can be repeated until the test is passed.
Re-factor: once the test is passed, the code can be cleaned, or ‘re-factored’. As long as the
code continues to pass the test, the code works. This allows the code to be improved while
eliminating concerns that any changes might introduce bugs.
Repeat: the whole process is repeated.
TDD - Test Driven Development
Why TDD?
• Confident about meeting acceptance criteria
• Writing the tests first requires you to really consider what do you want from the code.
• TDD creates code that is maintainable, flexible, and easily extensible and there are
fewer Bugs
• The development time to market is shorter.
• You are able to identify the errors and problems quickly.
• TDD tells you whether your last change (or refactoring) broke previously working
code.
• TDD creates a detailed specification of the code
Unit Test and JUnit Framework
A unit test is a piece of code written by a developer that executes a specific
functionality in the code to be tested and asserts a certain behavior or state.
A unit test targets a small unit of code, e.g., a method or a class.
• assertTrue
• AssertThat
• AssertEquals
Pairing & TDD in action
Watch Pairing and TDD in action
- Check if a number is an even number
- Session number nVCAwh
Pair and TDD
FizzBuzz Coding Exercise:
1) If a number is a multiple of 3 write Fizz
2) If a number is a multiple of 5 write Buzz
3) If a number is a nultiple of 3 and 5 write FizzBuzz
• To Do:
1. With your pair partner talk about the test
scenarios
2. Write your first test
3. Pair partner writes code implementation
Lets practice
• Go to your browser
• http://cyber-dojo.org
• Click on Join a session
• Session id = mFAYuS
•
Retrospective
1. What did you learn from your partner?
2. What did you learn about yourself that you
can improve upon next time?
Don’ts
• Express your superiority
• Never back down
• Watch silently
• Code silently
• Betray trust
• Dominate keyboard
• Win
Resources
• Plural sight course -
• Paired programming workshops by Bob Allen -
Connect with us
• Collaboration between team -
https://it2.spt.ford.com/sites/SDM/FAF/Pages/R
oles/ProductManagerOverview.aspx
• Blog by Bob Allen -
https://thehubat.ford.com/thread/14523

More Related Content

What's hot

2 testing throughout software lifecycle
2 testing throughout software lifecycle2 testing throughout software lifecycle
2 testing throughout software lifecycleAsmaa Matar
 
Azure DevOps CI/CD For Beginners
Azure DevOps CI/CD  For BeginnersAzure DevOps CI/CD  For Beginners
Azure DevOps CI/CD For BeginnersRahul Nath
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101Hazzim Anaya
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 
Refine your ci:cd pipeline with automated test
Refine your ci:cd pipeline with automated testRefine your ci:cd pipeline with automated test
Refine your ci:cd pipeline with automated testMalang QA Community
 
SRE-iously! Reliability!
SRE-iously! Reliability!SRE-iously! Reliability!
SRE-iously! Reliability!New Relic
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Red Gate Software
 
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...Edureka!
 
Database in DevOps
Database in DevOpsDatabase in DevOps
Database in DevOpsEdward Kuo
 
SRE 101 (Site Reliability Engineering)
SRE 101 (Site Reliability Engineering)SRE 101 (Site Reliability Engineering)
SRE 101 (Site Reliability Engineering)Hussain Mansoor
 
CI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, StageCI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, StageArtur Basak
 

What's hot (20)

CI/CD
CI/CDCI/CD
CI/CD
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
2 testing throughout software lifecycle
2 testing throughout software lifecycle2 testing throughout software lifecycle
2 testing throughout software lifecycle
 
DevOps introduction
DevOps introductionDevOps introduction
DevOps introduction
 
Azure DevOps CI/CD For Beginners
Azure DevOps CI/CD  For BeginnersAzure DevOps CI/CD  For Beginners
Azure DevOps CI/CD For Beginners
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Refine your ci:cd pipeline with automated test
Refine your ci:cd pipeline with automated testRefine your ci:cd pipeline with automated test
Refine your ci:cd pipeline with automated test
 
SRE-iously! Reliability!
SRE-iously! Reliability!SRE-iously! Reliability!
SRE-iously! Reliability!
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
 
DevOps & SRE at Google Scale
DevOps & SRE at Google ScaleDevOps & SRE at Google Scale
DevOps & SRE at Google Scale
 
Integración Continua
Integración ContinuaIntegración Continua
Integración Continua
 
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
Introduction to DevOps Tools | DevOps Training | DevOps Tutorial for Beginner...
 
Database in DevOps
Database in DevOpsDatabase in DevOps
Database in DevOps
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
SRE 101 (Site Reliability Engineering)
SRE 101 (Site Reliability Engineering)SRE 101 (Site Reliability Engineering)
SRE 101 (Site Reliability Engineering)
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Static Testing
Static TestingStatic Testing
Static Testing
 
DevOps and Cloud
DevOps and CloudDevOps and Cloud
DevOps and Cloud
 
CI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, StageCI, CD, CT, Deploy, IaaS, DevOps, Stage
CI, CD, CT, Deploy, IaaS, DevOps, Stage
 

Similar to Pair programming and introduction to TDD

Android tdd
Android tddAndroid tdd
Android tddNhan Cao
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentbhochhi
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference CardSeapine Software
 
Kata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipCamille Bell
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Jason Tice
 
Tdd practices
Tdd practicesTdd practices
Tdd practicesaxykim00
 
Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Malinda Kapuruge
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentMeilan Ou
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionPyxis Technologies
 
Test driven development : software process
Test driven development : software process Test driven development : software process
Test driven development : software process Amin Taheri
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012Pietro Di Bello
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingSahar Nofal
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGegoodwintx
 

Similar to Pair programming and introduction to TDD (20)

Android tdd
Android tddAndroid tdd
Android tdd
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Kata Your Way to SW Craftsmanship
Kata Your Way to SW CraftsmanshipKata Your Way to SW Craftsmanship
Kata Your Way to SW Craftsmanship
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
 
Tdd red-green-refactor
Tdd red-green-refactorTdd red-green-refactor
Tdd red-green-refactor
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Tdd practices
Tdd practicesTdd practices
Tdd practices
 
Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
TDD talk
TDD talkTDD talk
TDD talk
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Tdd
TddTdd
Tdd
 
Test driven development : software process
Test driven development : software process Test driven development : software process
Test driven development : software process
 
Tdd
TddTdd
Tdd
 
TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012TDD reloaded - JUGTAA 24 Ottobre 2012
TDD reloaded - JUGTAA 24 Ottobre 2012
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Unit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUGUnit Testing in R with Testthat - HRUG
Unit Testing in R with Testthat - HRUG
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 

Pair programming and introduction to TDD

  • 1. Agenda • Goals of the session • Benefits • Preparation • Do’s • Introduction to TDD • Kata • Don’t do’s • Learning resources • Questions and Answers
  • 2. Goals • Learning to collaborate • Practice a technique for paired programming • Introduction to TDD • Retrospect on don’t do’s of paired programming
  • 4. What would you need? • Technique • Machine setup • Lots of patience and willingness to collaborate
  • 5. Do’s • Let the partner express idea fully • Be willing to try parter’s idea • Provide feedback during the participation • Code when its your turn • Show persistence and patience
  • 6. TDD - Test Driven Development What Is TDD? • Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle. • TDD process defines codebase tests that drive what code you write
  • 7. TDD - Test Driven Development How to TDD? Add test: before any code is written, an automated test is created that takes into account all the possible inputs, outputs and error conditions. Run test: the test is run for the first time. The test will fail because this is simply because no code yet exists to satisfy the test. Write code: the code is written, or improved to overcome any identified failings. This process can be repeated until the test is passed. Re-factor: once the test is passed, the code can be cleaned, or ‘re-factored’. As long as the code continues to pass the test, the code works. This allows the code to be improved while eliminating concerns that any changes might introduce bugs. Repeat: the whole process is repeated.
  • 8. TDD - Test Driven Development
  • 9. Why TDD? • Confident about meeting acceptance criteria • Writing the tests first requires you to really consider what do you want from the code. • TDD creates code that is maintainable, flexible, and easily extensible and there are fewer Bugs • The development time to market is shorter. • You are able to identify the errors and problems quickly. • TDD tells you whether your last change (or refactoring) broke previously working code. • TDD creates a detailed specification of the code
  • 10. Unit Test and JUnit Framework A unit test is a piece of code written by a developer that executes a specific functionality in the code to be tested and asserts a certain behavior or state. A unit test targets a small unit of code, e.g., a method or a class. • assertTrue • AssertThat • AssertEquals
  • 11. Pairing & TDD in action Watch Pairing and TDD in action - Check if a number is an even number - Session number nVCAwh
  • 12. Pair and TDD FizzBuzz Coding Exercise: 1) If a number is a multiple of 3 write Fizz 2) If a number is a multiple of 5 write Buzz 3) If a number is a nultiple of 3 and 5 write FizzBuzz • To Do: 1. With your pair partner talk about the test scenarios 2. Write your first test 3. Pair partner writes code implementation
  • 13. Lets practice • Go to your browser • http://cyber-dojo.org • Click on Join a session • Session id = mFAYuS •
  • 14. Retrospective 1. What did you learn from your partner? 2. What did you learn about yourself that you can improve upon next time?
  • 15. Don’ts • Express your superiority • Never back down • Watch silently • Code silently • Betray trust • Dominate keyboard • Win
  • 16. Resources • Plural sight course - • Paired programming workshops by Bob Allen - Connect with us • Collaboration between team - https://it2.spt.ford.com/sites/SDM/FAF/Pages/R oles/ProductManagerOverview.aspx • Blog by Bob Allen - https://thehubat.ford.com/thread/14523

Editor's Notes

  1. 1. Talk about collaboration between non developer folks on the team and developers. 2. Talk about importance of learning using practice. So practice one technique – ping - pong 3. TDD - think about test first and think about smallest thing you can do to make the test pass 4. Don’t dos - identify the things that you did which you could improve upon during next paired programming experience 5. Learning resources 6. See us after the session or during next sessions