# Pair Programming

## Connection - 10'

* In solo, list all the pros and cons of Pair Programming
* Share with the rest of the group

![](/files/-MRjG4YopxNoD9xlduSE)

## Concepts - 20'

* Watch this [video](https://www.youtube.com/watch?v=ET3Q6zNK3Io)
  * Ask them what they have seen
  * What are the other pros and cons explained
* Be sure that everyone has understood the roles : Drive / Navigator

| Pros                                            | Cons                 |
| ----------------------------------------------- | -------------------- |
| Instantly shared best practices / knowledge     | Tiring               |
| Improved design / code quality (fewer mistakes) | Can create frictions |
| Faster on-boarding                              |                      |
| Increase moral / confidence                     |                      |
| Increase team cohesion / collective ownership   |                      |
| Instant code reviews                            |                      |

* Pair programming is not 1 person sleeping and only one working.

![](/files/-MRjGXpK_gm_t5PldLZ3)

### Different styles

![](/files/-MRjHN9YjWehINkZDY4p)

![](/files/-MRjHY7PoRfLD8Gz0z5j)

![Ping pong when doing TDD](/files/-MRjH_gIK9EmeddYFB0J)

### What about the cost of Pair Programming ?

* The Costs and Benefits of Pair Programming Alistair Cockburn & Laurie Williams
  * The development cost is approximately 15% higher
  * BUT this is repaid in :
    * Shorter and less expensive testing
    * Higher quality assurance
    * Less field support

![](/files/-MRjHyIJ9rrmv3iUa0PV)

## Concrete Practice - Create your check-list - 20'

* Think about key factors to make successful pair programming sessions
* Create a check-list

### Example of check-list :

* [ ] Communicate – without violence
  * To propose an idea : “I think...”&#x20;
  * To confirm agreement : “Do we agree...”&#x20;
  * To discuss progress towards goals : “We agree...”&#x20;
  * Avoid saying “No” / ”But”
    * Instead try saying, “Yes and...”&#x20;
  * Ask “What would it take to get you in..” if you’re disagree about a proposed idea&#x20;
* [ ] Talk / listen a lot
* [ ] Switch roles often
* [ ] Take breaks / Disconnect
* [ ] Chit chat when there is friction

## Conclusion - 5'

### How to start in your team ?

![Pair Programming Matrix from Jimmy Janlen](/files/-MRjIFCg8RbcSivz5Z4D)

* WHY ?
  * To do more pair programming
  * Visualize how much you pair during a week/sprint
* HOW ?
  * Whenever you’ve done a pairing session, make a tick in the corresponding box


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://yoan-thirion.gitbook.io/knowledge-base/software-craftsmanship/practices/pair-programming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
