- pair/peer programming - is a technique in which 2 programmers work together in one workstation:
- driver - writes the program
- observer/navigator - reviews each line of code typed in
- real-time code & design review -
Advantages
First of all, it’s a great way for seniors to mentor junior developers in the team:
- when code-reviewing:
- seniors get to show juniors what can be done better
- seniors may get a different perspective on how to solve a problem and why someone thinks that way
- when pairing:
- juniors get to see better ways of doing stuff, how experienced people think and even how to use the IDE better
- same with seniors
Also, it keeps the whole team in sync as far as knowing how the code looks.
And, furthermore, it simply increases everyone’s joy and personal development - a team that is capable of talking and reasoning about code is a better team, a team that keeps learning and sharing
Things to Watch Out For
- make sure seniors let juniors program at least half of the programming when pairing
- don’t let people pair on small tasks, usually wastes time
- watch how pairs get along (don’t force a pair together)
- remember to reshuffle the pairs every now and then
- don’t let reviews bee an ego match - don’t let people crush others
Pair Programming and Code Review - Between a Senior and Junior
pair programming
- doesn’t really work out
pair code-review
- reviewer gets a different perspective on how to solve a problem and why someone thinks that way
In this context, it is important for the senior not to give answer but to explain the problem and just the problem.