eXtreme Programming (XP)
eXtreme Programming (XP) is one of the best-known agile processes. Created by Kent Beck,22 it is considered by many to be "glorified hacking," but that is far from the case. XP is a disciplined approach, requiring skilled people who are committed to adhering closely to a core set of principles.
XP is a disciplined approach, requiring skilled people adhering to a core set of principles.
XP articulates five values to guide you in your project: communication, simplicity, feedback, courage, and respect. Further, it prescribes a set of practices to make these values concrete. Although it may be unclear whether somebody really adheres to a value, you can easily tell whether somebody adheres to the practice. XP practices are divided into primary and secondary. The primary practices are listed below.
- Sit together helps you to communicate more effectively by being physically collocated in the same room or office space.
- Whole team talks about the importance of building a cohesive team with a diverse set of skills required to complete the project.
- Informative workspace tells you that if an outsider spends 15 seconds in your workspace, he or she should be able to get a general idea of how the project is going. What are the issues you are facing and items you are working on?
- Energized work guides you in adjusting your work hours so that you function effectively when working and avoid burnout.
- Pair programming tells you to write all production code in pairs, with each person taking turns watching and assisting the other programmer write code.
- Stories allow you to specify, in one or two sentences, capabilities that typically take one or two days to implement. The customer prioritizes which stories to implement and in what order.
- Weekly cycle means that at the beginning of each week you plan what should be accomplished for that week by assessing status, prioritizing user stories, and dividing user stories into tasks that programmers sign up for.
- Quarterly cycle allows you to step back and determine how to improve process, remove bottlenecks, focus on the big picture of where to take the projects, and do coarse-grained planning for the next quarter.
- Slack is built in to the schedule as tasks that can be dropped or by assigning certain time slots as slack time.
- Ten-minute build forces you to trim your automated build and automated tests so that they take no more than 10 minutes.
- Continuous integration aims at reducing the overall cost of integration by forcing it to happen at least once every couple of hours.
- Test-first programming tells you to write automated tests before writing the code to be tested.
- Incremental design guides you in doing a little bit of design every day, but designing only for what you need today rather than for future possibilities.
XP also articulates a set of fourteen principles that function as the bridge between values and practices, guiding you in how to apply the practices effectively in order to adhere to the values. The principles are humanity, economics, mutual benefit, self-similarity, improvement, diversity, reflection, flow, opportunity, redundancy, failure, quality, baby steps, and accepted responsibility.