Agile Unit-5
Agile Unit-5
XP is a lightweight, efficient, low-risk, flexible, predictable, scientific, and fun way to develop a
software.
eXtreme Programming (XP) was conceived and developed to address the specific needs of
software development by small teams in the face of vague and changing requirements.
Embrace Change
A key assumption of Extreme Programming is that the cost of changing a program can be held
mostly constant over time.
• Writing unit tests before programming and keeping all of the tests running at all times.
The unit tests are automated and eliminates defects early, thus reducing the costs.
• Starting with a simple design just enough to code the features at hand and redesigning
when required.
• Programming in pairs (called pair programming), with two programmers at one screen,
taking turns to use the keyboard. While one of them is at the keyboard, the other
constantly reviews and provides inputs.
• Integrating and testing the whole system several times a day.
• Putting a minimal working system into the production quickly and upgrading it whenever
required.
• Keeping the customer involved all the time and obtaining constant feedback.
Iterating facilitates the accommodating changes as the software evolves with the changing
requirements.
Extreme Programming takes the effective principles and practices to extreme levels.
• Code reviews are effective as the code is reviewed all the time.
• Testing is effective as there is continuous regression and testing.
• Design is effective as everybody needs to do refactoring daily.
• Integration testing is important as integrate and test several times a day.
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
• Short iterations are effective as the planning game for release planning and iteration
planning.
Kent Beck, Ward Cunningham and Ron Jeffries formulated extreme Programming in 1999. The
other contributors are Robert Martin and Martin Fowler.
In Mid-80s, Kent Beck and Ward Cunningham initiated Pair Programming at Tektronix. In the
80s and 90s, Smalltalk Culture produced Refactoring, Continuous Integration, constant testing,
and close customer involvement. This culture was later generalized to the other environments.
In the Early 90s, Core Values were developed within the Patterns Community, Hillside Group. In
1995, Kent summarized these in Smalltalk Best Practices, and in 1996, Ward summarized it in
episodes.
In 1996, Kent added unit testing and metaphor at Hewitt. In 1996, Kent had taken the Chrysler
C3 project, to which Ron Jeffries was added as a coach. The practices were refined on C3 and
published on Wiki.
Scrum practices were incorporated and adapted as the planning game. In 1999, Kent published
his book, ‘Extreme Programming Explained’. In the same year, Fowler published his book,
Refactoring.
Extreme Programming has been evolving since then, and the evolution continues through today.
Success in Industry
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
• Rapid development.
• Immediate responsiveness to the customer’s changing requirements.
• Focus on low defect rates.
• System returning constant and consistent value to the customer.
• High customer satisfaction.
• Reduced costs.
• Team cohesion and employee satisfaction.
Extreme Programming solves the following problems often faced in the software development
projects −
XP Lifecycle:
With software engineering existing in such a fast-paced environment, traditional
project management approaches are no longer viable. That means that IT
professionals must find new ways to handle frequently changing development tasks.
Sharing this idea and focusing on the existing incremental development techniques, 17
software specialists introduced the Agile project management philosophy in 2001.
Principles of flexible, fast, and collaboration-centered software development were
outlined in the Agile Manifesto.
Software engineer Ken Beck introduced XP in the 90s with the goal of finding ways
to write high-qualitative software quickly and being able to adapt to customers’
changing requirements. In 1999, he refined XP approaches in the book Extreme
Programming Explained: Embrace Change.
Such a development process entails the cooperation between several participants, each
having his or her own tasks and responsibilities. Extreme programming puts people in
the center of the system, emphasizing the value and importance of such social skills as
communication, cooperation, responsiveness, and feedback. So, these roles are
commonly associated with XP:
1. Customers are expected to be heavily engaged in the development process by
creating user stories, providing continuous feedback, and making all the necessary
business decisions related to the project.
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
2. Programmers or developers are the team members that actually create the product.
They are responsible for implementing user stories and conducting user tests
(sometimes a separate Tester role is set apart). Since XP is usually associated
with cross-functional teams, the skill set of such members can be different.
3. Trackers or managers link customers and developers. It’s not a required role and can
be performed by one of the developers. These people organize the meetups, regulate
discussions, and keep track of important progress KPIs.
4. Coaches can be included in the teams as mentors to help with understanding the XP
practices. It’s usually an outside assistant or external consultant who is not involved in
the development process, but has used XP before and so can help avoid mistakes.
The XP Team
When we speak about various Agile methodologies, we see that there are only two things that
make them different methods. The first thing is the type and length of iterative cycles. In some
methodologies it is longer, in others – shorter. The second thing is the structure of the team. Each
Agile methodology has its own approach to team management. In this article we will tell you
about the Extreme Programming team.
Like in other agile methodologies, in XP you may not find all usual software development roles.
Extreme programming teams are small. Sometimes they are even single person teams. However,
they are able to perform the hardest software development industry tasks. That is because of the
fact that Extreme Programming is a methodology that was designed especially for delivering
the largest amounts of production within the shortest amounts of time. If an XP developer works
on a project alone, he can use an Extreme Programming team foundation server. There he can
find other XP specialists and cooperate with them. Such service is especially popular among
freelancers. However, large software development companies also use them to find employees
for their new projects.
Despite the fact that even one person can create an XP team; specialists usually define
seven Extreme Programming team roles. Let’s look at them in greater detail.
1. Programmer
His responsibility is to estimate user stories and separate them from technical tasks. He is also
responsible for estimating the time required to finish the project.
2. Tester
This employee is responsible for conducting functional tests and informing the team on their
results.
3. Tracker
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
This person’s main task is to interview the developers every week and find out if something in
their work goes wrong.
4. Customer
The customer is the main person in XP. He is the one who writes user stories and estimates the
final and intermediate product.
5. Coach
His main responsibility is to keep the project extreme. He teaches other team members how to
achieve this goal.
6. Manager
A very important role in every Extreme Programming team. This person is responsible for
conducting team meetings and making them effective.
7. Doomsayer
This role is also extremely important, because this person’s main task is to follow the progress of
the project and avoid problems in its realization, like not meeting the terms, or other failures.
1. Refactoring
Refactoring is the process of restructuring existing code without changing its external behavior.
It improves the internal structure of the software, making it more maintainable, readable, and
adaptable to future changes. Refactoring is a core practice in Extreme Programming (XP) and
Agile methodologies, as it helps keep the codebase clean and reduces complexity over time.
Examples:
Benefits:
2. Technical Debt
Technical debt refers to the long-term cost and complications that arise from choosing quick,
short-term solutions over more robust but time-consuming approaches. It is often the result of
rushed development, lack of refactoring, or postponed maintenance activities. Technical debt can
accumulate and lead to more bugs, slower development, and high maintenance costs.
• Deliberate: A known compromise is made for quick delivery, with the intention of fixing
it later.
• Accidental: Results from poor coding practices or lack of experience.
• Bit Rot: Accumulates over time as systems become outdated or less aligned with
evolving requirements.
• Regular refactoring
• Ensuring good coding standards
• Allocating time for technical improvements during iterations
3. Timeboxing
Timeboxing is the practice of setting a fixed amount of time for an activity, ensuring that tasks
do not extend indefinitely. The focus is on completing the work within the allocated time, even if
some functionality might need to be deferred to later. Timeboxing encourages focus, avoids
scope creep, and helps teams meet deadlines more consistently.
Applications:
Benefits:
User stories are short, simple descriptions of a feature or functionality from the perspective of the
end user. They are a common method for capturing requirements in XP and Agile. User stories
typically follow a simple format: "As a [type of user], I want [some goal], so that [some
reason/benefit]."
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
Example:
"As a customer, I want to be able to reset my password so that I can regain access if I forget it."
Key Elements:
Benefits:
5. Velocity
Velocity is a measure of how much work a team can complete in a given iteration, usually
measured in terms of story points, hours, or completed tasks. It reflects the team's capacity and
helps in planning future iterations by estimating how much work can be taken up.
Calculation:
Velocity is calculated by summing up the story points of all completed user stories in an
iteration.
Benefits:
Improving Velocity:
These concepts are central to XP and Agile methodologies, emphasizing iterative development,
continuous improvement, and maintaining high-quality code through disciplined practices.
Prerequisites
1. Team Commitment: All team members must be committed to XP practices and values. This
includes developers, testers, and stakeholders.
2. Management Support: Leadership must support the adoption of XP, providing the necessary
resources and encouraging a culture of collaboration and experimentation.
4. Cohesive Team: A stable and small team (ideally 5-10 members) that can work closely
together is vital for effective communication and collaboration.
5. Knowledge of Agile Principles: A basic understanding of Agile methodologies can help ease
the transition to XP.
Challenges
2. Skill Gaps: Not all team members may have experience with XP practices, leading to a steep
learning curve. Training and mentoring may be needed.
4. Integration with Existing Processes: Integrating XP with existing organizational processes can
lead to conflicts, especially if the organization is not fully Agile.
6. Short-term Focus: Teams may struggle to focus on long-term goals while delivering frequent
releases, which can affect project direction and vision.
7. Tooling: Choosing the right tools for continuous integration, testing, and collaboration can be
daunting, and inadequate tools can hinder the XP process.
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
Thus Successfully adopting XP requires careful planning, strong leadership, and a willingness to
embrace change. Addressing prerequisites and anticipating challenges can lead to a smoother
transition and ultimately enhance the quality and efficiency of software development.
This Agile software development technique is not well suited for everyone, however.
Learning to partner effectively in a team that close and share a work computer takes
skills that not all programmers possess. It requires both programmers to have the soft
skills required for collaboration, as well as the requisite hard skills to write and test
code. Some businesses may adopt the practice, while others may opt not to use it.
Pair programming uses the four eyes principle, which ensures two sets of eyes review
the code that is being produced, even when there is a division of labor. While the
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
driver writes the code, the navigator checks the code being written. The driver focuses
on the specifics of coding, while the navigator checks the work, code quality and
provides direction.
The process starts with the developers receiving a well-defined task. They agree on
one small goal at a time, such as writing code, testing or just taking notes. Any
discussions on direction or corrections can be made after each goal, as to avoid
interrupting the driver's flow. The two programmers can talk about the various
techniques and challenges, with the results usually being higher quality code than
when one person does the same work.
The two developers take turns coding or reviewing and check each other's work as
they go. Rotating roles regularly helps keep both developers alert and engaged.
Organizations may also have the pair rotate roles to work on different tasks. This way,
they get experience working on the different parts of the system being built.
Depending on how the pairs are coordinated, junior and senior developers can work
together, enabling senior developers to share their knowledge and working habits. It
also helps new team members get up to speed on a project.
• Fewer coding mistakes. Another programmer is looking over the driver's code,
which can help reduce mistakes and improve the quality of the code.
• Knowledge is spread among the pairs. Junior developers can pick up more skills
from senior developers. And those unfamiliar with a process can be paired with
someone who knows more about the process.
• Efficiency. Common logic might dictate that pair programming would reduce
productivity by 50%, because two developers are working on the same project at
one time. According to a blog post on Raygun, pairs work about 15% slower,
which is an improvement but is still less than the productivity of two separate
programmers.
• Equally engaging pairs. If both developers do not equally engage in the project,
then there is less chance that knowledge will be shared, and it is highly probable
that one developer will participate less than the other.
• Social and interactive process. It is hard for those who work better alone. Pairs
that have trouble together might be better suited to work by themselves; forcing
them to collaborate may hurt their work ethic.
• Sustainability. The pace may not be suited to practicing hours at a time. Likely,
developers will need breaks at different times.
Pair programming styles and techniques
Pair programming uses three general programming styles: the driver/navigator style,
unstructured style and ping-pong style.
Unstructured style. Most pair programming relationships fall into the unstructured
style, where two programmers work together in an Ad hoc manner and collaboration
is loosely guided. Both programmers should have matching skill levels. A common
variant of this style is the unstructured expert-novice pair, where an expert
programmer and a novice are paired together.
Ping-pong style. With the ping-pong approach, one developer writes a test and the
other developer makes the test pass. Each person alternates between writing and
passing tests. When two developers shift roles regularly, it is unlikely one
programmer will control the workflow. This style of pair programming is normally
performed in conjunction with test-driven development.
Development teams should also choose pair programming styles that align with the
skills of the programmers involved. Potential skill pairs include:
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
Expert/expert pairs. Two experts can generally work within any pair programming
style. Advanced programmers may prefer the ping-pong style, as it allows them to
have even participation.
• Switch roles consistently. This promotes the sharing of more skills between
developers and keeps them engaged.
• Pair up carefully. Ensure the two developers will be able to work together well,
without any hiccups. Otherwise, this will make for a poor work environment.
• Submit code frequently. Quick commits to code pair well with switching
between the driver and the navigator.
• Ask for clarification when needed. Particularly when a novice works with an
expert, the novice should take any opportunity to learn.
• Take breaks when needed. Work at a pace that fits both developers.
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
Developer pairs should schedule meetings each week for the same day and time in
order to establish the objectives of each pair programming session before it starts. If a
team is just moving to remote pair programming, then extra time should be allocated
to work out any kinks and try different styles.
requirements did not come about until the customer review, which was after the
solution was developed.
Other than for bug fixing, the developers had little or no communication with each
other. They worked separately on different features. This led to becoming a barrier to
discussions regarding improvement in working methods.
Moreover, the projects were not documented. There was no project manager to track
the projects or to make sure that the requirements laid out by the customer were being
met. The developers worked only on what was asked to be done.
The Journey
The team at Krizp System was introduced to the concepts behind the different Agile
frameworks. The XP method was employed over a span of one month and the results
were assessed.
The CEO of the company took on 2 roles: the customer representative and the tracker.
For his first role, he prioritized user stories, delegated them to the development team,
and had regular communication with the customer. As the tracker, he kept track of the
time to complete specific tasks. The CEO also initiated the planning game every week
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
(or at least once in four days), as the project was small and developers could complete
tasks in one user story faster. However, the customer was available for direct
communication only twice per month and the rest of the time he was in contact
through phone calls and e-mail.
The Paired Programming technique was adopted whereby both developers worked
together. After task completion, both of the developers reviewed the code with the
CEO.
Customer tests were introduced and the team worked on continuous design
improvements, which were about 12-15 per month.
Summary
The XP approach seemed to have a good impact on the software development cycle
for the company. Some of the positive changes included:
The Journey
In the first case study, at IBM, the researchers wanted to study the impact of adopting
the XP approach on productivity, quality, and customer satisfaction. A year-long
study was conducted on a team of 7 – 11 members regarding the adoption of XP
practices. The team was responsible for developing Servlet/XML applications for a
toolkit utilized by other IBM teams to create products for external customers. The
case study analyzed 2 approaches on consecutive releases of the same product. The
first one was the traditional waterfall approach and the second was XP.
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
In the second case study, at Sabre Airline Solutions, the same method was used i.e.
comparing 2 approaches through different releases of the same product. The team
worked on developing a scriptable GUI environment for external customers to
develop customized end-user and business applications. The team comprised 6-10
members. The old release was finished 3 years prior (spanning 18 months) using the
waterfall method whereas the new release was completed recently (spanning 3.5
months), using XP.
The first step was to establish an Extreme Programming Evaluation Framework (XP-
EF), which comprised three parts: XP Context Factors (XP-cf), XP Adherence
Metrics (XP-am), and XP Outcome Measures (XP-om):
In addition to the framework, interviews were conducted with team members and
customers to help understand the incorporation of XP by the team for the customer’s
satisfaction.
Summary
At IBM, the XP method seemed more productive compared to the waterfall method
by the following measures:
• Test Defects: for pre-release, the defects were 50% lesser and for post-release,
the defects were about 40% lesser in the release through the XP approach.
• Productivity: There was a significant increase in staff productivity using the
XP approach than in the waterfall method.
• Customer Satisfaction: Customer satisfaction was noted to be high in XP and
documented as N/A for the waterfall.
• Morale: The morale of the stakeholders was recorded as high in XP and
documented as N/A for the waterfall.
• Defect Collection Period: As the first release was created over 18 months, the
defect collection period was also longer in the waterfall-based approach. It was
significantly shorter in XP base release.
• Test Defects: for pre-release, the defects were 65% lesser and for post-release,
the defects were about 46% lesser in the release through the XP approach.
• Productivity: Staff productivity using the XP approach was about 46% higher
than in the waterfall method.
• Customer Satisfaction: Customer satisfaction was noted to be high in XP and
documented as N/A for the waterfall.
• Morale: The morale of the stakeholders was about 68% XP and documented as
N/A for the waterfall.
Using XP:
Using XP:
The following are some of the ways nTask can help you plan and achieve your project
goals better, all within the XP framework.
1. Meeting Scheduling
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
You can schedule your sit-ins, weekly meeting as well as quarterly meetings
beforehand. The agenda and timings of the meetings can be specified. You may define
a fixed time for the meeting or send out a suggested time to the team, to be finalized
after team responds.
This application also allows you to note down all the important points discussed in a
meeting. The minutes can be then reviewed and published for the rest of the team.
2. Team Allocation
You may arrange your team and the roles they will undertake through the team
allocation section. You can easily define roles for the developers, the trackers, and the
customer.
3. Project Creation
The customer may create the project and specify the requirements. The customer can
also define the budget and timeline.
If the stories are completed before time by some of the team members, the customer
can assign them the “slack” tasks i.e. lower priority tasks within the remaining
timeline. This saves time working faster towards project completion.
1. Project Flow
The Project Manager or Tracker can help keep track of the project flow through the
Timesheet module. This module allows for effective monitoring and evaluation of
project progress. It helps individually assess the timeline for different tasks as well as
the milestones reached or pending.
2. Easy Collaboration
At times it is not possible to hold face-to-face meetings e.g. when a certain team is
working on another site. In such cases, automated updates on projects, tasks, and
meetings can ensure timely and effective team collaboration and discussion. This
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
avoids time being wasted in the manual arrangement of project and task follow-up,
communicating meeting of minutes, or project updates.
Real-Time Comments provide an easy way to communicate with the team. Whether it
is the exchange of information or new ideas, this makes it easy for the team to stay on
the same page.
The interdependent tasks are highlighted and each team member can check the
updates instantaneously as updated by the other team members. This keeps the team
updated on the changing situations and in planning the next task, accordingly.
Moreover, the customer can directly collaborate with the team and update any change
in requirements.
3. Transparency
nTask gives a transparent view of all the projects and corresponding tasks and sub-
tasks through its Taskboard. Any project created or modified is communicated to the
team, immediately. There is no need for rechecking progress updates, meeting
invitations, or project reports.
The tasks updated, modified, or deleted paves way for the entire team to be fully
aware and know exactly what is being accomplished and when.
With its Filter option, you can choose to see updates for selected projects based on
priority or the task at hand. With the Status option, the status of the selected task can
be seen as whether it has started or not, completed or in progress.
XP’s primary goal is to deliver working software in an iterative fashion through rapid,
continuous feedback from stakeholders.
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
1. Planning
During this phase of XP project management, the team identifies the overall goal of
the project and any constraints that will affect its success (such as budget or timeline).
Once a clear vision is set for the end product, then it’s time to break down tasks into
manageable pieces to move forward with development.
2. Analysis
In this stage of XP project management, developers investigate existing systems (if
applicable) to better understand user needs and identify potential areas that need
improvement or optimization within existing processes. This step also helps inform
more optimal solutions during later design stages in order to create superior products.
3. Design
INTRODUCTION TO EXTREME PROGRAMMING (XP) Unit-V
At this point in the process, all user requirements have already been identified from
previous analysis steps so it’s time to start developing a plan for how they will be met
through code development techniques such as object-oriented programming or
structured query language (SQL). The goal here is not just creating effective code but
also designing it in an efficient way so resources are used optimally.
4. Coding
After finishing up designs from earlier steps then it’s time for developers to actually
write their code! This usually involves multiple short cycles where the first code gets
built out quickly with simple features followed by additional rounds where needed
features are added on top until desired functionality has been reached.
5. Testing
Last but not least comes testing! All written code gets verified through different types
of tests including unit testing plans which verify individual pieces work correctly;
integration tests which ensure different functionalities work together properly; system
tests which confirm larger components function like expected.