Start driving, work for 30 minutes without distraction, switch your role with the navigator. Navigate for another 30 minutes without distraction, take a break. Repeat.
Driver role must turn every 30 minutes. You can not change turn only because you know that part of code better than the current driver. As a navigator, you always talk to the driver about what is in your head. If the driver fails to understand what you want, you could ask to take control, but only temporary. This does not mean switching control. You will help the driver and return the control to the driver.
The cycle is inspired by the Pomodoro technique and you will have all its benefits. This cycle helps the driver to not get tired and help the navigator to not get bored. And it will make sure pairs contribute equally which eventually help you to achieve all pair programming benefits (ex. Effective knowledge sharing).
Always ask to take/give control. You never start using your keyboard/mouse even if the driver is not using his keyboard/mouse at the moment. Frequent interrupting is a big frustration for the driver.
Taking control is the last option for the navigator. You do it only when the driver can’t understand what is in the navigator’s head or navigator fails to explain it.
Note 1: If you are doing too many short switches, and it is not decreasing over time, it is likely that there is something wrong with your communication.
Note 2: If an expert takes control in the same step/thing over and over, there is something wrong with knowledge sharing.
Switching driver is important to keep pairing productive. Even if it’s expert-novice, you must switch driver every 30 minutes.
Same as taking control, you always ask for switching driver. As driver or navigator, you can always remind your pair when it’s time to switch driver.
Repeat these two steps:
- Start pair programming and after a two-time switch, take a short break (5 minutes)
- Start working again and after another two-time switch, take a long break (15 minutes)
These steps designed to make sure it’ll move both pairs between focused and diffuse modes.
Being punctual is important; your pair can't sit and wait for you after finishing his short-break. If you need more time for any reason, try to schedule it for your long break and let your pair know about it earlier. Make the decision together so if your pair has something important to do he or she can also sync it with you.
Note: When you switch your role as driver to the navigator, it doesn't mean that you are on break time. Navigator will use his full attention to the work and probably his/her brain will be more productive than the driver.
The navigator must know what is in your mind or what you are going to do. Talk before doing. You will learn it with more practice.
Navigator has more capacity to identify mistakes or suggest solutions. Not thinking out load means the navigator has to use his capacity to follow and understand what you are doing. If the expert is driving, the novice navigator has a better chance to learn when the driver is thinking out loud. Otherwise, the navigator has to make assumptions. Thinking out load also means less unnecessarily questions from the navigator.
The navigator may remind the driver to think out loud if he/she is not doing that.
As the role suggests, the navigator is the brain to review, find issues, and help to solve problems. Possibly because you are not spending some of your brain's capacity into typing and controlling, you do a better job at verifying and giving direction or finding solutions.
Keep your focus into code. If the driver is doing a poor job and not explaining himself, it is your responsibility to remind him and challenge him by asking questions. Make sure you understand what he/she is doing. Ask for an extra explanation if necessary.
The driver always makes sure that the navigator is following his work.
It must be easy for your pair to follow you. One of the mistakes that often drivers do is fast switching between applications. For instance, usually, the expert has trained eyes to read a window full of project’s logs. In this case, the expert must point it to the novice by highlighting or moving the cursor.
As a driver, while pairing, You are in pair programming profile, and it is a shared station now. You cannot click on Slack’s notifications or chat with a friend. It kills the navigator’s focus. You postpone other stuff, and you do not review unrelated work or pull requests. Unless you agree to do it together.
As a navigator, while pairing, You should not play with your phone, even if the driver is doing routine work. You don’t start a conversation with someone else. The driver will stop thinking out loud if he/she lose your attention.
Don’t interrupt the driver if it is not necessarily. Be patient like a co-driver in a rally car. Do not give stress or unnecessary noise to the driver. Simply don’t be the old man trying to teach how to drive to his sun.
Remind each other when necessary. You will get better at doing it with more practice.