{
    "slug": "mob_programming",
    "term": "Mob Programming",
    "category": "general",
    "difficulty": "beginner",
    "short": "The whole team works on one task at one computer simultaneously — combining pair programming across the entire team for complex or knowledge-critical work.",
    "long": "In mob programming, one person (the driver) types while the rest (the mob) contribute ideas and direction. Roles rotate frequently — typically every 5-10 minutes. The entire team focuses on the highest-value work together, producing very low defect rates and exceptional knowledge sharing. Best suited for complex problems, architectural decisions, and critical code that everyone needs to understand. A full-day mob session can outperform the same number of developer-days working in isolation on the right problem.",
    "aliases": [
        "mobbing",
        "ensemble programming"
    ],
    "tags": [
        "general",
        "team",
        "pair-programming",
        "agile"
    ],
    "misconception": "Mob programming is slow because only one person types — the bottleneck in software development is rarely typing speed; it is thinking, decision-making, and knowledge transfer, which mob programming maximises.",
    "why_it_matters": "Mob programming eliminates knowledge silos and produces the team's highest-quality work — particularly valuable for onboarding, architectural changes, and complex debugging.",
    "common_mistakes": [
        "Not rotating the driver frequently enough — one person types for too long and others disengage.",
        "Using mob programming for simple, well-understood tasks — it is overkill for routine work.",
        "Not using a physical or shared remote screen — participants must all see the same thing.",
        "Treating mob programming as pair programming with an audience — everyone should actively contribute, not watch."
    ],
    "when_to_use": [],
    "avoid_when": [],
    "related": [
        "pair_programming",
        "code_review",
        "bus_factor",
        "documentation"
    ],
    "prerequisites": [
        "pair_programming",
        "code_review",
        "test_driven_development"
    ],
    "refs": [
        "https://mobprogramming.org/"
    ],
    "bad_code": "// Mob programming anti-pattern — driver ignores the mob:\nDeveloper A (driver): [typing rapidly without explanation]\nRest of team: [watching silently]\n// Driver implements their own solution without discussion\n// Knowledge not transferred, decisions not shared\n// This is just programming with spectators",
    "good_code": "// Productive mob:\nFacilitator: 'Alice, you drive. We need to implement rate limiting middleware.'\nBob: 'I suggest we check Redis first before hitting the counter'\nAlice (driver): [types the Redis check]\nCarol: 'We should also handle the case where Redis is down gracefully'\n// Rotate driver every 10 minutes\n// All decisions discussed, all code understood by everyone",
    "quick_fix": "Start with one keyboard, one screen, everyone contributing verbally — rotate the driver every 15 minutes and keep the navigator role separate from the driver",
    "severity": "info",
    "effort": "medium",
    "created": "2026-03-15",
    "updated": "2026-03-22",
    "citation": {
        "canonical_url": "https://codeclaritylab.com/glossary/mob_programming",
        "html_url": "https://codeclaritylab.com/glossary/mob_programming",
        "json_url": "https://codeclaritylab.com/glossary/mob_programming.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": "[Mob Programming](https://codeclaritylab.com/glossary/mob_programming) (CodeClarityLab)",
                "footer_credit": "Source: CodeClarityLab Glossary — https://codeclaritylab.com/glossary/mob_programming"
            }
        }
    }
}