Skip to content
Tutorials Center
My learning

Topics

Lesson 27 of 50 ยท Agile and Teamwork

Kanban, Extreme Programming and Lean

Learn Kanban boards and WIP limits, Little's Law, the engineering practices of Extreme Programming, and Lean's seven wastes, with simulations you can run.

Scrum is not the only agile approach. Three others shape how teams work today. Kanban manages the flow of work with visible boards and limits. Extreme Programming (XP) is a set of engineering habits such as pair programming, test-driven development and continuous integration. Lean is a way of thinking, borrowed from manufacturing, that asks you to remove waste and deliver value sooner. They combine well: many Scrum teams use XP practices and a Kanban-style board.

None of these can run on this site, since they are about people and working habits. The examples are plain JavaScript stand-ins with invented numbers: a tiny simulation of a board and a calculation of flow. Real boards live in tools such as Jira, Trello, GitHub Projects or on a wall of sticky notes.

Kanban: make work visible and limit it

Kanban is Japanese for "signboard" (or card). A Kanban board has columns for the stages that work passes through, for example To do, Doing, Review, Done, and a card for each piece of work. Everyone can see what is in progress, what is stuck, and where work piles up.

The key rule is the WIP limit: a maximum number of cards allowed in a column at one time (WIP means work in progress). If Review has a limit of 2 and holds 2 cards, nobody may move a third card in. The team must first help finish a review. The limit turns a vague feeling ("we are overloaded") into a rule that forces the team to stop starting and start finishing.

Four Kanban habits

Visualize Put every piece of work on a board.
Limit WIP Cap how much is in each column.
Manage flow Watch where cards wait.
Improve Change the rules based on data.

There are no sprints required; work is pulled when there is room.

1 / 2

Flow and Little's Law

Three measures describe a Kanban system:

  • Cycle time: how long one card takes from starting to finishing.
  • Throughput: how many cards finish per unit of time.
  • WIP: how many cards are in progress right now.

For a stable system they are tied together by Little's Law: average cycle time = average WIP / average throughput. If a team finishes 4 cards per week and has 12 in progress, the average card takes about 3 weeks. Halving the WIP to 6 (with the same throughput) halves the cycle time to 1.5 weeks. The law has no opinion about why throughput stays the same; in practice it often improves when people stop switching between too many tasks.

JS Little's Law

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A board you can watch

The next stand-in simulates a small board: six cards, two developers (they can each work on one card per day), and one reviewer. Every card needs 2 days of development and 1 day of review. Review holds at most 2 cards. The only thing that changes between runs is the WIP limit of the Doing column. First, the full board for a limit of 2, one line per day:

JS A Kanban board, day by day

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The summary at the bottom shows the whole point of a WIP limit. With a limit of 1 the team has idle capacity (one developer waits), so everything finishes late (day 14). With limits of 2, 3 and 6 all work is finished on day 9 because the people are the bottleneck, not the board. But the average cycle time keeps climbing, from 3.5 days to 5.5 days: with a limit of 6, every card is "started" early and then sits waiting for a developer. A limit near the number of people gives the same delivery date with faster feedback on every card. This is a toy model, so real numbers differ, but the pattern is real.

Extreme Programming: engineering habits

Extreme Programming (XP) was created in the late 1990s by Kent Beck and colleagues. The name comes from taking good practices "to the extreme": if code review is good, review all the time (pair programming); if testing is good, test first and constantly. XP names values (communication, simplicity, feedback, courage, respect) and a set of practices. The ones that most influenced the industry are:

  • Pair programming: two people work at one computer. One drives (types), the other navigates (thinks ahead, spots mistakes) and they swap often. It spreads knowledge and catches defects early. It can feel slower at first; its supporters argue that fewer bugs and less rework pay it back. Evidence is mixed, so treat it as a tool for hard problems and onboarding, not a rule for every minute.
  • Test-driven development (TDD): write a small failing test, make it pass with the simplest code, then clean up the code (red, green, refactor). See TDD and code quality practices.
  • Continuous integration: everyone merges to a shared main line at least daily, and an automated build and test run checks every merge. Problems show up within minutes, while the change is still fresh. More in version control, CI and delivery pipelines.
  • Refactoring: improving the structure of code without changing behavior, continuously, so the design does not rot. See technical debt and refactoring.
  • Simple design: build what today's requirements need, avoid speculative features.
  • Small releases and collective code ownership: ship in small steps; anyone on the team may change any part of the code (backed by the tests).

XP's practices support each other. Collective ownership and constant refactoring are only safe because of the automated tests; the tests only stay useful because continuous integration runs them on every change. Adopting one practice alone often disappoints.

Lean: value, flow and waste

Lean software development adapts ideas from the Toyota production system. It starts from the customer's definition of value, and looks at the value stream: every step from an idea to working software in the hands of users. Steps that do not add value are waste. A commonly used translation of Toyota's seven wastes to software is:

Manufacturing waste Software example
Partially done work Branches and features that are started but never released
Extra features Functions nobody asked for or uses
Relearning Knowledge lost when people leave or switch teams
Handoffs Passing work between teams with lost context
Delays Waiting for approvals, reviews, environments
Task switching Juggling many tasks, each progressing slowly
Defects Bugs found late, rework, support cost

Lean principles that you will meet again: eliminate waste, build quality in (do not inspect it in afterwards), deliver fast, defer decisions until the last responsible moment, and respect people. Kanban is often described as Lean applied to knowledge work, because limiting WIP attacks partially done work and task switching directly.

Choosing and mixing

Question Scrum Kanban XP
Main focus Cadence and team roles Flow of work Engineering quality
Fixed iterations Yes (sprints) No Yes (short iterations)
Roles prescribed Yes No Some (customer, coach)
Change mid-iteration Discouraged Allowed any time Allowed at planning
Easy to start with Needs agreement on roles and events Add a board to what you do now Needs technical discipline

Support and operations teams, where urgent work arrives unpredictably, often prefer Kanban. Product teams with a stable roadmap often prefer Scrum. Almost any team gains from XP's engineering practices. A mixture sometimes called Scrumban uses sprints for planning and a board with WIP limits for daily work.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What is the main purpose of a WIP limit on a Kanban column?

    A WIP limit enforces pull: when the column is full, the team helps finish work before starting something new.
  2. 2. A team finishes 5 cards per week and has 15 cards in progress. According to Little's Law, what is the average cycle time?

    Cycle time = WIP / throughput = 15 / 5 = 3 weeks.
  3. 3. In test-driven development, what comes first?

    The cycle is red (a failing test), green (make it pass simply), then refactor.
  4. 4. Which is an example of waste in Lean software development?

    Lean calls anything that does not deliver value to the customer waste. Unused features and partially done work are classic examples.
  5. 5. Why are XP's practices said to support each other?

    Frequent refactoring and shared code ownership are risky without a safety net of automated tests that run on every integration.

Summary

  • Kanban visualizes work on a board and limits WIP so that the team finishes before it starts; work is pulled when there is room.
  • Little's Law: average cycle time = average WIP / throughput, so lowering WIP shortens the time each item takes.
  • XP contributes engineering practices: pair programming, TDD, continuous integration, refactoring, simple design, small releases.
  • Lean asks you to find the value stream and remove waste such as partially done work, delays and handoffs.
  • The approaches combine: sprints for rhythm, a limited board for flow, XP habits for quality.

Next: Estimation and Planning.