Files
2nd/10_Wiki/Topics/Architecture/Problem Solving Skills.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

4.1 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-problem-solving-skills Problem Solving Skills 10_Wiki/Topics verified self
Problem Solving
문제 해결 능력
debugging skills
none A 0.9 applied
meta
debugging
engineering
methodology
2026-05-10 pending
language framework
meta methodology

Problem Solving Skills

매 한 줄

"매 problem 정의가 매 solution의 매 절반". Problem solving은 매 ill-defined situation을 매 well-defined sub-problems으로 매 decompose하고 매 hypothesis-test loop으로 매 narrow down하는 매 transferable skill set. Polya (1945) 4-step부터 매 modern debugging 까지 매 동일한 backbone.

매 핵심

매 Polya 4-step (1945)

  1. Understand: 매 input/output/constraint 매 명시.
  2. Plan: 매 known similar problem과 매 mapping.
  3. Execute: 매 plan 매 step-by-step.
  4. Review: 매 result verify, 매 generalize.

매 Debugging 전용 loop

  • 매 Reproduce: 매 minimal repro case.
  • 매 Bisect: 매 git bisect / binary search.
  • 매 Hypothesize: 매 1개 변수만 매 변경.
  • 매 Verify: 매 test 매 추가.
  • 매 Postmortem: 매 root cause + prevention.

매 응용

  1. Production incident response (5-why).
  2. Algorithm design (decomposition + invariants).
  3. LLM prompt debugging (delta isolation).

💻 패턴

Minimal repro extraction

# Bisect a failing input down to minimal case
def minimal_repro(input_list, fails):
    while True:
        for i in range(len(input_list)):
            candidate = input_list[:i] + input_list[i+1:]
            if fails(candidate):
                input_list = candidate
                break
        else:
            return input_list

Git bisect automation

git bisect start HEAD v1.0.0
git bisect run pytest tests/test_regression.py::test_bug
# 매 Bisect 자동 종료 → first-bad-commit 매 출력

5-why root cause

# postmortem.yaml
incident: api 500 spike
why_1: db connections exhausted
why_2: connection leak in /search handler
why_3: exception bypassed `with` cleanup
why_4: custom context manager swallowed asyncio.CancelledError
why_5: copy-pasted snippet from Stack Overflow without review
fix: replace with asynccontextmanager + add lint rule

Hypothesis-driven test

# Change ONE variable per iteration
import time
def measure(config):
    t = time.time(); run(config); return time.time() - t

base = {"batch": 32, "workers": 4, "cache": True}
for k in base:
    cfg = {**base, k: not base[k] if isinstance(base[k], bool) else base[k]*2}
    print(k, measure(cfg))

Rubber-duck logger

def trace_state(label, **vars):
    print(f"[{label}]", " | ".join(f"{k}={v!r}" for k, v in vars.items()))

trace_state("before-loop", i=0, total=len(data), seen=set())

매 결정 기준

상황 Approach
Bug 매 reproducible Bisect + minimal repro
Bug 매 intermittent Logging + statistical test
Algorithm 매 unknown Polya + analogy from known
Production incident 5-why + postmortem

기본값: Reproduce → Bisect → Hypothesize → Verify → Document.

🔗 Graph

🤖 LLM 활용

언제: 매 ill-defined task decomposition, 매 stuck-state escape, 매 LLM prompt 디버깅. 언제 X: 매 trivial 1-line typo (overhead).

안티패턴

  • 매 Shotgun debugging: 매 random 변경 후 매 동작하면 commit.
  • 매 Symptom-only fix: 매 root cause 무시.
  • 매 No repro: 매 "내 환경에선 됨".
  • 매 Heisenbug 회피: 매 logging 추가하면 매 사라지는 bug 매 무시.

🧪 검증 / 중복

  • Verified (Polya "How to Solve It" 1945, Zeller "Why Programs Fail" 2nd ed.).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — Polya + debugging loop + repro/bisect patterns