Does your team always pair or review with the same people? When pairings settle into a pattern, only a few people understand certain parts of the code, and the team struggles when they're out. This article covers how to assign pair programming partners and code reviewers without lopsided patterns.

It's natural for senior engineers, or friends, to pair with each other. Left alone, though, knowledge collects in a few people and new hires end up isolated. The bus factor (how many people could leave before work stops) stays low.
When you post "Can someone review this?", the quickest responder takes it every time. Seniors carry the load, and new hires never get to read other people's code.
In the office you can just start with the person next to you, but remotely even asking someone feels like an imposition. Without a system, people keep pairing with the same partner.
Change pairs each week so everyone works with everyone over a set period. Weekly for five people or fewer and every two weeks for ten or more is a reasonable guide.
Pairing senior with junior, or frontend with backend, moves knowledge around. Keep a list of each person's strengths and the areas they want to grow, and it becomes easy to match, say, someone who knows infrastructure with someone who wants to learn it.
When every pairing follows rules, the combinations become predictable. Decide the pairs that need a specific partner first, such as for difficult tasks, and draw lots for the rest.
Record review counts and pairing history, and check each week that the work isn't piling up on a few people. Write the rules in the team wiki or similar so anyone can read them.
First, set the pairs that should be matched by skill. Draw lots for the remaining members with Amida-san. Add outcomes such as "A1," "A2," "B1," and "B2," and have each person join by drawing their rungs. A1 and A2 become a pair, as do B1 and B2. Post the pairs in the team chat.

GitHub and GitLab have features that assign reviewers automatically. If you can't use them, track review counts in a spreadsheet and assign whoever has the fewest. Once a week, have someone review code they don't usually touch, and more people will understand more of the codebase.
Use a tool that shares the screen and the editor, such as VS Code Live Share. Keep sessions to about 25 to 50 minutes, and switch the person writing code (driver) and the person directing (navigator) every 15 minutes so both stay hands-on.
Two people on one task looks slower in the short term. Try it for a single sprint, check as a team how rework and review time changed, and then decide whether to continue.
Some people prefer to focus alone. Don't force it. Offer options, such as alternating pairing weeks and solo weeks, or making pairing recommended rather than required.
With five people or fewer, the rotation cycles through quickly. Pair less often, or pair with a neighboring team.
Rotation, drawing lots for part of the team, and tracking counts keep pairs and reviewers from settling into fixed patterns. If the team worries about speed, try it for one sprint and check together how rework and review time changed.
Experience fair and transparent drawing with our simple and easy-to-use online ladder lottery tool.