---
id: wiki-2026-0508-collaborative-programming
title: Collaborative Programming (Pair & Mob)
category: 10_Wiki/Topics
status: verified
canonical_id: self
aliases: [pair programming, mob programming, ensemble programming, driver-navigator, real-time collaboration]
duplicate_of: none
source_trust_level: A
confidence_score: 0.88
verification_status: applied
tags: [collaborative-programming, pair-programming, mob-programming, ensemble, agile, knowledge-transfer, code-review]
raw_sources: []
last_reinforced: 2026-05-10
github_commit: pending
tech_stack:
  language: process
  framework: Live Share / Tuple / Pop / Replit Multiplayer
---

# Collaborative Programming (Pair & Mob)

## 매 한 줄
> **"매 real-time review + 매 collective knowledge"**. 매 PR 의 lag 의 X — 매 instant. 매 pair (2) / mob (3+, ensemble). 매 modern: 매 LLM-aided pair (Cursor pair with AI). 매 AI 시대 의 still relevant — 매 design decision 의 human collective.

## 매 핵심

### Pair Programming

#### Driver-Navigator
- **Driver**: 매 keyboard, 매 tactical.
- **Navigator**: 매 strategic, 매 review.
- **Switch**: 매 5-25 분.

#### Ping-pong (TDD-paired)
- A 매 test, B 매 implement.
- 매 switch.

#### Strong-style
- "For an idea to go from your head into the computer, it MUST go through someone else's hands."
- → 매 navigator 의 thinking, 매 driver 의 typing 만.

### Mob (Ensemble) Programming
- 매 3+ developer + 매 1 keyboard.
- 매 매 short rotation (4-10 분).
- 매 모든 brain 의 active.
- 매 high-stakes / complex problem.

### 매 benefit
1. **Real-time review**: 매 0-lag.
2. **Knowledge transfer**: 매 senior 의 tacit.
3. **Reduced bus factor**.
4. **Onboarding**: 매 fast.
5. **Decision quality**.
6. **Less context switch** (one task focused).

### 매 cost
1. **Resource**: 매 N person 의 1 task.
2. **Fatigue**: 매 high cognitive load.
3. **Personality fit**.
4. **Remote 의 어려움** (overcomeable).
5. **Boring task 의 over-engineer 의 risk**.

### 매 effective use case

#### Pair
- Complex bug.
- New feature design.
- Onboarding (junior + senior).
- Cross-functional (frontend + backend).
- Refactoring critical area.
- Security-sensitive code.

#### Mob
- Architecture decision.
- Domain modeling.
- New dev environment setup.
- Big incident response.
- Knowledge crystallization.

### 매 not effective
- 매 simple CRUD.
- 매 documentation.
- 매 mechanical refactor.
- 매 deep flow individual work.

### 매 modern tool
- **VS Code Live Share**: 매 Microsoft.
- **Tuple**: 매 macOS pair.
- **Pop**: 매 web-based.
- **Replit Multiplayer**: 매 cloud IDE.
- **JetBrains Code With Me**: 매 IntelliJ family.

### 매 LLM-aided pair (2024+)
- 매 Cursor: 매 AI 의 pair.
- 매 Copilot: 매 AI 의 navigator hint.
- 매 Cline / Aider: 매 agentic.

→ 매 human-AI pair 의 새 form.

### 매 timebox / cadence

#### Pair
- 매 25 min on / 5 min break (Pomodoro).
- 매 4-6 hour / day max.
- 매 2 person 의 stable cadence.

#### Mob
- 매 5-10 min driver rotation.
- 매 60 min session + 10 min break.
- 매 1 day max with breaks.

## 💻 패턴 (응용)

### Pair session (Live Share)
```bash
# 매 host
code .  # 매 VS Code
# 매 Live Share extension
# 매 "Start Collaboration Session"
# 매 share link

# 매 guest
# 매 join via link
# 매 follow / lead 의 toggle
```

### Mob rotation timer (web)
```js
// 매 mob rotation timer
class MobTimer {
  constructor(participants, intervalMin = 5) {
    this.participants = participants;
    this.interval = intervalMin * 60 * 1000;
    this.currentDriver = 0;
  }
  
  start() {
    this.timerId = setInterval(() => this.rotate(), this.interval);
    this.notifyDriver(this.participants[this.currentDriver]);
  }
  
  rotate() {
    this.currentDriver = (this.currentDriver + 1) % this.participants.length;
    this.notifyDriver(this.participants[this.currentDriver]);
  }
  
  notifyDriver(name) {
    notify(`${name} is now driving for ${this.interval / 60000} min`);
  }
}
```

