Extreme Programming (XP) is a type of software development methodology, focussed on software development best practices. XP improves a software project by focussing on the five values of communication, simplicity, feedback, courage, and respect:
- Communication – Ensuring all team members know what is expected of them. This means communicating system requirements to developers and collaborating between developers and business people. Example: Daily stand-ups.
- Simplicity – Start with the simplest solution first and add extra features later on. The goal is to reduce complexity as much as possible.
- Feedback – The team gets frequent feedback early and often from unit testing and customers. It is better to fail fast, learn, and make adjustments. Doing this earlier reduces waste and improves the product.
- Courage- Developers have confidence in their work, are persistent and do whatever it takes to resolve problems.
- Respect – Team members need to recognize people work differently and to respect each others differences.
XP Core Practices
XP uses 12 Core Practices grouped in 4 areas: Feedback, Continuous Process, Shared Understanding, and Programmer Welfare.
Feedback
- Whole Team – XP says the customer is an integral part of the team and must be onsite and available for face-to-face conversations and questions.
- Planning Game – This is the main planning process used in XP. There are two types of planning activities in XP – release planning and iteration planning. All XP team members participate in these meetings. The iteration planning meetings happen before each iteration begins and the release planning happens for each release.
- Pair Programming – All code is produced by 2 programmers on one task using one workstation. One programmer has majority of control while the other programmer reviews code. Roles and pairs should switch frequently.
- Test Driven Development (TDD) – Acceptance tests are written before coding begins. The initial code will fail since the functionality hasn’t been built. Coding will continue until the tests pass. This allows problems to be discovered early in development.
Continuous Process Practices
- Continuous Integration – Integration testing performed every time a programmer checks in a piece of code. Code conflicts are resolved quickly, which minimizes delays in the project.
- Refactoring – Restructuring existing code to make it more efficient. The external code behavior remains unchanged. Refactoring allows for a more efficient system design, helps avoid waste and promotes value.
- Small Releases – The delivery of software through frequent releases of live functionality. This allows the customer to get functionality quicker.
Shared Understanding
- Coding Standards – An agreed upon set of rules to which the entire development team adheres. They are used throughout the entire project and consistent to minimize defects.
- Collective Code Ownership – Everyone is responsible for the code and anyone can change the code. It increases quality, speeds up the delivery process, and increases cross-functionality.
- Simple Design – The team constantly asks if there is a simpler way to introduce the same functionality. XP recognizes that simple is the best design approach.
- System Metaphor – A story that everyone on the XP team can tell about how the system works. It is written in everyday language to provide clarity to those not on the team.
Programmer Welfare
- Sustainable Pace – Teams perform better when they are well-rested. XP does not believe in working overtime, developers shouldn’t work more than 40 hours per week.
When to use XP
XP is beneficial to smaller team that are focussed specifically on software development and work in rapidly changing environments. It is also recommended the development environment is mature, disciplined, and has customers onsite.