370 lines
6.4 KiB
Markdown
370 lines
6.4 KiB
Markdown
---
|
||
id: quality-pair-programming
|
||
title: Pair Programming — Driver / Navigator / Remote
|
||
category: Coding
|
||
status: draft
|
||
source_trust_level: B
|
||
verification_status: conceptual
|
||
created_at: 2026-05-09
|
||
updated_at: 2026-05-09
|
||
tags: [quality, pair-programming, vibe-coding]
|
||
tech_stack: { language: "Process", applicable_to: ["Engineering"] }
|
||
applied_in: []
|
||
aliases: [pair programming, mob programming, ensemble, driver navigator, pairing tools]
|
||
---
|
||
|
||
# Pair Programming
|
||
|
||
> 둘이 한 keyboard. **Code quality + knowledge transfer + 학습**. Driver/Navigator + remote (VSCode Live Share / Tuple). 큰 / 복잡 / 새 영역 효과적.
|
||
|
||
## 📖 핵심 개념
|
||
- Driver: 키보드 + 작은 step.
|
||
- Navigator: 큰 그림 + review.
|
||
- Swap: 매 15-20 min.
|
||
- Mob: 3+ 명 (Ensemble).
|
||
|
||
## 💻 코드 패턴
|
||
|
||
### 시작 ritual
|
||
```
|
||
1. 목표 합의 ("왜 pair?")
|
||
2. Time box (1-2 hour)
|
||
3. Driver 정함
|
||
4. 시작
|
||
```
|
||
|
||
### Driver / Navigator 책임
|
||
```
|
||
Driver:
|
||
- 입력 (keyboard)
|
||
- Implementation 의 작은 step
|
||
- Naming / 작은 결정
|
||
|
||
Navigator:
|
||
- 다음 step 생각
|
||
- "여기서 X 가 빠짐"
|
||
- Edge case 발견
|
||
- Quality / pattern
|
||
```
|
||
|
||
### Strong-style pairing (Llewellyn Falco)
|
||
```
|
||
"For the idea to go from your head into the keyboard,
|
||
it must go through someone else's hands."
|
||
|
||
Navigator 가 의도 → Driver 가 implement.
|
||
역할 swap 없이.
|
||
|
||
→ Pure transfer.
|
||
```
|
||
|
||
### Ping-pong (TDD)
|
||
```
|
||
1. A: red test
|
||
2. B: green code
|
||
3. B: red test
|
||
4. A: green code
|
||
...
|
||
|
||
→ TDD + pair.
|
||
둘 다 active engagement.
|
||
```
|
||
|
||
### Swap rate
|
||
```
|
||
15-20 min: 일반.
|
||
5 min: rapid (작은 task).
|
||
30+ min: 1 명 dominant — bad.
|
||
|
||
→ Pomodoro 같은 timer.
|
||
```
|
||
|
||
### Mob programming (3+ 명)
|
||
```
|
||
1 keyboard, 모두 watching.
|
||
매 5-10 min driver swap.
|
||
Whole team learning.
|
||
|
||
→ 주로 1 day / week.
|
||
```
|
||
|
||
### When to pair
|
||
```
|
||
✅ 새 feature design
|
||
✅ 복잡 bug
|
||
✅ Junior onboarding
|
||
✅ Production 위험 변경
|
||
✅ 새 기술 학습
|
||
✅ Critical refactor
|
||
|
||
❌ 단순 작업
|
||
❌ 둘 다 모름
|
||
❌ 둘 다 피곤
|
||
❌ Personality conflict
|
||
```
|
||
|
||
### Remote pair tools
|
||
```
|
||
1. VS Code Live Share — built-in
|
||
2. Tuple — Mac, low-latency
|
||
3. Pop / CodeTogether
|
||
4. Jetbrains Code With Me
|
||
5. Zoom screen share + voice (basic)
|
||
```
|
||
|
||
### VS Code Live Share
|
||
```
|
||
Host:
|
||
- Cmd+Shift+P → "Live Share: Start"
|
||
- Share link
|
||
|
||
Guest:
|
||
- Click link
|
||
- Same files / cursor / debug
|
||
|
||
→ Free + 통합.
|
||
```
|
||
|
||
### Tuple (Mac, paid, best UX)
|
||
```
|
||
- Low-latency screen
|
||
- Both keyboards
|
||
- Voice clear
|
||
- "Shoulder tap"
|
||
|
||
→ Real-time pair feel.
|
||
```
|
||
|
||
### Audio quality (critical)
|
||
```
|
||
- Mic 좋음 + headphone (echo cancel)
|
||
- 조용한 환경
|
||
- Voice clear
|
||
|
||
→ Cheap mic = friction.
|
||
```
|
||
|
||
### Etiquette
|
||
```
|
||
1. Listening over talking
|
||
2. "Yes and..." over "no"
|
||
3. Frequent driver swap
|
||
4. Break (Pomodoro)
|
||
5. 한 명 dominate X
|
||
6. Personal preference 의견 X (fact / pattern)
|
||
```
|
||
|
||
### When pair fails
|
||
```
|
||
신호:
|
||
- 한 명 만 talk
|
||
- Silence (장시간)
|
||
- Frustration
|
||
- "Just let me do it"
|
||
|
||
해결:
|
||
- Take break
|
||
- Reset goal
|
||
- Try strong-style
|
||
- 또는 split + sync later
|
||
```
|
||
|
||
### Pair fatigue
|
||
```
|
||
Pair = 정신 강도 높음.
|
||
2-4 hour / day max.
|
||
|
||
→ Solo time + pair time mix.
|
||
```
|
||
|
||
### Junior + Senior pair
|
||
```
|
||
Junior driver = 학습.
|
||
Senior 가 patient — guide question.
|
||
|
||
"What if X?"
|
||
"What error case 가 있을까?"
|
||
|
||
→ 답 X — 질문.
|
||
```
|
||
|
||
### Junior + Junior pair
|
||
```
|
||
둘 다 새 시도 — 위험.
|
||
|
||
해결:
|
||
- Senior available (ask)
|
||
- 작은 task
|
||
- Frequent commit + review
|
||
```
|
||
|
||
### Senior + Senior pair
|
||
```
|
||
복잡 / critical task.
|
||
빠른 상호 review.
|
||
큰 architectural decision.
|
||
|
||
→ Most efficient pair.
|
||
```
|
||
|
||
### Pair vs solo
|
||
```
|
||
Pair:
|
||
+ Quality (built-in review)
|
||
+ Knowledge sharing
|
||
+ 학습
|
||
- 2x time (단순 task)
|
||
- Energy intensive
|
||
|
||
Solo:
|
||
+ Deep focus
|
||
+ Faster (단순)
|
||
- Knowledge silo
|
||
- No real-time review
|
||
```
|
||
|
||
→ Mix.
|
||
|
||
### Hybrid: pair design + solo implement
|
||
```
|
||
30 min pair: design + interface.
|
||
2 hour solo: implementation.
|
||
30 min pair: review + integrate.
|
||
|
||
→ Pair 의 가치 + solo 의 효율.
|
||
```
|
||
|
||
### Code review vs pair
|
||
```
|
||
Pair: real-time, learn together.
|
||
Review: async, 더 깊은 think.
|
||
|
||
→ 다른 가치. 둘 다.
|
||
```
|
||
|
||
### Mob programming benefit
|
||
```
|
||
- 모두 학습
|
||
- 모두 ownership
|
||
- Knowledge sharing 강
|
||
- Bus factor 0
|
||
|
||
비용:
|
||
- 5 명 × 4 hour = 20 hour
|
||
- Single output
|
||
```
|
||
|
||
→ 학습 prioritize 시 가치.
|
||
|
||
### Ensemble (modern mob)
|
||
```
|
||
모든 팀이 1 task on 1 keyboard.
|
||
"Driver doesn't think, navigator doesn't type."
|
||
Swap 매 4 min.
|
||
|
||
→ Woody Zuill 가 popularize.
|
||
매일 / 매주 1 day.
|
||
```
|
||
|
||
### Pair manifesto / norms
|
||
```
|
||
1. We commit to pair (둘 다 attention)
|
||
2. We keep it small (작은 step)
|
||
3. We rotate driver (15-20 min)
|
||
4. We respectful disagree
|
||
5. We celebrate solutions
|
||
```
|
||
|
||
→ Team agreement.
|
||
|
||
### Async pair (timezones)
|
||
```
|
||
Code share + comment / video:
|
||
- 1 person 가 work + record
|
||
- 2 person 가 watch + comment
|
||
- Sync briefly daily
|
||
|
||
→ Imperfect but possible.
|
||
```
|
||
|
||
### Track pair time
|
||
```
|
||
- Whose pair? (week 별)
|
||
- 어떤 task?
|
||
- 효과?
|
||
|
||
→ 정기 retro.
|
||
```
|
||
|
||
### Pair 가 productivity (debate)
|
||
```
|
||
Pair:
|
||
+ Output 가 less than 2x BUT
|
||
+ Quality higher
|
||
+ Learning faster
|
||
+ Bus factor lower
|
||
+ Less rework
|
||
|
||
→ Long-term productivity ↑.
|
||
```
|
||
|
||
### Pair onboarding (new hire)
|
||
```
|
||
Week 1: Pair with senior (mentor)
|
||
Week 2: Pair with peer
|
||
Week 3+: Mostly solo + occasional pair
|
||
|
||
→ Strong onboarding.
|
||
```
|
||
|
||
### Tools for pair-friendly
|
||
```
|
||
- Conventional naming (모두 이해)
|
||
- Comments (즉시 context)
|
||
- Small commits (clear progress)
|
||
- Test first (shared understanding)
|
||
- Monorepo (open code)
|
||
```
|
||
|
||
### Anti-pattern: silent pair
|
||
```
|
||
"같이 앉아있지만 묵묵부답"
|
||
= solo + 추가 person.
|
||
|
||
해결:
|
||
- 매 5 min "what are you thinking?"
|
||
- Strong-style force conversation
|
||
- Frequent swap
|
||
```
|
||
|
||
## 🤔 의사결정 기준
|
||
| 상황 | 추천 |
|
||
|---|---|
|
||
| Junior onboarding | Pair (senior + junior) |
|
||
| 복잡 bug | Pair |
|
||
| 새 feature design | Pair (또는 mob) |
|
||
| 단순 작업 | Solo |
|
||
| 큰 architecture | Mob |
|
||
| Critical security | Pair |
|
||
| Quick prototype | Solo |
|
||
|
||
## ❌ 안티패턴
|
||
- **한 명 dominate (90% time driver)**: 다른 사람 학습 X.
|
||
- **No swap**: fatigue + 한 perspective.
|
||
- **Silent pair**: solo + person.
|
||
- **Audio bad**: friction.
|
||
- **All-day pair**: burnout. 2-4 hour max.
|
||
- **Strong personality 매 day pair**: clash.
|
||
- **Pair 의 metric (output, line)**: 의미 없음.
|
||
|
||
## 🤖 LLM 활용 힌트
|
||
- 새 기술 / 복잡 = pair.
|
||
- 매 15-20 min swap.
|
||
- Tuple / Live Share remote.
|
||
- Strong-style 가 powerful.
|
||
|
||
## 🔗 관련 문서
|
||
- [[Quality_Mentoring]]
|
||
- [[Productivity_Code_Review]]
|
||
- [[Quality_Refactoring]]
|