Track 1 — Engineering Economics

Module 1.2: Technical Debt Classification

Master the four pillars of technical debt: Code, Architecture, Infrastructure, and Dependencies. Learn to classify, quantify, and prioritize debt remediation using the PDI framework.

4 Lessons~60 minIntermediate

🎯 What You'll Learn

  • How to identify and measure code-level debt (duplication, complexity, coverage)
  • How to detect architecture debt before it becomes architecture insolvency
  • How to audit infrastructure for zombie resources and pipeline debt
  • How to use the PDI framework to calculate total debt in dollars
1

Lesson 1: Code-Level Debt

Code debt is the most visible form of technical debt — duplicated code, overly complex functions, missing tests, and unclear naming. It's the easiest to measure and often the least economically impactful.

Duplication

Copy-pasted code that should be abstracted into shared functions. Creates maintenance multiplication — every bug fix requires N changes.

Target: < 5% duplication | Warning: 5-15% | Critical: > 15%
Cyclomatic Complexity

Number of independent paths through a function. High complexity = hard to test, hard to modify, high bug probability.

Target: < 10 per function | Warning: 10-20 | Critical: > 20
Test Coverage

Percentage of code paths exercised by automated tests. Low coverage means changes are high-risk — you don't know what you'll break.

Target: > 80% | Acceptable: 60-80% | Risky: < 60%
Dead Code

Code that exists in the codebase but is never executed. Consumes cognitive load, increases build times, and creates false complexity.

Target: 0% | Acceptable: < 2% | Excessive: > 5%
📝 Exercise

Run a static analysis tool (SonarQube, CodeClimate, or ESLint) on your codebase. Document the top 10 code debt items by severity and estimate the hours required to fix each.

2

Lesson 2: Architecture Debt

Architecture debt occurs when the system structure no longer matches the business reality. It's harder to see than code debt but far more expensive to fix.

Monolith Entanglement

When a "monolith" can't be modified in one area without affecting others. Every change requires full regression testing because boundaries are unclear.

Measured by: blast radius of a typical change (files touched)
Wrong Abstraction

The most expensive architecture debt: a shared component that serves two different use cases poorly. Fixing it means untangling every consumer.

Signal: "we can't change X without breaking Y"
Scaling Mismatch

Architecture designed for 1K users serving 100K users. The system "works" but response times degrade, costs spike, and outages increase.

Target: architecture handles 10x current load | Warning: approaching capacity
📝 Exercise

Draw your system's current architecture. Circle areas where a change in one component requires changes in 3+ other components. These are your architecture debt hotspots.

3

Lesson 3: Infrastructure Debt

Infrastructure debt hides in your cloud accounts, CI/CD pipelines, and operational tooling. It's often invisible until it causes an outage or a surprising cloud bill.

Zombie Infrastructure

Resources running that serve no current purpose — old staging environments, unused databases, forgotten Lambda functions. They cost money 24/7.

Average org: 15-30% of cloud spend is zombie infrastructure
Manual Runbooks

Operational procedures that require human execution instead of automation. Each manual step is a failure point and a bottleneck.

Target: > 90% automated | Warning: 50-90% | Critical: < 50%
CI/CD Pipeline Debt

Build times over 30 minutes, flaky tests, manual deployment steps. Slow pipelines directly reduce deployment frequency (DORA metric).

Target: < 15 min build | Warning: 15-45 min | Critical: > 45 min
📝 Exercise

Audit your cloud account for zombie resources. List every resource and its last meaningful access date. Calculate the monthly cost of zombie infrastructure.

4

Lesson 4: The PDI Framework

The Product Debt Index (PDI) combines all four types of technical debt into a single economic score. It answers: "How much is our technical debt costing us in real dollars?"

PDI Calculation

PDI = (Innovation Tax × Engineering Budget) + (Estimated Remediation Cost) + (Projected Velocity Loss). This produces a dollar amount of total debt exposure.

Healthy: < 15% of annual engineering budget | Warning: 15-30% | Critical: > 30%
Technical Insolvency Date

The quarter when maintenance costs consume 100% of engineering capacity. No new features can be built. Calculated from current debt trend.

If TID is < 4 quarters away: immediate action required
Debt Service Ratio

The percentage of each sprint spent on maintenance vs. new features. Like debt service on a loan — how much of your "income" goes to servicing existing debt.

Healthy: < 30% | Strained: 30-50% | Critical: > 50%
📝 Exercise

Use the free PDI calculator at /tools/pdi to generate your organization's Product Debt Index. Share the results with your engineering leadership.

📊 Module Assessment

Complete to demonstrate mastery of Module 1.2: