NELKINDA SOFTWARE CRAFT

XP Explained

With this blog, Extreme Programming (XP) is brought to the readers with a basic introduction to find further inspiration to read and follow it.

Author:
Bharati Koot, Software Craftsperson at Nelkinda Software Craft Pvt Ltd
First Published:
by NNelkinda Software Craft Private Limited
Last Modified:
by Bharati Koot
Approximate reading time:

1 Introduction

This blog brings Extreme Programming to you from the book Extreme Programming Explained by Kent Beck that you can quickly have insights about and find an inspiration to read more about it and essentially to follow it!

Extreme programming (XP) is a software development methodology which is intended to improve software quality and responsiveness to changing customer requirements.
XP Definition from the [Wikipedia:Extreme Programming]
XP Elements



The elements of XP involve key things that help us to bring an efficient work environment, early feedback cycles, smooth releases, and better customer collaboration.
The important part of XP is to understand its Values, the Principles which help to grasp the Practices, and the XP Practices itself.
What suits for a need for a project or an organization may vary case to case basis. However, XP has established the methodology that helps to achieve individual as well as business goals effectively.

2 XP Values

XP explains 5 Values for fostering Software Development.
These Values are quite interlinked as in one value leads to help to achieve another Value.

XP ValueWhat it says
CommunicationIt is important to have communication in and around the team for knowledge sharing, problem-solving, team bonding, and team coordination.
SimplicityXP encourages the simplest possible solution, making you think YAGNI approach.
FeedbackXP expects shorter feedback loops so that things get handled as quickly possible.
CourageXP helps to have a courage element to seek real concrete answers which ultimately lead to the right feedback at the right time.
RespectXP fosters humanity and productivity ensuring to value everyone's contribution with respect.

3 XP Principles

XP Principles help you understand XP Practices in a better way.

XP PrincipleWhat it says
HumanityPeople developing Software need to feel safe, included, growing, and satisfaction with their contribution to work.
EconomicsThe important fact any point in time is business value, meeting business goals, and serving business needs.
Mutual BenefitXP focuses on practices that benefit everyone now, and in future as well. Like, automated testing, simple-readable code.
Self-similarityOne solution can be applied to another place and it might fit, or it might be a good start to know that the situation demands totally unique solution.
ImprovementXP brings excellence in Software Development through improvement. The aim is not really perfection but continuous refinement to reach there.
DiversityTeams need diversity in perspectives, skills, opinions, and ways of solving the problems. XP teaches to respect the opinions of each other and have smooth communication to agree upon the most efficient way in such diverse teams.
ReflectionReflection comes after action and is often necessary to understand feelings about actions, improvements in the actions.
FlowContinuous flow is important in Software Development to get consistent and faster feedback.
OpportunityProblems are opportunities for change. Part of being extreme is consciously choosing to transform each problem into an opportunity: of personal growth, deepening relationships, and improved Software.
RedundancyRedundancy is not always bad. It can be wasteful but should not be removed when it serves a valid purpose.
FailureIf you fail, you learn something valuable. Repeated failures bring you to different solutions and lead to a better solution ultimately.
QualityWe can’t make a compromise on quality. Higher quality demands often bring higher productivity and effectiveness, and also a sense of satisfaction as you feel proud about your work.
Baby-stepsTempting for big steps is natural when we try to solve big problems. Here, XP distinguishes by promoting baby steps to achieve the right solutions consistently. For example, Test-First Programming.
Accepted ResponsibilityResponsibility can not be assigned, it can only be accepted. XP practices reflect accepted responsibility by suggesting for example, who implements a user story, also unit tests it.

4 XP Practices

The purpose given by XP Values is achieved by XP Practices. The XP Practices executed together, amplify their effect and benefits in Software Development. There are two types of Practices defined by XP: Primary Practices and Corollary Practices.

4.1 Primary Practices

The Primary Practices provide a foundation of respect, communication, and feedback that fosters simplicity and courage.

XP Primary PracticeWhat it says
Sit TogetherThe more face time you have, the more humane and productive is the project.
Whole TeamPeople need a sense of Team.
Informative WorkplaceMake your workspace about your work.
Energized WorkWork as many hours as you can work productively and can be sustainable.
Pair ProgrammingWriting code with a pair on a single machine (analyze, design, code, test together).
Pairing and Personal SpaceWhile pairing personal space and individual differences should be respected so that pairing works comfortably and productively.
StoriesPlan using units of customer-visible functionality.
Weekly CyclePlan work a week at a time.
Quarterly CyclePlan work a quarter at a time. Once a quarter, reflect on the team, the project, its progress, and its alignment with larger goals.
SlackIn any plan, include some minor task that can be dropped if you get behind.
Ten-Minute BuildAutomatically build and test in 10 minutes. Build which takes more than 10 minutes will be used less often and leading to less feedback.
Continuous IntegrationIntegrate and build a complete product. The longer you wait to integrate, the more it costs, and more unpredictable the cost becomes.
Test-First ProgrammingWrite a failing automated test before changing any code. It creates a rhythm - test, code, refactor and repeat all again.
Incremental DesignInvest in the design of the system every day. XP teams are confident in their ability to adapt the design to future requirements.

4.2 Corollary Practices

It is important that we understand Primary Practices to understand Corollary Practices.

XP Corollary PracticeWhat it says
Real Customer InvolvementIncluding Customers in the development process fosters trust and encourages continuous improvement.
Incremental DeploymentFind a little piece of functionality you can handle right away. Deploy it. Incremental deployments save human and business costs.
Team ContinuityKeep effective teams together. By mostly keeping the teams together and yet encouraging a reasonable amount of rotation, the organizations get the benefits of both stable teams and consistently spread knowledge and experience.
Shrinking TeamsAs a team grows in capability, keep its workload constant but gradually reduces its size. This frees people to form new teams.
Root-Cause AnalysisWhen a defect is found, eliminate the defect and its cause. Use for example 5 Whys technique.
Shared CodeUntil the team has developed a sense of collective responsibility, no one is responsible and quality will deteriorate. The team needs to have collective ownership by practicing pair programming, continuous integration.
Code and TestMaintain only the code and test as permanent artifacts. Generate other documents from the code and tests.
Single Code BaseThere is only one code stream. You can use a temporary branch but always prefer working on master. If you have multiple code bases in place, put a plan in place for reducing them gradually.
Daily DeploymentPut new software in production every night. Any gap between what is on a programmer’s desk and what is in production is a risk.
Negotiated Scope ContractMoving in the direction of negotiated scope gives you a source of information with which to improve.
Pay-Per-UseMoney is the ultimate feedback. The pay-per-use system is one which charges on every single time system is used. The information generated by them helps us improve Software Development.

5 How the Values, Principles, and Practices Work Together

XP in a true sense tries to bring a healthy and productive work culture based on healthy work ethics.

With Respect for each individuals contribution, we already bring the inclusiveness in place which is obvious need being a human being. The XP practices like pair programming, sitting together, and bringing the sense of whole team help to meet these related Principles and Values.

Feedback is an important part of XP, which is backed up by Practices like test-first programming, pair programming, informative workplaces, continual processes which also foster courage and communication.

With pair programming, shared code, incremental design, test-first programming we get to the possible simplicity.

With weekly-quarterly cycles followed by root cause analysis at the necessary stage helps in better reflection and improvement in overall team culture and project itself.

Customer involvement leads to early feedback, early improvement, and trust relationships between the team and the Customer.

XP brings a discipline, a rhythm, a sense of satisfaction and collective individual plus business success, and a workplace that everyone would like to work in happily.