Code Complete vs Domain-Driven Design Distilled

May 10, 2026 · View on GitHub

Status: reviewed Research basis: mini-only

Verdict: ✅ Complementary

Conflict: 14% Overlap: 38% Complementarity: 74%

Loading Decision

Use together when domain language, invariants, lifecycle, or Bounded Contexts affect the task and the other rule set governs implementation quality, reliability, data, or safe change.

Book A Pressure

  • Code Complete should drive tasks where defect reduction, data clarity, defensive checks, evidence-based debugging, and reviewability dominate.
  • Evidence: code-complete/code-complete.mini.md lines 3-5: applies to implementation, change, review, debugging, refactoring, and tuning of production code.

Book B Pressure

  • Domain-Driven Design Distilled should drive tasks where selective DDD, subdomain importance, Bounded Contexts, local language, and justified tactical patterns dominate.
  • Evidence: domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 3-5: applies when business software has domain complexity, language ambiguity, strategic differentiation, or integration risk but needs smallest effective DDD rather than ceremony.

Complementary Forces

  • Claim: Code Complete contributes defect-reduction, data-clarity, defensive-check, evidence-based-debugging, and reviewability pressure; Domain-Driven Design Distilled contributes selective-DDD, subdomain, Bounded-Context, local-language, and justified-pattern pressure. Together they are useful only where both scopes are active.
  • Evidence:
    • code-complete/code-complete.mini.md lines 13-31: requires construction prerequisites, small validated slices, clear routines/data/control flow, validated data-driven logic, trust-boundary validation, explicit error semantics, cohesive modules, complexity management, small increments, evidence-based debugging, measured tuning, and useful tooling/comments.
    • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 13-30: requires capability/subdomain/context/language first, Core Domain investment, selective DDD, explicit Bounded Context ownership, term translation, deliberate context relationships, integration style by coupling/failure semantics, separate integration contracts, local domain terms, justified Entities/Value Objects/Aggregates/Domain Events/Application Services, infrastructure-free domain model, code that teaches the model, timeboxed modeling aids, and planning from modeling uncertainty.

Overlap

  • Claim: They overlap where both affect boundaries, explicit responsibilities, tests, coupling reduction, and avoiding hidden assumptions; the overlap score reflects how often an agent would receive similar pressure from both.
  • Evidence:
    • code-complete/code-complete.mini.md lines 51-56: checks requirements, architecture fit, construction approach, readable code structure, deliberate inputs/errors/invariants, inspectable flow, evidence-based validation, and reviewable change size.
    • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 48-56: checks subdomain investment, explicit context relationship, visible Ubiquitous Language, tested translations, justified tactical patterns, small Aggregates, coordinating application services, infrastructure-free domain model, and captured modeling discoveries.

Conflicts

  • Claim: The tension is DDD ceremony: tactical patterns must protect model meaning and should not displace the other rule set's simpler construction, refactoring, data, or operational constraints.
  • Evidence:
    • code-complete/code-complete.mini.md lines 7-9: corrects accidental construction by choosing lower defect risk and easier reasoning over clever idioms.
    • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 13-30: requires capability/subdomain/context/language first, Core Domain investment, selective DDD, explicit Bounded Context ownership, term translation, deliberate context relationships, integration style by coupling/failure semantics, separate integration contracts, local domain terms, justified Entities/Value Objects/Aggregates/Domain Events/Application Services, infrastructure-free domain model, code that teaches the model, timeboxed modeling aids, and planning from modeling uncertainty.

Use Together When

  • Use together when one change simultaneously involves defect-risk construction, data clarity, defensive checks, and reviewability and selective DDD, subdomain importance, local language, and justified tactical patterns; otherwise load only the rule set whose trigger is actually present.

Prefer One When

  • Prefer the DDD rule set when language, lifecycle, invariants, or context boundaries drive design; prefer the other book for tasks without visible domain-model pressure.

Source Basis

  • code-complete/code-complete.mini.md lines 3-5: applies to implementation, change, review, debugging, refactoring, and tuning of production code.
  • code-complete/code-complete.mini.md lines 7-9: corrects accidental construction by choosing lower defect risk and easier reasoning over clever idioms.
  • code-complete/code-complete.mini.md lines 13-31: requires construction prerequisites, small validated slices, clear routines/data/control flow, validated data-driven logic, trust-boundary validation, explicit error semantics, cohesive modules, complexity management, small increments, evidence-based debugging, measured tuning, and useful tooling/comments.
  • code-complete/code-complete.mini.md lines 51-56: checks requirements, architecture fit, construction approach, readable code structure, deliberate inputs/errors/invariants, inspectable flow, evidence-based validation, and reviewable change size.
  • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 3-5: applies when business software has domain complexity, language ambiguity, strategic differentiation, or integration risk but needs smallest effective DDD rather than ceremony.
  • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 7-9: corrects starting from tactical patterns, frameworks, persistence, APIs, or class shapes before business capability, subdomain, context, and language.
  • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 13-30: requires capability/subdomain/context/language first, Core Domain investment, selective DDD, explicit Bounded Context ownership, term translation, deliberate context relationships, integration style by coupling/failure semantics, separate integration contracts, local domain terms, justified Entities/Value Objects/Aggregates/Domain Events/Application Services, infrastructure-free domain model, code that teaches the model, timeboxed modeling aids, and planning from modeling uncertainty.
  • domain-driven-design-distilled/domain-driven-design-distilled.mini.md lines 48-56: checks subdomain investment, explicit context relationship, visible Ubiquitous Language, tested translations, justified tactical patterns, small Aggregates, coordinating application services, infrastructure-free domain model, and captured modeling discoveries.

Review Notes

  • External context was not used as decisive evidence for Code Complete vs Domain-Driven Design Distilled; the verdict is based on the cited local mini line ranges.