What we’ll do is called pair
programming.
Two people work together
in roles of driver and navigator.
This
practice is becoming more and more popular in industry.
Colleges are starting to use it and it
wouldn’t surprise me if you were asked about it at a job interview.
This exercise will be a small head start. It
has been found that two people working together like this can often get more
done than two people working apart.
Here are some general guidelines.
The driver uses the keyboard and mouse to enter the code, explaining what’s going
on and reacting to what the navigator says.
While the driver works on details, the navigator thinks about the larger
issues.
For instance, that a function
call doesn’t have enough arguments or that a particular variable name might be
better.
The navigator watches for typos
and other problems.
If someone needs to
figure out some strange syntax or look up a library function, it is the
navigator so that the driver can keep on entering code.
The navigator is not supposed to do
this: