extreme programming (XP)
Extreme programming, or XP, is an agile software development method that takes everyday engineering practices such as testing, code review, and integration and applies them continuously instead of occasionally. Kent Beck shaped it on Chrysler’s C3 payroll project in the mid-1990s and described it in Extreme Programming Explained in 1999.
The name comes from turning those good practices up to the extreme. If reviewing code is good, two developers review it constantly by writing it together. Testing gets the same treatment, so tests come before the code, and integration happens many times a day instead of at the end of a project.
How It Shows Up in Practice
A Python developer rarely joins a team that calls itself “an XP shop” today. XP’s practices still show up everywhere, though, because so many of them became standard habits on agile teams.
Say two developers are pairing on a discount rule for a checkout service. Their afternoon leaves a trail of tiny, test-first commits that each reach the main branch within the hour:
13:05 Add failing test for 10% loyalty discount
13:20 Apply loyalty discount in calculate_total()
13:34 Extract discount rules into their own module
13:48 Add failing test for discount on an empty cart
14:02 Return zero total for an empty cart
Each commit carries both names, the build runs on every push, and nothing waits days for a separate review. That rhythm combines several named XP practices:
- Pair programming: Two developers share one task, with one typing and the other reviewing and steering.
- Test-first programming: Every change starts with a failing test, the loop now known as test-driven development.
- Continuous integration: Work merges into the shared codebase several times a day, checked by a fast automated build.
- Refactoring: The pair cleans up the design as soon as tests protect the behavior.
- Small releases: Working software ships in short increments so real feedback steers the next one.
Planning follows the same short loop. Work arrives as user stories that the customer prioritizes, and the team commits to what fits into a one-week cycle.
Values Behind the Practices
Beck framed XP as a stack of values, principles, and practices. The first edition named four values: communication, simplicity, feedback, and courage. The 2004 second edition, written with Cynthia Andres, added respect as a fifth.
Simplicity has the most visible effect on code. XP teams build the simplest design that passes today’s tests and avoid speculative features. XP even gave that instinct a name, YAGNI. The tests and constant refactoring are what make that safe, since the design can change cheaply when a new requirement actually arrives.
XP is also unusual among agile methods for prescribing how code gets written, not only how work gets planned. That’s why teams running Scrum for planning often borrow XP’s engineering practices to fill the gap.
Related Resources
Course
Test-Driven Development With pytest
In this hands-on course, you’ll see how to create Python unit tests, execute them, and find the bugs before your users do. You’ll learn about the tools available to write and execute tests, check your application’s performance, and even look for security issues.
For additional information on related topics, take a look at the following resources:
- Continuous Integration With Python: An Introduction (Tutorial)
- pytest Tutorial: Effective Python Testing (Tutorial)
- Continuous Integration and Deployment for Python With GitHub Actions (Tutorial)
- Continuous Integration With Python (Course)
- Testing Your Code With pytest (Course)
- Refactoring Python Applications for Simplicity (Tutorial)
- Continuous Integration With Python: An Introduction (Quiz)
- Effective Testing with Pytest (Quiz)
- Python Continuous Integration and Deployment Using GitHub Actions (Course)
- GitHub Actions for Python (Quiz)
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Martin Breuss • Updated Nov. 7, 2026