Defining pair programming
When we are writing code, we are used to being alone, in front of a computer. As you saw in the previous chapter, we can also work in a different way, not just alone. In order to work together, we need to define pair programing and the roles associated with it.
This section will focus on the roles (or call them hats) of pair programming, namely driver and navigator. You might also have the role of a trainer or facilitator when you're doing this for the first time. Let's see what each of these roles entails.
Driver
The driver is the one who will have their hands on the keyboard and be writing the code. All the implementation details are at the latitude of the driver. Small decisions such as what type of variable to use, which programming language construct to use, how to name variables, methods, functions, classes, packages, and so on are a part of the driver's role.
The driver usually explains to the navigator what they are doing...