Pair Programming
Learning Competencies
Be comfortable:
- taking time to check in with another person before coding together
- understanding how to use pair programming effectively
Time Box
Challenge | Time |
---|---|
Explore | 20 minutes |
Reflect | 10 minutes |
Overview
Pair programming is an agile software development technique in which two programmers work as a pair together on one workstation. One, the driver, writes code while the other, the navigator, focuses on the bigger picture and spots mistakes.
Together, the programmers help each other hold strong attention to the task. It is a simple but very effective tool.
Resources
- Pair Programming - Fiona and Semira @ Generation Code (Video). Their video may seem silly, but the points they touch are very important, and we see the pitfalls they highlight happening on the course all the time.
- Codr.tv - Pair Programming (Video)
When pairing
- First, check-in with your pair
- How did you sleep?
- How do you feel now?
- How comfortable do you feel with the code you are about to do?
- Is there anything going on in your life that might affect how you are working?
- Assign roles (driver vs navigator)
- Keep a timer to monitor how long you have been in a certain role and switch roles during coding
- Do your best to explain your thinking in a clear, concise manner
- Listen to your pair and keep an open mind to their ideas
Environment
The options we've found for pairing (in order of effectiveness) are:
- Pair in person - arrange a time to meet up somewhere.
- Video call* + working collaboratively using online multi-user services (such as repl.it multiplayer).
- Video call* + screen share.
If you can't meet up in person and don't have adequate internet connection for options 2 or 3, you won't have good communication lines to pair program. Instead, you can get some of the benefits with:
- Phone call and Discord message to discuss approaches, ideas and issues.
- Share pseudocode and code on Discord or via GitHub.
Reflect
Open your my-reflections-sprint-5.md
file in VS Code and add your reflection from this challenge under Pair Programming
.
Commit and push to GitHub.
Stretch
You might like to pair up with someone from your cohort and have a go at the JS Calculator exercise.