### Strong-style discipline
```
Rule: "For an idea to go from your head into the computer,
       it MUST go through someone else's hands."

Driver: 매 type 만 — 매 idea 의 X.
Navigator: 매 think 만 — 매 keyboard 의 X.

Switch driver 매 25 min.
```

### Ping-pong TDD
```
Person A:
  - Write a failing test.
  - Pass keyboard.

Person B:
  - Write minimum code to pass.
  - Refactor.
  - Write next failing test.
  - Pass keyboard.

Person A:
  - Pass test, refactor, write next test.
  - ...
```

### LLM-aided pair (Cursor)
```
Human (driver / navigator):
  - High-level intent.
  - Architecture decision.
  - Final review.

AI (Cursor):
  - Code generation suggestion.
  - Refactor proposal.
  - Test scaffolding.
  - Documentation draft.

Human-AI handoff every few cycles.
Human always commits — AI doesn't.
```

### Session retro (10 min)
```yaml
session_retro:
  - what_worked: '...'
  - what_didnt: '...'
  - knowledge_transferred:
    - 'X learned about Y'
    - 'Z explained the W pattern'
  - decisions_made:
    - 'Use library X over Y because Z'
  - next_steps:
    - '...'
```

### Pair / mob effectiveness measurement
```python
def measure_collab_value(pair_sessions, control_sessions):
    """매 RCT-light comparison."""
    return {
        'bug_density_pair': bug_count(pair_sessions) / loc(pair_sessions),
        'bug_density_solo': bug_count(control_sessions) / loc(control_sessions),
        'review_time_pair': median([s.review_time for s in pair_sessions]),
        'review_time_solo': median([s.review_time for s in control_sessions]),
        'lead_time_pair': median([s.lead_time for s in pair_sessions]),
        'lead_time_solo': median([s.lead_time for s in control_sessions]),
        'knowledge_transfer_score': survey([s.team for s in pair_sessions]),
    }
```

### Hybrid policy (decision tree)
```python
def should_pair(task):
    if task.complexity >= 'high': return True
    if task.security_sensitive: return True
    if task.crosses_module_boundary: return True
    if task.assigned_to_junior and team.has_senior_available(): return True
    if task.architecture_decision: return 'mob'  # 매 mob 의 better
    return False  # 매 solo + async review
```

## 🤔 결정 기준
| 상황 | Mode |
|---|---|
| Complex bug | Pair |
| Architecture | Mob |
| Onboarding | Pair (senior + junior) |
| Routine CRUD | Solo + async review |
| Documentation | Solo |
| Cross-functional | Pair |
| Incident response | Mob |
| Mechanical refactor | Solo |

**기본값**: 매 hybrid — 매 pair / mob 의 high-stakes, 매 async 의 routine.

## 🔗 Graph
- 부모: [[Agile]]
- 변형: [[Pair-Programming]] · [[Mob-Programming]]
- 응용: [[Cursor]] (AI pair)
- Adjacent: [[Quality_Code_Review_Modern]] · [[Asset-Specific-Knowledge]] · [[Cognitive Constraints]] · [[Codebase_Onboarding_Guide]]

## 🤖 LLM 활용
**언제**: 매 team practice. 매 onboarding. 매 critical work. 매 AI pair design.
**언제 X**: 매 routine work (overhead). 매 introvert-only team (force X).

## ❌ 안티패턴
- **모든 task 의 pair**: 매 cost.
- **No rotation in mob**: 매 1 driver 만.
- **No timebox**: 매 burnout.
- **No retro**: 매 learning lose.
- **Pair 의 unequal participation** (silent navigator): 매 cost X.
- **AI pair 의 sole reliance**: 매 human collective lose.

## 🧪 검증 / 중복
- Verified (Williams pair programming research, Zuill mob programming, GitHub Engineering case studies).
- 신뢰도 A.
- Related: [[Quality_Code_Review_Modern]] · [[Codebase_Onboarding_Guide]] · [[Cognitive Constraints]] · [[Asset-Specific-Knowledge]] · [[Branching Strategies]].

## 🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — pair / mob style + LLM pair + 매 timer / TDD / measurement code |
