← All articles

Engineering Practices for Sustainable Scrum: XP Meets Scrum

By XNM Technologies · November 15, 2022 · 5 min read
Engineering Practices for Sustainable Scrum: XP Meets Scrum

Scrum is remarkably good at what it sets out to do: organise a team's work into short, inspectable cycles; create transparency about progress and impediments; and provide a regular cadence for planning, review, and adaptation. What Scrum does not prescribe is how the software gets built. That gap is not an accident — Scrum's authors deliberately left engineering practices out of the framework so it could apply broadly, including to non-software contexts. But for software teams, the gap has consequences. Without engineering discipline, Scrum's velocity-focused culture creates exactly the conditions in which technical debt accumulates rapidly: pressure to deliver working software every sprint, combined with no structural requirement to keep the codebase clean.

Extreme Programming (XP) was designed to fill exactly this gap. XP's engineering practices — test-driven development, continuous integration, refactoring, simple design, collective code ownership, and coding standards — are not optional extras for high-performing teams. They are the disciplines that allow a team to sustain velocity over time, rather than delivering fast for six months and then spending the next six months wrestling with a codebase that resists change.

The XP Practices That Complement Scrum

Six XP practices are particularly valuable for Scrum teams:

  • Test-Driven Development (TDD): write a failing test before writing the code that makes it pass. TDD forces clarity about what the code is supposed to do before it is written, produces a regression test suite as a natural by-product, and discourages over-engineering by demanding only what the test requires. Teams that practise TDD consistently report lower defect rates and greater confidence when refactoring.

  • Continuous Integration (CI): integrate code into a shared repository frequently — ideally multiple times per day — and run an automated build and test suite on every integration. CI eliminates the integration hell that plagues teams who work in long-lived feature branches and merge infrequently. It also makes problems visible immediately, when they are cheapest to fix.

  • Refactoring: improve the internal structure of existing code without changing its observable behaviour. Refactoring is not a project or a sprint; it is a continuous discipline practised in small increments as part of the daily flow of work. Without refactoring, every new feature is built on an increasingly shaky foundation.

  • Simple Design: design for today's requirements, not tomorrow's hypothetical ones. The simplest design that makes all tests pass and expresses the developer's intent clearly is the right design. Premature abstraction and speculative generalisation are forms of waste that make code harder to understand and change.

  • Collective Code Ownership: any team member can modify any part of the codebase at any time. This eliminates bottlenecks caused by code silos, distributes knowledge of the codebase across the team, and means the team as a whole — not individual contributors — is responsible for code quality.

  • Coding Standards: a shared set of conventions for naming, formatting, and structure that all team members follow. Standards reduce the cognitive load of reading unfamiliar code and make collective ownership practical. They do not need to be elaborate — a one-page agreement enforced by a linter is more effective than a 50-page style guide nobody reads.

Introducing XP Practices to a Scrum Team Incrementally

The mistake most teams make when introducing XP practices is trying to adopt all of them at once. The resulting disruption to workflow, combined with the learning curve for each practice, is often enough to cause the adoption to fail or to be abandoned after one sprint. The incremental approach is more effective:

  1. Start with coding standards. They are the least disruptive to introduce, deliver immediate value in code reviews, and create the shared vocabulary that makes other practices easier. Agree a standard, configure a linter, and enforce it in CI.

  2. Add continuous integration. If the team does not already have a CI pipeline, set one up. Even a minimal pipeline — build, run unit tests, report — changes the team's relationship with code quality. Problems surface in minutes, not at sprint review.

  3. Introduce TDD for new work. Do not require TDD for existing code immediately; the retrofit cost is high and the learning curve is steep. Instead, establish the norm that all new features and bug fixes are test-driven. Over time, the coverage of the codebase grows naturally.

  4. Build the refactoring habit. Make refactoring visible in sprint planning — "as part of implementing this story, we will also clean up the related module" — and protect the time for it. Teams that treat refactoring as something that happens in spare time find that there is never spare time.

  5. Move toward collective ownership. This is the most culturally challenging practice to adopt, particularly in teams where individuals have built expertise silos. Cross-functional pairing, mob programming sessions, and architecture reviews that rotate presenters all move the team toward broader ownership.

The Business Case for Engineering Practices

The business case for XP practices is ultimately a velocity argument. Teams that do not invest in engineering discipline tend to follow a predictable trajectory: fast delivery in the early sprints, slowing velocity as the codebase becomes harder to change, increasing defect rates as the test coverage falls behind, and eventually a renegotiation of the backlog because the accumulated debt has made new features prohibitively expensive to build correctly.

Teams that invest in engineering practices consistently deliver faster over a 12-month horizon than those that do not. The initial overhead of TDD is typically recovered within three to four sprints through reduced debugging and rework time. CI reduces the cost of integration by distributing it across the sprint rather than concentrating it at the end. Refactoring prevents the compounding of technical debt. Collectively, these practices do not slow teams down — they prevent the slowdown that inevitably comes without them.

XNM Consulting helps agile teams build the engineering discipline needed to sustain delivery velocity over the long term. and how we support high-performing Scrum teams.