Skip to content

Lean Software Development

Lean adapts the Toyota Production System to software. Where Scrum prescribes a team process and XP prescribes engineering practices, Lean is a set of thinking tools aimed at the whole value stream, from idea to production.

Its central question is not "how fast is the team", it is "how much of what we do actually produces value for a customer".

The seven principles

Principle Meaning
Eliminate waste Anything that does not add customer value is waste
Build quality in Do not inspect defects out at the end, prevent them at the source
Create knowledge Development is a learning process, so keep learning cheap and fast
Defer commitment Decide at the last responsible moment, when you know the most
Deliver fast Short cycle times reduce risk and inventory
Respect people The people doing the work design the work
Optimize the whole Local optimums usually make the whole system worse

The seven wastes of software

Manufacturing waste Software equivalent
Inventory Partially done work, unmerged branches, unreleased features
Over-production Features nobody asked for, speculative generality
Extra processing Unnecessary documents, re-entering data, ceremony without value
Transportation Handoffs between specialists and teams
Waiting Waiting for approval, review, environments, or another team
Motion Task switching, hunting for information
Defects Bugs, and the rework they cause

Partially done work is the expensive one. It has consumed cost, produced no value, and can be invalidated at any moment by a change in priority.

A value stream, and where the time actually goes

graph LR
    I[Idea] -->|wait 12d| A[Analysis 2d]
    A -->|wait 5d| D[Development 4d]
    D -->|wait 6d| R[Review 0.5d]
    R -->|wait 9d| T[Test 1d]
    T -->|wait 14d| P[Production]

Working time is 7.5 days and elapsed time is 53.5 days, which is a flow efficiency of about 14%. Hiring more developers shortens the 4-day box. Removing queues shortens everything else, which is where the delay actually lives.

The last responsible moment

Deferring commitment is not procrastination. It is deciding when the cost of deciding later first exceeds the value of the information you would gain by waiting.

Choosing a database on day one commits you before you know the access patterns. Choosing it after the first production traffic is often cheaper, provided the code was written so the decision stays reversible. This is the same argument behind Hexagonal Architecture.

Optimize the whole

The classic failure: a team is measured on how many features it ships, so it ships fast and leaves operations to absorb the defects. Local throughput rose, and total delivered value fell. Optimizing the whole means measuring the flow from customer request to working software, not the productivity of one station in the line.

Lean and Kanban

Kanban is the practical implementation of much of Lean thinking: visualize the value stream, limit inventory, measure flow, and improve the system in small experiments.

Check Your Understanding

#

Why is partially done work considered the most expensive waste in software?

#

"Defer commitment to the last responsible moment" means what in practice?

#

A team doubles its feature throughput, and production incidents triple. Which Lean principle was violated?

Assessment

Work through the Flow, Kanban and Lean assessment once you have read this section.