Agile, XP, Scrum and Kanban
Study notes on Agile software development with focused coverage of Extreme Programming (XP), Scrum and Kanban, their definitions, key practices, metrics (Little's Law, velocity, throughput), worked examples and exam guidance.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Agile methods (Scrum, Kanban, XP) are widely used by software engineers to deliver working software frequently, adapt to changing requirements, and improve team collaboration. Engineers use these practices in product teams, devops/CI pipelines, and project management to increase predictability, reduce lead time and improve quality.
Key ideas
All defined terms are bold at first use.
Agile: A set of values and principles for software development that emphasizes individuals and interactions over processes and tools, working software over comprehensive documentation, customer collaboration over contract negotiation, and responding to change over following a plan. (This paraphrases the Agile Manifesto values.) Assumption: requirements and environment can change during development.
Agile Manifesto (exact statement): "We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools; Working software over comprehensive documentation; Customer collaboration over contract negotiation; Responding to change over following a plan. That is, while there is value in the items on the right, we value the items on the left more." Assumptions: human-centred teams, iterative delivery.
Scrum: An Agile framework for managing product development using fixed-length iterations called Sprints, defined accountabilities (Product Owner, Scrum Master, Developers) who form the Scrum Team, and artifacts (Product Backlog, Sprint Backlog, Increment) with commitments (Product Goal, Sprint Goal, Definition of Done). Assumption: the team is cross-functional and delivers a usable Increment each Sprint.
- Sprint: A time-boxed iteration of typically 1–4 weeks during which the team builds a usable increment. Draw: a timeline rectangle labeled with duration (e.g., 2 weeks) with arrows showing repeated cycles.
- Product Backlog: An ordered list of product backlog items (PBIs) or user stories describing desired features. Draw: a vertical list with top highest priority.
- Sprint Backlog: Subset of PBIs selected for a sprint plus tasks to implement them.
- Increment: The sum of all completed backlog items meeting the Definition of Done; there can be multiple Increments within a Sprint.
- Definition of Done: Explicit checklist specifying what makes an increment complete (code compiled, tests passed, documented, reviewed).
- Scrum Master: Facilitator who ensures Scrum is understood and followed; removes impediments.
- Product Owner: Responsible for backlog ordering and maximizing product value.
- Daily Scrum (standup): A 15-minute event for the Developers to inspect progress toward the Sprint Goal and adapt their plan; "standup" is a common but informal term.
- Sprint Planning, Daily Scrum, Sprint Review, Sprint Retrospective: The core events. Note: The Sprint itself is an event that contains the others. For diagrams: draw four boxes in cycle order with arrows between them and short labels for purpose.
Kanban: A pull-based method to manage flow of work with a visual Kanban board, explicit Work In Progress (WIP) limits, and continuous delivery. Assumption: work items are of variable size and can be pulled when capacity is available.
- Kanban board: Columns representing workflow stages (e.g., To Do, Doing, Done). Draw: three columns; annotate WIP limits on "Doing".
- WIP limit: Maximum number of items allowed simultaneously in a workflow column.
- Cycle time: Time from starting work on an item to finishing it.
- Lead time: Time from item request to item completion (includes queue time).
Extreme Programming (XP): An Agile methodology emphasizing technical practices: pair programming, test-driven development (TDD), continuous integration, small releases, and collective code ownership. XP complements Scrum; it prescribes engineering practices to achieve high quality.
User story: Short requirement statement in format: "As a <role>, I want <goal> so that <reason>". Complementary fields: acceptance criteria, story points.
Story points: A relative unit for estimating effort/complexity of stories (not absolute hours). Teams use techniques such as Planning Poker to estimate.
Velocity: Average number of story points the team completes per sprint. Used for forecasting (not for reward/punishment). Assumption: future sprints similar to past performance.
Little's Law (applies in stable systems with long-term averages): For a stable queueing system, average Work In Progress (L) equals arrival rate (λ) times average time in system (W): L = λ W. Assumptions: system is stable (average arrival rate = average departure rate), averages over long time, items are indistinguishable for averaging. Derivation provided below.
Derivation of Little's Law (sketch universities expect):
- Consider time interval T and N items that completed during T.
- Total time spent by all items in the system = sum of individual times = ∑ ti.
- Average time in system W = (1/N) ∑ ti.
- Average arrival/completion rate λ = N/T.
- Average number in system L = (1/T) ∑ ti = (N/T)·(1/N)∑ti = λ·W.
- Therefore L = λ W. Conditions: averages exist, T → large so transients negligible.
Draw for an exam: A queue diagram showing input arrivals, a service block, output departures. Label average arrival rate λ (items/hour), average time W (hours), and average number L (items). Show formula L = λ W.
Formulas
L = λ · W — Little's Law; L = average number of items in system (items), λ = average arrival (or throughput) rate (items / time), W = average time in system (time). Applies to stable systems and Kanban flow.
Throughput = Completed items / Time period — Throughput is items / time (e.g., stories/week). Apply when counting completed items over a measured interval.
Velocity = (Sum of story points completed in past N sprints) / N — Velocity in story points per sprint. Story points (unitless). Use N large enough for stability (3–5 sprints minimal).
Cycle time ≈ WIP / Throughput — Rearrangement of Little's Law: W = L/λ. WIP = L (items), Throughput = λ (items/time), gives average cycle time in time units.
Sprint capacity (story points) ≈ Team velocity × Sprint length factor — Practical rule for forecasting; adjust for holidays/availability. If the sprint length matches the historical velocity’s sprint length, the factor is 1; otherwise scale proportionally.
Worked examples
- Little's Law numeric example (Kanban) Given: team finishes on average 10 user stories per week (throughput λ = 10 stories/week). Average cycle time measured is 2 weeks. Question: What is average WIP? Steps:
- Use Little's Law: L = λ · W.
- λ = 10 stories/week, W = 2 weeks.
- L = 10 × 2 = 20 stories. Answer: Average WIP = 20 stories. (Unit: stories)
- Sprint capacity and velocity example (Scrum) Given: Team's past 4 sprint completed story points = 24, 28, 22, 26. Team plans a 2-week sprint. Two developers will be on leave for 1 day each during sprint (8 work hours lost each), but velocity historically already includes typical availability. Estimate sprint velocity and decide how many story points to pull. Steps:
- Compute historical velocity (assuming past sprints were also 2 weeks): (24+28+22+26) / 4 = 100 / 4 = 25 story points per sprint.
- If this sprint has slightly lower availability (2 developers × 1 day = 16 hours lost), but historical velocity already includes typical interruptions, be conservative and reduce estimate by 10%: 25 × 0.9 = 22.5 → round down.
- Choose sprint backlog of 22 story points (or 22–23 depending on splitting stories). Answer: Pull about 22 story points into sprint backlog.
- Short exam-style model answer: "Compare Scrum and Kanban" Points to cover (expected full-marks answer): definitions, planning cadence, roles, artifacts, metrics, strengths/weaknesses, when to use. Model answer (short): Scrum is an iterative time-boxed framework using sprints, fixed roles (Product Owner, Scrum Master, Dev Team), and ceremonies (planning, review, retrospective). It enforces regular planning and inspection points. Kanban is a flow-based method that visualizes work, uses WIP limits, and has no required timeboxes or fixed roles; it aims to optimize flow and reduce cycle time. Use Scrum when work benefits from regular inspection and planning (e.g., feature-centric teams); use Kanban when continuous flow and flexible priorities dominate (e.g., maintenance/support). Combine both: "Scrumban" for teams that want cadence plus flow control. Include examples and trade-offs to score full marks.
Common mistakes
- Setting WIP limits too high (then they have no effect) or too low (causes idle time) — WIP must be tuned.
- Believing Scrum requires a daily standup longer than 15 minutes or that the Scrum Master assigns tasks (the Development Team is self-organizing).
- Using Little's Law on non-stable short-term samples; it requires averaging over a steady-state period.
- Treating Kanban as "no process"—it still needs agreed workflow, policies and WIP limits.
For your exam
Question types you may get: definitions (Agile values, roles), short notes (compare Scrum/Kanban/XP), derivation/proof (Little's Law), numericals (compute WIP, cycle time, velocity), diagrams (draw Kanban board, Scrum cycle), and scenario-based planning (sprint capacity, backlog grooming). A full-marks answer: define terms, state assumptions, show formulas, provide a small diagram if asked, perform step-by-step calculations with units, and give concise conclusions or recommendations.
Quick check
- What are the four values of the Agile Manifesto (short list)?
- State Little's Law in symbols and give one assumption required for it to hold.
- Name three XP engineering practices. Answers: The Agile values are Individuals & interactions; Working software; Customer collaboration; Responding to change. Little's Law: L = λ·W; assumes a stable system and long-term averages. Three XP practices: Pair programming, Test-driven development (TDD), Continuous integration.
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?