Chapter 14 of 21
Kanban and Extreme Programming (XP): Flow, Quality, and Technical Excellence
Not all agile teams sprint—some flow. Discover how Kanban and XP manage work, limit multitasking, and bake quality into the code from the start.
From Sprints to Flow: Where Kanban and XP Fit in Agile
Beyond Scrum
So far you have focused on Scrum. This module adds two more agile approaches that show up on CAPM and in real teams: Kanban and Extreme Programming (XP).
Why It Matters
You must be able to differentiate Scrum, Kanban, and XP, and select practices that solve flow and quality problems in adaptive life cycles.
Three Approaches
Scrum uses sprints and roles, Kanban focuses on visual flow and WIP limits, and XP focuses on technical excellence like TDD and pair programming.
Module Roadmap
You will learn Kanban practices, XP practices, how they compare with Scrum, and how to fix issues like multitasking, excessive WIP, and late integration.
Kanban Fundamentals: Visualizing Workflow and Pulling Work
What Is Kanban?
Kanban manages work as a continuous flow. You visualize the workflow, limit how much is in progress, and let people pull new work only when they have capacity.
Kanban Board
You map steps from idea to done on a board. Example columns: To Do, In Progress, Code Review, Testing, Done. Cards move left to right as work progresses.
Pull vs Push
In Kanban, team members pull the next item when they finish one. This contrasts with push systems where managers assign work and often overload people.
When to Use Kanban
Kanban suits unpredictable work, service or support teams, and situations where you want to improve flow without adding sprints or new roles.
Kanban’s Secret Weapon: WIP Limits, Policies, and Cycle Time
What Are WIP Limits?
Work-in-progress limits cap how many items can be in a column. If the limit is reached, no new items enter; people help finish existing work instead.
Why WIP Limits Matter
WIP limits reduce multitasking, shorten queues, and push the team to finish work rather than start more. They are a go-to remedy for overloaded teams.
Explicit Policies
Kanban teams define clear rules for when work can move between columns and what counts as Done, making the process transparent and easier to improve.
Cycle Time
Cycle time is how long a work item takes from start of active work to Done. Kanban teams track and improve it; do not confuse this with Scrum velocity.
Thought Exercise: Fix This Flow with Kanban Practices
Use this scenario to practice selecting Kanban practices that improve flow.
Scenario
You manage a small product enhancement team. Problems:
- The board shows 18 items "In Progress" for a 5-person team.
- Many items sit in "Testing" for days while developers start new work.
- Stakeholders complain that features take weeks to complete, even though the team is "always busy".
Your task
Mentally walk through these questions and pick concrete actions.
- Where would you place WIP limits?
- Which columns are most overloaded?
- What initial numeric limits might you try for "In Progress" and "Testing" for a 5-person team?
- What explicit policies would you define?
- What must be true for a card to move from "In Progress" to "Testing"?
- When "Testing" hits its WIP limit, what should developers do instead of starting new work?
- How will you measure improvement?
- How will you track cycle time before and after the changes?
- How often will you inspect the board and metrics to adapt limits or policies?
Reflect
Write down (or say out loud) 2–3 concrete Kanban changes you would make. For example, you might:
- Set "In Progress" WIP limit to 5 and "Testing" to 3.
- Add a policy that when "Testing" is full, developers help test or fix defects.
- Start tracking cycle time weekly and review it in a short flow-review meeting.
These are exactly the kinds of actions an exam item may hint at when it asks what a project manager or agile leader should do to improve flow.
Extreme Programming (XP): Technical Excellence and Built-in Quality
What Is XP?
Extreme Programming (XP) is an agile method focused on technical excellence and code quality, especially for software projects in rapidly changing environments.
Why XP Exists
XP assumes change is constant and late defects are expensive. It uses practices that catch problems early and keep the codebase easy to modify.
Key XP Practices
CAPM expects you to recognize XP practices: pair programming, test-driven development (TDD), continuous integration, refactoring, and collective code ownership.
When XP Fits
XP is most relevant when defect rates are high, integration is painful, or code quality is poor. It is often combined with Scrum or Kanban for management.
Core XP Practices: Pair Programming, TDD, and Continuous Integration
Pair Programming
Two developers share one workstation: a driver writes code while a navigator reviews and thinks ahead. This spreads knowledge and catches defects early.
Test-Driven Development
TDD follows a red-green-refactor loop: write a failing test, write minimal code to pass, then refactor while keeping tests green.
Why TDD Helps
Because tests come first, they shape design and ensure that every feature has automated checks, making change and refactoring safer.
Continuous Integration
In continuous integration, developers integrate changes frequently into a shared mainline, triggering automated builds and tests to catch issues early.
More XP Practices: Refactoring and Collective Code Ownership
What Is Refactoring?
Refactoring improves the internal structure of code without changing behavior. It makes code cleaner, easier to read, and easier to modify.
Refactoring and Tests
Frequent refactoring is safe when you have strong automated tests from TDD and CI. Tests confirm behavior stays correct as you improve design.
Collective Code Ownership
With collective code ownership, anyone can change any part of the codebase, following team standards and keeping tests passing.
Why Ownership Matters
Collective ownership reduces bottlenecks and silos. It ensures the team can respond even if a specialist is unavailable or leaves the project.
Comparing Scrum, Kanban, and XP in Practice
Cadence
Scrum uses fixed-length sprints; Kanban uses continuous flow without required sprints; XP often uses short iterations but is known for its engineering focus.
Roles
Scrum defines Product Owner, Scrum Master, and Developers. Kanban does not require specific roles. XP originally defined roles, but exams stress practices.
Artifacts
Scrum has the product backlog, sprint backlog, and increment. Kanban has boards, WIP limits, and flow metrics. XP emphasizes tests and a shared codebase.
Use Cases
Scrum suits new product work; Kanban suits continuous support or operations; XP suits software projects needing strong technical excellence.
Quick Check: Scrum vs Kanban vs XP
Test your ability to recognize which framework a scenario is describing.
A team works in two-week cycles with a Product Owner and Scrum Master. They are struggling with many half-done items and constant multitasking during the sprint. Which practice from another agile method would BEST help them finish more work?
- Introduce strict WIP limits on 'In Progress' work using a Kanban-style board
- Adopt a longer sprint length so they have more time to finish items
- Assign each developer a personal backlog so they can work independently
- Eliminate the Daily Scrum so developers have more time to code
Show Answer
Answer: A) Introduce strict WIP limits on 'In Progress' work using a Kanban-style board
The problem is too much work in progress and multitasking. Introducing WIP limits on 'In Progress' is a Kanban practice that directly addresses this. Longer sprints do not fix multitasking, personal backlogs reduce collaboration, and removing the Daily Scrum weakens inspection and adaptation.
Spotting Flow and Quality Problems (and Fixing Them with Kanban and XP)
Flow Problems
Too much WIP and multitasking lead to many half-done items. Kanban’s WIP limits and explicit policies help teams finish work before starting more.
Phase-Based Handoffs
Sequential handoffs between analysts, developers, and testers create delays. Cross-functional teams and shared ownership reduce these gaps.
Late Integration
When code is merged only at the end, integration failures explode. XP’s continuous integration addresses this with frequent merges and automated tests.
Late Defects and Silos
TDD and pair programming catch defects early, while collective code ownership and pairing break knowledge silos in critical modules.
Apply Kanban and XP to Fix Issues
Choose the best practice to address the described problem.
A software team discovers most serious defects only during final system testing, just before release. Fixing them causes major delays and rework. Which XP practice would MOST directly improve this situation?
- Implementing test-driven development so tests are written before code
- Extending the test phase to allow more time for final testing
- Adding more detailed documentation before development starts
- Using a Kanban board to visualize the workflow
Show Answer
Answer: A) Implementing test-driven development so tests are written before code
The core issue is late defect discovery. Test-driven development ensures automated tests are created before code and run continuously, catching defects much earlier. Longer test phases and more documentation do not change when defects are introduced; a Kanban board helps flow but not directly early defect detection.
Key Terms: Kanban, XP, and Flow
Flip these cards to review core concepts and practices you will see on CAPM questions.
- Kanban board
- A visual representation of the workflow, typically with columns such as To Do, In Progress, Testing, and Done, where cards representing work items move from left to right.
- Work-in-progress (WIP) limit
- A cap on the number of work items that can be in a given state or column at one time, used in Kanban to reduce multitasking and improve flow.
- Pull-based work selection
- An approach where team members start new work only when they have capacity, pulling the next item from a queue instead of having work pushed onto them.
- Cycle time (Kanban)
- The elapsed time from when a work item starts active work (e.g., enters In Progress) until it is completed (Done).
- Pair programming (XP)
- An XP practice where two developers work together at one workstation, with one typing (driver) and the other reviewing and thinking ahead (navigator).
- Test-driven development (TDD)
- An XP practice where developers write a failing automated test first, then write minimal code to make it pass, and finally refactor while keeping tests green.
- Continuous integration (CI)
- An XP practice where developers frequently integrate code into a shared mainline, triggering automated builds and tests to detect integration issues early.
- Refactoring
- The disciplined improvement of the internal structure of code without changing its external behavior, often supported by automated tests.
- Collective code ownership
- An XP practice where any developer can modify any part of the codebase, following team standards and keeping tests passing, reducing bottlenecks and silos.
- Product backlog
- An ordered list of everything that is known to be needed in the product, managed by the product owner.
Key Terms
- Kanban
- A flow-based method for managing work that emphasizes visualizing the workflow, limiting work in progress, and using pull-based work selection to improve flow and predictability.
- Cycle time
- In Kanban, the elapsed time from when a work item starts active work until it is completed.
- Refactoring
- The disciplined restructuring of existing code to improve its internal design without changing external behavior.
- Product backlog
- An ordered list of everything that is known to be needed in the product, managed by the product owner.
- Pair programming
- An XP practice where two developers collaborate at a single workstation, with one typing code and the other reviewing and thinking ahead.
- Extreme Programming (XP)
- An agile software development method that emphasizes technical excellence and built-in quality through practices like pair programming, test-driven development, continuous integration, refactoring, and collective code ownership.
- Collective code ownership
- An XP practice that allows any developer to change any part of the codebase, encouraging shared responsibility and reducing bottlenecks.
- Explicit policies (Kanban)
- Documented rules that define how work items move through the Kanban system, such as entry and exit criteria for each column.
- Continuous integration (CI)
- An XP practice where developers integrate code frequently into a shared repository, triggering automated builds and tests to detect integration issues early.
- Work-in-progress (WIP) limit
- A constraint on the number of work items that can be in a given state at one time, used to reduce multitasking, queues, and delays.
- Test-driven development (TDD)
- An XP practice where tests are written before code in a red-green-refactor loop to drive design and ensure automated coverage.