Files
2nd/10_Wiki/Topics/AI_and_ML/Extreme-Programming-XP.md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

5.8 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-extreme-programming-xp Extreme Programming (XP) 10_Wiki/Topics verified self
XP
Beck XP
pair programming
TDD
continuous integration
refactoring
none A 0.96 applied
agile
xp
tdd
pair-programming
ci
software-engineering
beck
2026-05-10 pending
language applicable_to
Universal
Agile
Software Process

Extreme Programming (XP)

매 한 줄

"매 best practice 의 의 의 의 extreme 의 turn". Kent Beck 1999. 매 TDD, 매 pair, 매 CI, 매 refactoring, 매 simple design. 매 modern: 매 XP 의 practices 의 mainstream — 매 XP 의 brand 의 fade, 매 spirit 의 retain (DevOps, trunk-based, AI-paired).

매 핵심

매 12 practices

  1. Planning game (story points).
  2. Small releases.
  3. Metaphor.
  4. Simple design (YAGNI).
  5. Testing (TDD).
  6. Refactoring.
  7. Pair programming.
  8. Collective ownership.
  9. Continuous integration.
  10. 40-hour week.
  11. On-site customer.
  12. Coding standards.

매 5 values

  • Communication, Simplicity, Feedback, Courage, Respect.

매 modern legacy

  • Trunk-based development.
  • CI/CD.
  • TDD (still controversial).
  • AI-paired (Copilot, Cursor) = modern pair.
  • Mob programming.

💻 패턴

TDD cycle (Red-Green-Refactor)

# 매 1. Red — failing test
def test_email_validate():
    assert validate_email('a@b.com') is True
    assert validate_email('invalid') is False

# 매 2. Green — minimum
def validate_email(email):
    return '@' in email

# 매 3. Refactor — pattern
import re
def validate_email(email):
    return bool(re.match(r'^[^\s@]+@[^\s@]+\.[^\s@]+$', email))

Pair programming roles

driver:
  - types code
  - tactical focus
  - explains as goes
navigator:
  - reviews + thinks ahead
  - strategic
  - catches bugs / typos
rotation: every 25 minutes

Mob programming

mob:
  size: 3-5 people
  driver_rotation: 5-10 min
  laptop: single
  goal: continuous learning + team alignment

CI pipeline

on: { push: { branches: [main] } }
jobs:
  test:
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test
      - run: npm run lint

Story (planning game)

## Story: User can reset password

### As a user
I want to reset my password
So that I can regain access

### Acceptance criteria
- [ ] Email field validates format
- [ ] Confirmation email sent
- [ ] Token expires after 1 hour
- [ ] Old password invalidated

### Estimate: 3 points

Refactor — Extract Method

// 매 before
function processOrder(order) {
  // 매 20 lines mixing validation + calculation + persist
}

// 매 after
function processOrder(order) {
  validate(order);
  const total = calculateTotal(order);
  persist({ ...order, total });
}

Simple design (YAGNI)

// 매 ❌ premature abstraction
class GenericRepository<T, K, ...> { ... }

// 매 ✅ simple
class UserRepository {
  async find(id: string): Promise<User | null> { ... }
  async save(u: User): Promise<void> { ... }
}
// 매 abstract 매 매 3rd similar repo

Continuous integration (trunk-based)

# 매 short-lived branch (< 1 day)
git checkout -b feat/quick-fix
# 매 work
npm test
git add -p; git commit
git push
# 매 PR → review → merge → CI deploy

TDD with AI pair

# 매 modern XP: AI as pair
# 매 driver: human writes test
def test_calculate_discount():
    assert discount(100, 'STUDENT') == 10
    assert discount(100, 'NONE') == 0

# 매 navigator (AI): suggests implementation
def discount(amount, code):
    rules = {'STUDENT': 0.1, 'SENIOR': 0.15}
    return amount * rules.get(code, 0)

On-site customer (modern proxy)

modern_equivalent:
  - product_owner: dedicated PM
  - user_research_loop: weekly
  - support_rotation: engineers in support 1d/sprint
  - real_user_feedback: in-app survey + hotjar

Test coverage gate

# 매 fail PR if coverage drops
- run: npm run coverage
- run: |
    pct=$(jq '.total.lines.pct' coverage/coverage-summary.json)
    if (( $(echo "$pct < 80" | bc -l) )); then exit 1; fi

Refactoring catalog (Fowler)

// 매 Inline Variable
// before
const result = calculate(); return result;
// after
return calculate();

// 매 Replace Magic Number
const TAX_RATE = 0.08;
return total * (1 + TAX_RATE);

매 결정 기준

상황 Practice
Greenfield All-in XP
Legacy + tests TDD selectively
Solo dev TDD + CI
Distributed team CI + async pair
Scale-up Trunk + feature flags
AI-augmented Copilot + TDD

기본값: 매 modern XP = TDD + CI/CD + trunk-based + pair (or AI-pair) + simple design + small release.

🔗 Graph

🤖 LLM 활용

언제: 매 small team. 매 high-quality requirement. 매 evolving requirement. 언제 X: 매 strict regulatory waterfall.

안티패턴

  • Cherry-pick practices: 매 synergy lose.
  • TDD without refactor: 매 cruft.
  • Pair as overhead: 매 communication 의 ignore.
  • No on-site customer: 매 wrong product.
  • CI without tests: 매 false safety.

🧪 검증 / 중복

  • Verified (Beck XP Explained 1999/2004).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-04-26 XP auto
2026-05-08 Phase 1
2026-05-10 Manual cleanup — 12 practices + 매 TDD / pair / mob / CI / refactor code