SlideShare a Scribd company logo
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

PPTX
Sanity testing and smoke testing
PPT
PPTX
White Box Testing And Control Flow & Loop Testing
PDF
What Is Functional Testing?
PPTX
Introduction to DevOps
PPTX
Test-Driven Development
PPTX
functional testing
PPTX
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Sanity testing and smoke testing
White Box Testing And Control Flow & Loop Testing
What Is Functional Testing?
Introduction to DevOps
Test-Driven Development
functional testing
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...

What's hot (20)

PPTX
Software testing
PPTX
Introduction to java
PPTX
Object oriented testing
PPT
Basic software-testing-concepts
PPTX
SonarQube: Continuous Code Inspection
PDF
Test Automation Trends and Beyond
PPTX
Threading in C#
PDF
How to implement DevOps in your Organization
PPTX
Appium.pptx
PPT
Software Quality Assurance
PPTX
PPTX
DevOps and Tools
PDF
C++ Unit Test with Google Testing Framework
PPTX
Testing of React JS app
PPT
Testing fundamentals
PPTX
Software testing life cycle
PPTX
DevOps Architecture Design
PDF
STLC (Software Testing Life Cycle)
PPTX
Event and signal driven programming
ZIP
Continuous Integration, Build Pipelines and Continuous Deployment
Software testing
Introduction to java
Object oriented testing
Basic software-testing-concepts
SonarQube: Continuous Code Inspection
Test Automation Trends and Beyond
Threading in C#
How to implement DevOps in your Organization
Appium.pptx
Software Quality Assurance
DevOps and Tools
C++ Unit Test with Google Testing Framework
Testing of React JS app
Testing fundamentals
Software testing life cycle
DevOps Architecture Design
STLC (Software Testing Life Cycle)
Event and signal driven programming
Continuous Integration, Build Pipelines and Continuous Deployment
Ad

Similar to Pair programming and introduction to TDD (20)

PPTX
Tdd and bdd
PPTX
Android tdd
PPTX
Test Driven Development
PPTX
Test Driven Development
PDF
Test-Driven Development Reference Card
PDF
Kata Your Way to SW Craftsmanship
PDF
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
PDF
Tdd red-green-refactor
PDF
Test Driven Development
PDF
Tdd practices
PPTX
Understanding TDD - theory, practice, techniques and tips.
PPTX
Test-Driven Development
PPTX
TDD talk
PPT
Test Driven Development
PPT
Test Driven Development - Overview and Adoption
PDF
Test driven development : software process
PDF
TDD reloaded - JUGTAA 24 Ottobre 2012
PPTX
An Introduction to Unit Testing
Tdd and bdd
Android tdd
Test Driven Development
Test Driven Development
Test-Driven Development Reference Card
Kata Your Way to SW Craftsmanship
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Tdd red-green-refactor
Test Driven Development
Tdd practices
Understanding TDD - theory, practice, techniques and tips.
Test-Driven Development
TDD talk
Test Driven Development
Test Driven Development - Overview and Adoption
Test driven development : software process
TDD reloaded - JUGTAA 24 Ottobre 2012
An Introduction to Unit Testing
Ad

Recently uploaded (20)

PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
MIND Revenue Release Quarter 2 2025 Press Release
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Review of recent advances in non-invasive hemoglobin estimation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The AUB Centre for AI in Media Proposal.docx

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

  • #3: 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