Pair programming is a technique in which two programmer works as team in which one programmer writes code and other one reviews that code. They both can switch their roles.
Benefits:
- Improved code quality: As second partner reviews the code simultaneously, it reduces the chances of mistake.
- Knowledge transfer is easy: One experience partner can teach other partner about the techniques and codes.