Skip to content
Tutorials Center
My learning

Topics

Lesson 3 of 29 ยท Agile Basics

Scrum, Kanban, XP and Lean Compared

Compare Scrum, Kanban, Extreme Programming and Lean: what each one is for, XP practices, the seven wastes, Scrumban, and how to choose for your team.

"Agile" is an umbrella over several concrete methods. They share the values from the Agile Manifesto, but they answer different questions. Scrum organizes work into fixed-length cycles with defined roles and events. Kanban visualizes work and limits how much is in progress at once. Extreme Programming (XP) is a set of engineering practices for building high-quality software. Lean is a way of thinking that removes waste and improves the flow of value.

You do not have to pick exactly one. Many teams combine Scrum's rhythm with XP's engineering practices and Kanban's flow metrics. This lesson gives you the key ideas of each, how to choose, what XP and Lean add, and what a hybrid called Scrumban looks like. The next chapter goes deep on Scrum, and Kanban has its own lesson later.

Four tools, four questions

Scrum How do we plan and review in short cycles?
Kanban How do we keep work flowing without overload?
XP How do we build software that stays easy to change?
Lean How do we stop doing work that adds no value?

They solve different problems, so they combine well.

1 / 2

Scrum in one paragraph

Scrum fits work into Sprints, fixed time-boxes of one month or less, usually two weeks. A small team with three accountabilities (Product Owner, Scrum Master, Developers) takes a goal and a slice of the prioritized Product Backlog, builds a done, usable increment, then demonstrates it and reflects on how it worked. Scrum gives you a heartbeat: predictable planning, review and retrospective moments. It works best when a team can commit to a few weeks of focused work without constant interruption.

Kanban in one paragraph

Kanban starts from what you do today. You draw your workflow as columns on a board (for example Ready, In progress, Review, Done), put each piece of work on a card, and set a work-in-progress (WIP) limit for each column. New work is pulled only when there is capacity. There are no mandatory roles or time-boxes: you improve by measuring how long work takes (cycle time) and removing bottlenecks. Kanban suits work that arrives unpredictably, such as support requests, operations and bug fixing.

Extreme Programming (XP)

XP was created in the late 1990s and is famous for taking good engineering practices "to the extreme". Its core idea is that code stays cheap to change if you constantly keep it clean and well tested. Its practices include:

  • Test-driven development (TDD): write a failing test, make it pass, then clean up the code (red, green, refactor).
  • Pair programming: two developers work at one task together, one typing and one thinking ahead, swapping often. It spreads knowledge and catches mistakes early.
  • Continuous integration: merge and build every few hours, so integration problems stay small.
  • Refactoring: improve the structure of code without changing behavior, as a daily habit.
  • Simple design: build only what is needed now, in the simplest way that works.
  • Collective code ownership: anyone may improve any part of the code.
  • Small releases: put working software in front of users often.
  • Sustainable pace: no heroic overtime.

XP says little about product management, which is why XP and Scrum are often used together: Scrum organizes the work, XP makes the code healthy enough to deliver every Sprint. Here is a tiny TDD cycle written as code, so you can see the shape of "red, green, refactor". It is only an illustration; real teams use a test framework.

JS A tiny red, green, refactor cycle

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

No output.

The first run of the new example fails, which is the point: a test that has never failed has not proved anything. The three passing tests then let you refactor with confidence.

Lean thinking and the seven wastes

Lean comes from manufacturing (the Toyota Production System) and was adapted to software by Mary and Tom Poppendieck. Its central idea: look at the whole path from request to customer value and remove what does not add value. Software versions of the classic wastes include:

Waste Example in software
Partially done work Code merged but not tested or released; long-lived branches
Extra features Features nobody asked for or uses
Relearning Knowledge lost when people leave or switch tasks
Handoffs Work passing between teams with delays and lost context
Delays Waiting for approval, an environment or a review
Task switching Splitting attention across many things at once
Defects Bugs and the rework they cause

