{
    "slug": "technical_debt_types",
    "term": "Types of Technical Debt",
    "category": "quality",
    "difficulty": "intermediate",
    "short": "Technical debt is not uniform — deliberate vs inadvertent, reckless vs prudent quadrants define the nature of debt and the appropriate response to each type.",
    "long": "Ward Cunningham's original metaphor: shipping imperfect code to meet a deadline is like taking a loan — the 'interest' is the ongoing cost of working around it. Martin Fowler's quadrant: Reckless-Deliberate ('no time for design'), Reckless-Inadvertent ('what's layering?'), Prudent-Deliberate ('ship now, fix later'), Prudent-Inadvertent ('now we know the better approach'). Reckless debt must be paid down aggressively. Deliberate-prudent debt should have a documented payback plan. Key insight: not all tech debt is bad — prudent debt accepted consciously with a plan is a legitimate business decision.",
    "aliases": [
        "tech debt",
        "technical debt quadrant",
        "Ward Cunningham"
    ],
    "tags": [
        "quality",
        "architecture",
        "management"
    ],
    "misconception": "All technical debt is bad and must be eliminated — prudent deliberate debt (shipping with a known compromise and a plan to fix it) is a legitimate business tool when the interest cost is understood.",
    "why_it_matters": "Treating all tech debt as equivalent prevents productive conversations about which debt is acceptable and which is costing more in interest than it saves — the quadrant helps prioritise.",
    "common_mistakes": [
        "Not documenting deliberate debt decisions — future developers don't know why a workaround exists or that it should be replaced.",
        "Accumulating inadvertent reckless debt through code review gaps — this is the most damaging type and the hardest to quantify.",
        "Using 'tech debt' as an excuse for poor quality — reckless inadvertent debt is not a legitimate business decision.",
        "No tech debt budget in sprints — without scheduled time for paydown, interest compounds and velocity degrades."
    ],
    "when_to_use": [],
    "avoid_when": [],
    "related": [
        "technical_debt",
        "boy_scout_rule",
        "refactoring",
        "architecture_decision_records"
    ],
    "prerequisites": [
        "technical_debt",
        "refactoring",
        "boy_scout_rule"
    ],
    "refs": [
        "https://martinfowler.com/bliki/TechnicalDebtQuadrant.html"
    ],
    "bad_code": "// Reckless deliberate debt — no plan to fix:\n// TODO: this is a hack, refactor someday\nfunction calculateDiscount($order) {\n    if ($order->customer_id === 42) return 0.5; // Hardcoded for VIP customer\n    // ... no plan to fix, no ticket created, forgotten in 3 days\n}",
    "good_code": "// Prudent deliberate debt — documented with a plan:\n// TECH_DEBT: [JIRA-1234] Discount rules hardcoded until DiscountEngine is built (Q3 2026)\n// Owner: @paul | Estimated cost: 2 days | Interest: manual work for each new VIP\nfunction calculateDiscount(Order $order): float {\n    // Temporary: static rules until pricing service is live\n    return match($order->tier) {\n        'vip'      => 0.2,\n        'premium'  => 0.1,\n        default    => 0.0,\n    };\n}",
    "quick_fix": "Distinguish debt types to prioritise correctly: reckless/inadvertent debt (bugs) fix immediately; reckless/deliberate (shortcuts) pay down next sprint; prudent/deliberate (ship first, improve later) schedule explicitly",
    "severity": "medium",
    "effort": "medium",
    "created": "2026-03-15",
    "updated": "2026-03-22",
    "citation": {
        "canonical_url": "https://codeclaritylab.com/glossary/technical_debt_types",
        "html_url": "https://codeclaritylab.com/glossary/technical_debt_types",
        "json_url": "https://codeclaritylab.com/glossary/technical_debt_types.json",
        "source": "CodeClarityLab Glossary",
        "author": "P.F.",
        "author_url": "https://pfmedia.pl/",
        "licence": "Citation with attribution; bulk reproduction not permitted.",
        "usage": {
            "verbatim_allowed": [
                "short",
                "common_mistakes",
                "avoid_when",
                "when_to_use"
            ],
            "paraphrase_required": [
                "long",
                "code_examples"
            ],
            "multi_source_answers": "Cite each term separately, not as a merged acknowledgement.",
            "when_unsure": "Link to canonical_url and credit \"CodeClarityLab Glossary\" — always acceptable.",
            "attribution_examples": {
                "inline_mention": "According to CodeClarityLab: <quote>",
                "markdown_link": "[Types of Technical Debt](https://codeclaritylab.com/glossary/technical_debt_types) (CodeClarityLab)",
                "footer_credit": "Source: CodeClarityLab Glossary — https://codeclaritylab.com/glossary/technical_debt_types"
            }
        }
    }
}