[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,62 +2,146 @@
|
||||
id: wiki-2026-0508-cognitive-load
|
||||
title: Cognitive Load
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-DESIGN-004]
|
||||
aliases: [Mental Load, Working Memory Pressure, Code Complexity Tax]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.94
|
||||
tags: [design, hci, Psychology, cognitive-load]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [engineering, design, code-quality, devex]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
github_commit: batch-reinforce-07
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: any
|
||||
framework: software-engineering
|
||||
---
|
||||
|
||||
# [[Cognitive_Load|Cognitive Load]] Theory (인지 부하 이론)
|
||||
# Cognitive Load
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> 우리 뇌의 작업 기억(Working [[memory|memory]]) 용량은 한정되어 있음을 인정하고, 정보 전달의 효율을 위해 마찰을 설계하는 기술.
|
||||
## 매 한 줄
|
||||
> **"매 working memory 에 동시에 매 잡고 있어야 하는 정보의 양"**. Sweller 의 cognitive load theory (1988) 에 기반 — intrinsic, extraneous, germane 의 3-tier. 매 modern software design 의 first-principle metric — 작은 cognitive load 가 매 maintainable code 를 결정.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** 내재적 부하(Intrinsic), 외재적 부하(Extraneous), 본질적 부하(Germane)를 구분하여 학습 및 정보 처리를 최적화하는 인지 설계 패턴.
|
||||
- **세부 내용:**
|
||||
- Interface 디자인 시 불필요한 시각적 노이즈를 제거하여 외재적 부하를 최소화.
|
||||
- 정보의 청킹(Chunking)을 통해 제한된 작업 기억 공간을 효율적으로 활용.
|
||||
- 복잡한 데이터 시각화 시 점진적 노출(Progressive Disclosure) 기법 적용.
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 단순한 미학적 디자인(Beautiful)에서 뇌의 작동 방식에 부합하는 사용성(Usable) 중심으로 패러다임 이동.
|
||||
- **정책 변화:** 사용자 만족도(w3) 지표로 인지 부하 측정 가이던스 도입.
|
||||
### 매 3 종류
|
||||
- **Intrinsic**: 문제 자체의 본질적 복잡도 (e.g., distributed consensus).
|
||||
- **Extraneous**: 표현/도구 가 만드는 인위적 복잡도 (bad naming, deep nesting).
|
||||
- **Germane**: schema 형성 과정 (learning) — useful load.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Parent:** 10_Wiki/💡 Topics/Design
|
||||
- **Related:** [[HCI|HCI]], UX-Design, [[Inclusive_Design|Inclusive_Design]]
|
||||
- **Raw Source:** 00_Raw/2026-04-20/Cognitive Load Theory.md
|
||||
### 매 7±2 rule
|
||||
- Working memory 는 약 4-7 chunk 만 동시 처리 (Miller 1956, refined Cowan 2001).
|
||||
- Code 가 이 한계 넘으면 → bug, slow review, onboarding 지연.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 응용
|
||||
1. Function 의 line / parameter 제한 (small functions).
|
||||
2. Module boundary 설계 — high cohesion, low coupling.
|
||||
3. PR size 제한 (200-400 line max).
|
||||
4. Naming convention — domain language 사용.
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### Guard clause 로 nesting 줄임
|
||||
```python
|
||||
# BAD: deep nesting (high extraneous load)
|
||||
def process(user):
|
||||
if user is not None:
|
||||
if user.is_active:
|
||||
if user.has_permission('write'):
|
||||
return do_work(user)
|
||||
return None
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
# GOOD: early return
|
||||
def process(user):
|
||||
if user is None: return None
|
||||
if not user.is_active: return None
|
||||
if not user.has_permission('write'): return None
|
||||
return do_work(user)
|
||||
```
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
### Extract domain primitive
|
||||
```typescript
|
||||
// BAD: primitive obsession — caller must remember semantics
|
||||
function transfer(from: string, to: string, amount: number, currency: string) {}
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
// GOOD: types carry semantics
|
||||
type AccountId = string & { __brand: 'AccountId' };
|
||||
type Money = { amount: bigint; currency: Currency };
|
||||
function transfer(from: AccountId, to: AccountId, money: Money) {}
|
||||
```
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
### 매 colocation
|
||||
```tsx
|
||||
// BAD: scattered — must context-switch
|
||||
// styles.css, validation.ts, component.tsx, types.ts
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
// GOOD: single-file feature unit (Astro/Svelte/RSC era)
|
||||
export function Form() {
|
||||
const validate = (v: string) => v.length > 0;
|
||||
return <input onBlur={e => validate(e.target.value)} />;
|
||||
}
|
||||
```
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
### Boundary objects
|
||||
```python
|
||||
# Each layer translates — caller doesn't need to know inner schema
|
||||
class UserDTO: # external API shape
|
||||
...
|
||||
class User: # domain entity
|
||||
...
|
||||
class UserRow: # DB schema
|
||||
...
|
||||
def to_domain(dto: UserDTO) -> User: ...
|
||||
def to_row(user: User) -> UserRow: ...
|
||||
```
|
||||
|
||||
### Team Topologies pattern
|
||||
```yaml
|
||||
# Stream-aligned team owns a single bounded context
|
||||
# Platform team provides self-service infra
|
||||
# Goal: each team's cognitive load fits one team's working memory
|
||||
team: payments
|
||||
owns: [PaymentService, RefundService, payment-db]
|
||||
depends_on:
|
||||
platform: [k8s-cluster, observability]
|
||||
enabling: []
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Function > 50 lines | Extract sub-functions or strategy |
|
||||
| Class > 7 public methods | Split by responsibility |
|
||||
| Team owns > 1 product area | Reorg per Team Topologies |
|
||||
| Domain logic mixed w/ infra | Hexagonal / Clean Architecture |
|
||||
| Onboarding > 2 weeks | Reduce coupling, write decision records |
|
||||
|
||||
**기본값**: Optimize for reader, not writer — 매 reduce extraneous, accept intrinsic.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Software Design]] · [[Cognitive Psychology]]
|
||||
- 변형: [[Intrinsic Load]] · [[Extraneous Load]] · [[Germane Load]]
|
||||
- 응용: [[Team Topologies]] · [[Hexagonal Architecture]] · [[Clean Code]]
|
||||
- Adjacent: [[Working Memory]] · [[Code Smell]] · [[Naming Things]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: Code review, refactoring decision, team structure 설계, PR size 판단.
|
||||
**언제 X**: Pure performance optimization (different metric).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Cleverness 자랑**: dense one-liner, clever bitwise — high extraneous.
|
||||
- **God object**: 30+ method class — exceeds chunking capacity.
|
||||
- **Magic constants**: `if x > 86400` 대신 `SECONDS_PER_DAY`.
|
||||
- **Implicit context**: global mutable state — reader 가 매 trace 해야 함.
|
||||
- **Premature abstraction**: framework-itis — abstraction 이 intrinsic 아닌데 추가됨.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Sweller 1988, Skelton & Pais 2019 Team Topologies).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — cognitive load theory + practical refactoring patterns |
|
||||
|
||||
Reference in New Issue
Block a user