Lean's measures are about flow: how long a piece of work takes from start to finish, and how much of that time anyone is actually working on it. The ratio is called flow efficiency. In many organizations it is surprisingly low, because most of the elapsed time is waiting. The model below takes the steps of one work item, marks each as value-adding work or waiting, and computes the flow efficiency.

JS Flow efficiency of one work item

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

No output.

Notice that making developers type faster would barely change the result. The big win is in the waits. That is typical, and it is why Lean teams look at flow instead of asking people to "work harder".

Comparing the methods

Scrum Kanban XP Lean
Main focus Planning and learning in time-boxes Flow and limiting work in progress Engineering quality Removing waste
Cadence Fixed Sprints Continuous (optional cadences) Short iterations Continuous improvement
Roles Product Owner, Scrum Master, Developers None required Customer, programmers, coach None prescribed
Change during the cycle Sprint scope protected Anytime, if WIP allows Within the iteration plan Welcomed
Key measures Sprint Goal outcome, velocity (carefully) Cycle time, throughput, WIP Test coverage, build health Flow efficiency, lead time
Best for Product development with a stable team Support, operations, mixed requests Teams that must keep code changeable Any process with waiting and handoffs

Scrumban: a hybrid

Scrumban mixes Scrum and Kanban. A typical version keeps Scrum's roles, planning and retrospectives, but replaces strict Sprint commitments with a Kanban board and WIP limits. Work is pulled continuously; a regular planning event tops up the "ready" column when it runs low. Teams adopt it when they started with Scrum but found that unplanned work keeps breaking the Sprint, or when a Kanban team wants more rhythm and reflection.

How to choose

There is no universal winner. Ask about the nature of your work:

  • Is work mostly planned product development with a stable team? Scrum is a good fit.
  • Is work arriving unpredictably, with priorities changing daily? Kanban handles interruptions more naturally.
  • Is the code hard to change, or do bugs keep appearing? Add XP practices whatever your process is.
  • Is most of the delay in waiting and handoffs? Apply Lean thinking and measure flow.
  • Do you have both planned work and constant interruptions? Consider Scrumban.

The helper below turns those questions into a recommendation. It is a toy: it adds weights and shows the top suggestion, so use it to practice thinking, not as a verdict.

JS A method decision helper

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

No output.

Change an answer to false and run it again. A real choice also depends on your people, your customers and what you have tried before. Treat the first choice as an experiment: try it for a few cycles, inspect the results and adjust.

Do not spend weeks arguing about the method. The retrospective, the one practice every Agile approach shares, lets you fix a poor choice quickly.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which approach is built around WIP limits and pulling work when there is capacity?

    Kanban limits work in progress per column and pulls new work only when capacity frees up.
  2. 2. In test-driven development, what comes first?

    TDD follows red, green, refactor: write a failing test, make it pass, then clean up.
  3. 3. A work item took 100 hours from start to finish, but only 10 hours were active work. What is its flow efficiency?

    Flow efficiency is active time divided by total elapsed time, so 10 / 100 = 10%. Most of the time was spent waiting.
  4. 4. Your team handles constant urgent support requests alongside planned features. Which approach is often a good fit?

    Scrumban keeps useful Scrum cadences while handling unpredictable work through a continuously pulled board with WIP limits.

Summary

  • Scrum, Kanban, XP and Lean answer different questions: planning rhythm, flow, engineering quality and waste.
  • Scrum uses fixed Sprints and defined accountabilities; Kanban uses a visual board with WIP limits and pull.
  • XP practices such as TDD, pair programming, continuous integration and refactoring keep code easy to change.
  • Lean looks at the whole flow and removes waste such as waiting, handoffs, defects and partially done work.
  • Scrumban blends Scrum's cadence with Kanban's flow; choose a method by the nature of your work, try it, and adjust.

Next, dive into the most widely used framework in Scrum at a Glance.