Agile and XP: Key Concepts and Practices
Agile and XP: Key Concepts and Practices
Questions:
UNIT-I — Introduction to XP & Agile
[Link] is Extreme Programming (XP)? Explain its key values and practices.
Unit II — Collaborating
1
marij
[Link] the role of trust in agile teams. Give examples of how to build and maintain
trust.
[Link] does "sit together" mean in XP/agile? Describe benefits and limitations
(especially for distributed teams).
[Link] ubiquitous language and explain how it helps team communication (give a
short domain example).
[Link] are coding standards? Why are they important for collaborative development
and collective ownership?
[Link] is an iteration demo (iteration review)? What does it accomplish and who
attends?
[Link] kinds of reporting (progress/status reporting) are useful for agile teams and
stakeholders? Give examples.
[Link]/definition style: “Give one sentence each for — Trust; Sit together; Real
customer involvement; Ubiquitous language; Stand-up meetings; Coding standards;
Iteration demo; Reporting.”
UNIT-III — Releasing
2
marij
UNIT-IV — Planning
-Relative Estimation
3
marij
-Time-boxing
UNIT-V — Developing
A. Definition of Agile
4
marij
Programming (XP) is one of the most popular and well-known approaches in the family
of agile methods.
The core differences between Agile (like XP/Scrum) and Traditional (e.g., Waterfall)
development lie in their approach to requirements, flexibility, customer involvement,
and delivery pace.
5
marij
The Agile Manifesto states that while there is value in the items on the right, we value
the items on the left more:
The four values are supported by 12 Principles that guide Agile development practices:
7
marij
(Answer based on the detailed response from the previous turn, incorporating
external search for complete values/principles not fully detailed in the source, but
maintaining focus on the source's concepts.)
8
marij
The Extreme Programming (XP) life cycle is iterative and incremental, revolving around
delivering a working, testable system frequently. It consists of five main phases:
Planning, Designing, Coding, Testing, and Listening (Feedback).
Explanation of Phases:
9
marij
a. Activity: Developers focus on creating the simplest design that will work
efficiently now.
b. Practice: This phase is heavily integrated with Coding and uses Spike
Solutions (simple programs to explore technical suitability) and
Refactoring (continuous design improvement). Complex design
documentation is avoided.
3. Coding (The Build):
a. Activity: This is where the actual code is written in very short cycles.
b. Practices: Key XP practices are strictly enforced: Pair Programming
(real-time code review) and Test-Driven Development (TDD), where a
test is written before the code. Coding Standards are followed to
maintain uniformity.
4. Testing (The Verification):
a. Activity: Testing is constant and integrated throughout the cycle.
b. Practices: This involves automated Unit Tests (written by developers)
and Acceptance Tests (Customer Tests). Continuous Integration
ensures that all new code works with the existing system.
5. Listening (The Feedback Loop):
a. Activity: The team regularly seeks feedback from the customer and
stakeholders.
b. Practice: This is done via the Iteration Demo (review of the completed
increment). The feedback gathered immediately feeds back into the
Planning phase to adjust priorities and requirements for the next
iteration, completing the loop.
Scrum and XP are both Agile frameworks that promote iterative development, but they
focus on different aspects of the process. Scrum is a project management
framework, while XP is a software engineering framework.
Par
am Extreme Programming (XP) Scrum
eter
Pri
Project Management and Team
mar Technical Practices and Engineering
Coordination. Focuses on
y Excellence. Aims to improve code quality
framework, roles, and time
Foc and rapid adaptability [search].
management [search].
us
10
marij
Iter
atio
Typically shorter, often 1 to 2 weeks long Typically 2 to 4 weeks long
n
[search]. [search].
Len
gth
Cha
Very high. Changes (e.g., swapping a Low/Strict. Changes are not
nge
feature of equivalent size) are highly allowed into the sprint backlog
Tole
amenable within an iteration, provided once the Sprint Planning Meeting
ran
work hasn't started [search]. is finished [search].
ce
Key Mandatory ceremonies: Sprint
Mandatory technical practices: Pair
Pra Planning, Daily Scrum (Stand-
Programming, TDD, Refactoring,
ctic up), Sprint Review, Sprint
Continuous Integration.
es Retrospective [search].
Clearly defined roles: Product
Rol Fewer formal roles: Customer (On-Site),
Owner, Scrum Master,
es Developer, Coach [search].
Development Team [search].
Cod Code quality and engineering
Quality assurance is a built-in,
e practices are typically left to the
continuous discipline (TDD, Pair
Qua self-organizing Development
Programming).
lity Team to define [search].
1. The Driver: Writes the code, focusing on the immediate goal and typing.
2. The Navigator: Continuously reviews the code, thinks strategically, identifies
errors, and suggests design improvements.
Pair Programming supports several XP values and enhances team productivity and
code quality:
11
marij
A. Definition
12
marij
3. Increases Bus Factor: It ensures that knowledge about different parts of the
codebase is widely distributed. This is supported by practices like Pair
Programming and Continuous Integration.
4. Enables Problem Solving: Collective ownership allows the team to solve
problems no matter where they may lie in the system. If a problem is found, the
team collectively addresses it, rather than waiting for a specific resource.
5. Shared Responsibility: Successes and failures are shared, not assigned to
individuals, fostering a culture of mutual support and accountability.
Energized Work (or Sustainable Pace) is an XP practice rooted in the Agile principle
that states: "Agile processes promote sustainable development. The sponsors,
developers, and users should be able to maintain a constant pace indefinitely"
[search].
Energized Work focuses on maintaining high productivity over the long term by
ensuring developers are rested, engaged, and free from chronic pressure.
13
marij
C. Benefits
A. Definition
B. Key Principles
• Task/Kanban Board: A physical or digital board (e.g., using sticky notes) clearly
showing the state of work for the current iteration, categorized into columns like
To Do, In Progress, Testing, and Done.
• Product Backlog/Stories: Large cards or documents that list all remaining User
Stories for the project, prioritized by the customer.
• Radiators: Information displayed prominently (on a monitor or whiteboard) that
"radiates" key data, such as:
14
marij
12. What are Retrospectives? Why are they important? (10 Marks)
A. Definition of Retrospectives
Retrospectives are formal, recurring meetings held at the end of every iteration (sprint)
in Agile frameworks. They provide a structured opportunity for the team to reflect on
the past iteration and continuously improve their processes, collaboration, and
delivery.
B. Main Objective
The main objective is to Inspect and Adapt—to identify what worked well, what didn't,
and what the team will change moving forward.
C. Importance (Benefits)
15
marij
4. Fosters Team Ownership: By giving every team member a voice in shaping the
way they work, retrospectives promote autonomy and ownership over the
development process (Self-Organizing Teams).
5. Learning from Experience: Retrospectives provide a vital mechanism to learn
from both successes (what to keep doing) and failures (what to change).
Root Cause Analysis (RCA) is the formal process of identifying the fundamental
reason—the root cause—for a problem (like a bug, defect, or process failure), rather
than merely addressing the superficial symptom. In XP, RCA is highly important
because the goal is to fix the underlying design flaws that breed more bugs.
B. Application in XP
1. Defect Prevention: When a defect is discovered, the XP team's goal is not just
to fix the bug, but to prevent it from ever happening again. RCA is used to
determine:
a. Why did the code allow this bug? (Poor design/Refactoring needed)
b. Why did our process not catch this bug earlier? (Test coverage/TDD gap)
2. Fixing the Process: The insights from RCA are used to Fix the Process itself. For
instance, if a category of mistake is found repeatedly during Exploratory
Testing, the team must use RCA to figure out the systemic failure and make that
type of mistake impossible to repeat in the future.
3. Refactoring Integration: RCA often reveals that the root cause of repeated bugs
is technical debt (complicated, confusing code). This directs the team to use
Refactoring on the offending code sections to reduce future risk.
C. Techniques (Implied)
A common technique for simple RCA is the "Five Whys," where the team repeatedly
asks "Why?" until the fundamental process or design flaw is identified. The result of the
RCA informs the next set of stories or refactoring tasks.
16
marij
XP is not a universal fit; it is best suited for projects that align with its practices and
values. The criteria for choosing or adopting XP are:
15. Explain Thinking (in XP) and how it improves design. (10 Marks)
A. Definition of Thinking in XP
In the context of XP, Thinking is not a separate phase of long-term planning, but rather
the continuous, integrated process of focusing on Simple Design and using iterative
refinement to improve the software's structure.
XP rejects the idea of Big Design Up Front (BDUF). Instead, it relies on two core
"Thinking" mechanisms:
1. Simple Design: Always implement the simplest system that will work now,
avoiding effort on speculations of future requirements. The principle is to think
about the immediate need, and nothing else.
17
marij
• Focus on Immediate Value: By thinking about the simplest system that passes
all current tests, the team avoids over-engineering and keeps the design
lightweight and flexible.
• Design Emerges Incrementally: Good quality design is important, but XP
ensures that design is not just a one-time event; everybody should design daily.
The design emerges over time through small, incremental changes [search].
• The Power of Refactoring: The act of Refactoring forces the developer to
understand the unfamiliar code and makes the design clearer for the next
person. Refactoring fixes underlying design flaws that accumulate as technical
debt, ensuring the design remains simple, clear, and easy to maintain over the
project's lifespan.
• Test-Driven Design: TDD forces the developer to think about how the code will
be used (tested) before it is written. This leads to code that is inherently more
modular, cohesive, and easy to test—all hallmarks of good design.
The "Beyond Deadlines" concept in Agile is tied directly to the Sustainable Pace
principle (or Energized Work) and is a rejection of chronic, unrealistic deadlines and
forced overtime. It argues that a successful project prioritizes predictability and
quality over a single, arbitrary date. The delivery dates are decided by empowered
teams of talented individuals.
B. Importance in Agile
18
marij
In essence, Agile moves the goalpost from hitting a date (which often compromises
quality) to hitting a pace (which guarantees a predictable, high-quality flow of
features).
A. Agility (Mindset)
Agility is the abstract concept, the philosophical mindset, or the organizational ability
to respond effectively to change.
Agile methods (or methodologies) are the concrete, practical frameworks, practices,
and toolsets used to achieve agility.
• Definition: These are the established prescriptive processes that guide a team's
day-to-day work.
• Examples: Extreme Programming (XP) (focusing on technical excellence),
Scrum (focusing on project management, roles, and time-boxing), and Kanban
(focusing on flow and limiting Work-in-Progress) [search].
• Focus: They are about how you work—using sprints, daily stand-ups, pair
programming, and velocity metrics.
19
marij
C. Relationship
Agility is the goal; Agile methods are the means to achieve it. A team might use an Agile
method like Scrum, but if they lack the underlying agility (e.g., they still punish mistakes
or refuse to welcome changing requirements), they are merely doing "pseudo-Agile"
and missing the core benefits.
UNIT II — Collaborating
1. Define collaboration in agile/XP and list its key practices. (10 Marks)
Collaboration in Agile methodologies (like XP) is defined as the close, continuous, and
effective interaction among team members and with stakeholders. It relies heavily on
the Agile value of individuals and interactions over processes and tools. The team's
goal is shared ownership, transparency, and rapid alignment, achieved through
frequent, direct communication.
The provided source material lists eight key practices to help a team and its
stakeholders collaborate efficiently:
1. Trust: Essential for the team to thrive, enabling psychological safety and self-
organization.
2. Sitting Together (Co-location): Leads to fast, accurate, and fluid
communication, which reduces misunderstandings.
3. Real Customer Involvement (On-site Customer): Helps the team deeply
understand what to build by providing immediate answers and clarification.
4. Ubiquitous Language (UL): A shared set of domain-specific terms that helps all
team members (developers, customers, testers) understand each other
perfectly.
5. Stand-up Meetings (Daily Scrum): Short, focused meetings that keep team
members informed of progress, blockages, and next steps, promoting
transparency and quick problem resolution.
6. Coding Standards: Provides a template for seamlessly joining the team’s work
together, ensuring uniformity and supporting collective code ownership.
7. Iteration Demos (Review): Keeps the team’s efforts aligned with stakeholder
goals by reviewing completed, working software at the end of each iteration.
20
marij
8. Reporting: Helps reassure the organization and key stakeholders that the team
is working well, providing transparency on progress and business value.
2. Explain the role of trust in agile teams. Give examples of how to build
and maintain trust. (10 Marks)
Trust is fundamental and essential for the team to thrive and perform well.
21
marij
Sitting Together (or Co-location) means arranging the workspace so that all team
members (developers, testers, and the on-site customer) are physically located
together in an open space. It is one of the core practices that leads to fast, accurate
communication.
B. Benefits
1. Impractical for Distributed Teams: The primary limitation is that physical co-
location is impossible for distributed or remote teams [search].
2. Loss of Fluidity: For distributed teams, the rapid, implicit communication is lost
and must be artificially created using tools (like video conferencing, shared
digital whiteboards, and continuous chat/collaboration tools).
3. Time Zone Challenges: Significant time differences can make real-time
collaboration (like stand-ups or pair programming) difficult or impossible.
22
marij
B. Why it is Essential
1. Co-location: The customer physically sits together with the development team.
2. Writing User Stories: The customer is responsible for writing the User Stories
that define the system's functionality.
3. Iteration Demos: The customer attends the Iteration Demo to review the
working software and formally Accept the completed features.
4. Acceptance Testing: The customer is often involved in defining and executing
the Acceptance Tests (Customer Tests) that determine if a feature is truly "done
done".
23
marij
Ubiquitous Language
Concept Confusing Terms (Non-UL)
Term
A registered user’s
User, Client, Customer Object, Profile Member Entity
account
Check-out, Transaction Submission,
Placing an order Enrollment
Buy
The fee paid for a service Cost, Price, Charge Subscription Dues
If the UL term is established as "Enrollment," the code will have a class called
Enrollment, the customer will talk about "Enrollment status," and the database will
have an Enrollment_ID field.
24
marij
Stand-up Meetings (or Daily Scrums) are short, daily synchronization meetings held in
Agile teams. The primary purpose is to promote transparency, alignment, and quick
problem resolution. They are designed to keep team members informed of progress
and to ensure everyone is focused on delivering the current iteration’s goal.
The meeting is strictly time-boxed (usually 15 minutes) and is held standing up to keep
it short and focused. During the stand-up, each team member answers three questions
regarding the iteration goal:
1. What did I do yesterday? (That helped the Development Team meet the Sprint
Goal.)
2. What will I do today? (To help the Development Team meet the Sprint Goal.)
3. Are there any impediments (blockers) in my way? (That prevent me or the
Development Team from meeting the Sprint Goal.)
C. Best Practices
25
marij
Coding standards are a set of rules and guidelines that provide a template for
seamlessly joining the team’s work together. They govern aspects like naming
conventions, file organization, commenting rules, and formatting style.
A. Definition
An Iteration Demo (or Sprint Review) is a meeting held at the end of every iteration
where the development team showcases the working software they have completed
during that period.
26
marij
B. What it Accomplishes
1. Alignment with Stakeholder Goals: It serves to keep the team’s efforts aligned
with stakeholder goals by confirming that the increment of software built is what
the customer actually wanted.
2. Formal Acceptance/Feedback: The primary goal is to get formal customer
acceptance (or rejection) of the completed features. This is the final step where
the customer agrees that the story is "done done".
3. Real-Time Learning: Stakeholders provide invaluable feedback on the delivered
functionality. This feedback immediately informs the priorities and requirements
for the next iteration.
4. Motivates the Team: It is a chance for the team to celebrate their success and
gain recognition for the tangible working software they delivered.
C. Who Attends
Reporting helps reassure the organization that the team is working well. Agile reporting
focuses on tangible results and flow, rather than traditional metrics like hours spent or
adherence to a fixed plan.
Repor
Definition and Focus Usefulness for Stakeholders/Team
t Type
Planning & Forecasting. Used by
stakeholders to estimate how long it
The measure of how many points
will take to complete the remaining
Veloc (work) a team can reliably complete
backlog. Used by the team to
ity in a single iteration on average
determine what they can safely
[search].
commit to in the next iteration
[search].
Burnd Burndown: Shows the work Real-time Progress Tracking.
own/ remaining over time in the current Provides an immediate visual
27
marij
Practic
Agile/XP Team Traditional (Waterfall) Team
e
Commu
Structured, Slow, and Document-
nication Fluid, Fast, and Face-to-Face.
Driven. Information flows through
Flow Information is shared instantly
formal channels (emails, status
(Sit and implicitly via co-location.
reports, documents). Communication
Togethe Reduces ambiguity immediately.
requires scheduling.
r)
Custom Continuous and Iterative. Infrequent and Late. Feedback occurs
er Feedback is solicited and acted primarily at the end of major phases
Feedba upon every few weeks during (e.g., after the development phase or
ck the Iteration Demo. Feedback is during final User Acceptance Testing).
(Demo/ immediate and low-cost to Feedback is often high-cost to
Review) incorporate. incorporate.
28
marij
Challe
Impact on Collaboration Solution (Adaptation)
nge
Distrib Cannot achieve "Sit Together," Implement high-bandwidth digital tools
uted/R leading to slow, lower-fidelity (video conferencing, shared boards) to
emote communication and lost maintain digital connectivity. Overlap
Teams empathy. working hours for core collaboration time.
The team loses its sole source
Find a dedicated, empowered Proxy
Unavail of truth, leading to
Product Owner or Business Analyst to act
able assumption-based
as the full-time representative. Refuse to
Custo development, incorrect
start work on stories without customer
mers prioritization, and costly
acceptance criteria.
rework.
Lack of Team members hide mistakes,
Introduce Pair Programming to enforce
Trust/B fear speaking up in
shared risk. Management must eliminate
lame Retrospectives, and avoid
blame and use Retrospectives to focus on
Cultur honest estimates, leading to
fixing the process, not the person.
e low psychological safety.
Coding Enforce Coding Standards. Automate
Friction and time lost in
Style style checks in the Continuous
merging code, frustrating
Conflic Integration (CI) pipeline to provide
Collective Code Ownership.
ts immediate, objective feedback.
Ubiquit New features introduce new
Maintain a visible, living Glossary of all UL
ous terms that conflict with
terms. Review and agree upon new terms
Langua existing ones, leading to
during Stand-ups or Planning Meetings.
ge Drift confusion.
29
marij
12. Short/definition style: “Give one sentence each for — Trust; Sit
together; Real customer involvement; Ubiquitous language; Stand-up
meetings; Coding standards; Iteration demo; Reporting.” (10 Marks)
1. Trust: Trust is the essential foundation for an Agile team to thrive, enabling self-
organization, psychological safety, and mutual respect among all members and
stakeholders.
2. Sit Together: This practice refers to physically co-locating the entire team
(including the customer) in an open workspace to facilitate fast, accurate, face-
to-face communication.
3. Real Customer Involvement: This means having a dedicated on-site customer
working full-time with the team to provide immediate answers, continuous
prioritization, and acceptance of delivered features.
4. Ubiquitous Language: A single, agreed-upon set of domain-specific terms used
consistently by all team members in conversation, documentation, and code,
eliminating ambiguity.
5. Stand-up Meetings: Short, daily, time-boxed meetings that promote team
transparency, keep members aligned on the iteration goal, and quickly raise any
impediments (blockers).
6. Coding Standards: A defined set of rules and guidelines that standardize code
style and conventions, ensuring uniformity and enabling seamless collaboration
and collective ownership.
7. Iteration Demo: A recurring meeting at the end of an iteration where the team
showcases the working software to stakeholders to gain formal customer
acceptance and valuable feedback.
8. Reporting: The practice of using metrics focused on flow and value (like velocity
and throughput) to reassure the organization that the team is working effectively
and delivering business value.
1. What is a Bug-Free Release? Explain the practices that ensure it. (10
Marks)
30
marij
A bug or defect is defined as any behavior of your software that will unpleasantly
surprise important stakeholders. The goal of a Bug-Free Release is to eliminate a
long, separate testing phase by keeping the software in a Production-Ready state at all
times. The strategy allows turning a typical "big release push" into a rapid 10-minute
tap.
1. "done done": Ensures that completed work satisfies the stringent definition of
Production-Ready Software, which includes being coded, tested, refactored,
integrated, and formally accepted by the customer.
2. No bugs: A continuous commitment to virtually zero defects, achieved by writing
fewer bugs (TDD/Pair Programming) and fixing bugs quickly when they are found.
3. Version control: Coordinates changes, provides history, and allows team
members to work together without conflicts.
4. A ten-minute build: Ensures that a tested release package can be built in under
10 minutes, making frequent deployment possible.
5. Continuous integration (CI): Prevents a long, risky integration phase by having
developers integrate and test their code multiple times a day.
6. Collective code ownership: Allows the team to immediately solve problems
and refactor design flaws no matter where they may lie in the system.
2. Explain Version Control and its role in Agile teams. (10 Marks)
Version Control (or Source Code Control) is a system that records changes to a file or
set of files over time so that you can recall specific versions later. It allows multiple
developers to work on the same codebase simultaneously without disrupting each
other.
The Ten-Minute Build is an XP practice and goal to ensure that a fully tested release
package, including all necessary components (compilation, running unit tests,
deployment scripts), can be completed in under 10 minutes.
B. Why it is Important
32
marij
1. Develop Locally & Write Tests (Red/Green): Developers write code using TDD,
aiming for a successful local build every few minutes.
2. Update Sandbox: Before committing, the developer updates their sandbox
(local working copy) with the latest code from the central repository to ensure
they have the most recent changes.
3. Confirm Local Build: The developer must confirm that the newly updated local
code still compiles and passes all unit and integration tests locally before
committing.
4. Commit Code (Integration): The developer commits their small, functional
changes back to the central repository. This is done multiple times a day.
5. Automated Build & Test (The CI Server): The CI system automatically triggers a
comprehensive build and runs all automated tests (the Ten-Minute Build).
6. Rapid Feedback (Rollback): If the build fails, the team as a whole is responsible
for fixing it immediately. The key XP rule is: You can never let the build break. If
a fix is not instant, the developer must roll back their changes until a fix is
found.
CI provides significant benefits by making the integration process small, frequent, and
low-risk:
33
marij
(See also Unit I, Question 9 for the definition. This response focuses on the
releasing context.)
1. Rapid Bug Fixing: CCO allows the team to solve problems no matter where they
may lie in the system. If a developer finds a bug in a system module they didn't
write, they are empowered to fix it immediately, speeding up the path to a "Bug-
Free Release."
2. Enables Relentless Refactoring: CCO forces the team to enforce Coding
Standards and commit to Relentless Refactoring. If a developer finds poorly
designed code (technical debt), CCO ensures they take responsibility ("It's your
code. Fix it!") and refactor it to a state that is simple and maintainable, thus
eliminating bug breeding grounds.
3. Increased Knowledge Sharing: Practices like Pair Programming and
Continuous Integration—which are inseparable from CCO—break down
34
marij
knowledge silos and spread system knowledge widely, making the entire team
resilient and capable of supporting any part of the release.
4. Mitigates Project Risk: It prevents the project from being dependent on a single
individual's knowledge, ensuring that the team can maintain and release the
software even if a key member is unavailable.
In Agile, documentation is still necessary, but it adheres to the Agile Manifesto value:
Working software over comprehensive documentation [search]. Documentation
must be just barely sufficient to support the working software and the team's ongoing
collaboration.
The goal of documentation is to decrease its cost while increasing its accuracy.
35
marij
When handing the project to another team, Agile recommends creating a small set of
documents recording only the big decisions and nonobvious information. This
summary should include:
Par
am
Release Planning Iteration Planning (Sprint Planning)
ete
r
The short-term planning activity where
The long-term planning activity where
the Team selects a small set of
Def the Customer and Team collaborate to
prioritized User Stories to be
init determine which features (User
completed during the next single
ion Stories) will be delivered in the
iteration (typically 1-4 weeks)
upcoming release cycle [search].
[search].
Ti
me
Long-term (Months to Quarters). Short-term (Weeks). Defines the work
Ho
Defines the overall project roadmap. for the immediate next iteration.
riz
on
Ke
The Velocity of the team and the
y The entire Product Backlog (all known
prioritized items from the Product
Inp User Stories) [search].
Backlog [search].
ut
Ke
An Iteration Backlog (a list of
y
A Release Plan (a forecast of features committed stories) and the Iteration
Ou
and their target release date). Goal (the specific business objective
tpu
for the iteration).
t
36
marij
Para
Big-Bang Release
met Incremental Release (Agile/XP)
(Traditional/Waterfall)
er
Releasing small, functional pieces of
Releasing the entire, complete
Defi the software to users frequently and in
product in a single, large launch
nitio a structured sequence. Each release
only at the very end of the
n adds new functionality to the existing
development cycle.
system.
Freq
High (e.g., every 2 weeks, monthly, or Low (e.g., once every 12-24
uen
quarterly). months).
cy
Risk Low Risk. Deployment issues are small High Risk. The entire project's fate
Prof and contained, as only minor changes rests on a single deployment. Any
ile are released at a time. failure is catastrophic.
Fee Late and High Cost. Feedback is
Early and Continuous. Users interact
dba delayed until the product is
with the working software immediately,
ck launched. Changes requested at
providing feedback that shapes the
Loo this stage are extremely costly and
subsequent increments.
p disruptive.
Tim
Rapid. Customers begin realizing value Delayed. Value is realized only after
e to
from core features immediately after the full product is complete and
Valu
the first small release. launched.
e
Sup
Continuous Integration, Ten-Minute Extensive, rigid testing phase at the
port
Build, Bug-Free Release. end.
ing
37
marij
Prac
tice
While Agile streamlines the technical process of releasing, several challenges remain:
1. Defining "Done Done" for Release: The biggest challenge is ensuring that the
definition of "Production-Ready Software" is strictly enforced. If the team
relaxes the criteria (e.g., skipping refactoring or ignoring a known bug), the
stability of the release is compromised.
a. Solution: Use a robust Definition of Done that includes customer
acceptance and passing all automated tests.
2. External Dependencies: Releasing often relies on external groups (e.g.,
marketing, compliance, legal). If these groups operate on a traditional schedule,
they can become a major bottleneck for the Agile team's rapid release cycle.
a. Solution: Involve key external stakeholders in Release Planning and use
the Iteration Demo to keep them aligned and ready for the next release.
3. Maintaining the Ten-Minute Build: As the code base grows, the build time
tends to increase. Teams must be vigilant in constantly monitoring and
optimizing the build script to ensure it remains under 10 minutes.
a. Solution: Dedicate specific time in each iteration (Slack) to optimizing the
build and test suite performance.
4. Managing Technical Debt: Reluctance to stop and Refactor poorly designed
code (technical debt) will eventually make releasing slower and buggier.
a. Solution: Make Refactoring an explicit, daily part of the Coding phase,
using it to eliminate bug breeding grounds.
5. Organizational Pressure for Features: Stakeholders may push the team to
deliver more features (increase throughput) without adequate time for quality
checks, potentially counterbalancing the commitment to low defects.
a. Solution: Use Defects as a counterbalancing metric to Throughput in
reporting to maintain a focus on quality over sheer speed.
38
marij
UNIT IV — Planning
39
marij
A. Definition
1. Exploration:
a. Customer's Move: The Customer writes a story card for every desired
feature, detailing the functionality and business value.
b. Developer's Move: The Developer writes a task card for technical
unknowns (Spikes) or estimations for the story cards.
2. Commitment (The Negotiation):
a. Customer's Move: The Customer prioritizes the stories based on the
highest business value and chooses the release date/scope.
b. Developer's Move: The Developer estimates the cost (effort) of the stories
and commits to the scope (how much they can complete) based on their
capacity/velocity [search].
3. Steering (The Adaptation):
a. This is the ongoing process of adjusting the plan as the project
progresses. The team performs short Iteration Planning cycles and uses
Retrospectives to steer the project. New stories are added, priorities
change, and the scope is continuously negotiated.
C. Importance
The Planning Game ensures that the project is always working on the highest-value
features (Customer priority) within a realistic, sustainable timeline (Developer
capacity). It embodies the Agile principle of Customer Collaboration over Contract
Negotiation.
40
marij
User Stories are short, informal descriptions of a feature written from the perspective
of an end-user or customer. They are the fundamental unit of requirements and
planning in Agile methodologies (like XP/Scrum).
B. Standard Format
User Stories follow a common template to ensure they are user-centric and focused on
value:
As a <type of user>,
C. Examples
Examp
Format Breakdown
le
Simpl
e As a Registered Member, I want to log in using my email and password,
Examp So that I can access my personal dashboard.
le
Compl
As a Site Administrator, I want to view all current subscription
ex
enrollments in a searchable list, So that I can quickly audit and manage
Examp
payment status.
le
D. The "3 Cs" of User Stories
1. Card: The story is traditionally written on an index card for visibility and
simplicity.
2. Conversation: The details of the story are discussed and clarified through a
face-to-face conversation between the developer and the customer.
3. Confirmation: The final criteria that prove the story is complete are written
down as Acceptance Criteria (the tests that must pass) [search].
41
marij
Story Estimation is the process of approximating the effort (complexity, size, and
uncertainty) required to deliver a User Story [search]. Unlike traditional estimation,
which focuses on hours or calendar days, Agile estimation uses abstract measures to
forecast the work.
• Definition: Story Points are an abstract measure used to estimate the size of a
user story [search]. They represent the relative effort required to complete one
story compared to others, rather than an absolute measure of time [search].
• Relative Estimation: Estimation is performed relatively—the team compares a
new story to a "base story" they completed previously [search]. For example, "Is
this new story about the same size (1 point), twice as big (2 points), or much
bigger (5 points)?" [search].
• Factors: Story Points account for: the amount of work (volume), complexity
(difficulty), and risk/uncertainty [search].
1. Read Story: The Product Owner reads a User Story and its Acceptance Criteria.
2. Discussion: The team discusses the story, clarifying any ambiguities with the
Product Owner.
3. Silent Voting: Each developer selects a card (often using a modified Fibonacci
sequence: 1, 2, 3, 5, 8, 13, 20...) representing their estimate in Story Points, and
all reveal their cards simultaneously.
4. Discuss Outliers: If estimates vary significantly (e.g., one person votes 3 and
another 13), the high and low voters explain their reasoning (e.g., "I saw high
integration risk," "I thought it was simple because we already built a similar
feature").
5. Re-Vote: The team discusses and re-votes until a consensus (or close estimate)
is reached.
42
marij
Iteration Planning (or Sprint Planning) is a time-boxed meeting held at the beginning of
every iteration. The primary goal is for the Development Team to select the highest-
priority items from the Product Backlog and plan how they will deliver them during the
upcoming iteration [search].
1. Review Team Velocity: The team reviews its historical Velocity (capacity) to set
a realistic boundary for how much work it can commit to [search].
2. Product Owner Presents Stories: The Product Owner presents the highest-
priority, estimated User Stories to the team.
3. Team Commits to Scope: Based on its Velocity and confidence in the stories,
the Development Team pulls a subset of stories from the Product Backlog into
the Iteration Backlog.
4. Define the Iteration Goal: The team and Product Owner craft a specific, short-
term Iteration Goal (e.g., "Successfully process a user subscription payment").
1. Break Down Stories into Tasks: The Development Team breaks down each
committed User Story into small, technical Tasks (e.g., "Design Database
Schema," "Write Authentication Service Unit Test") [search].
2. Estimate Tasks: Tasks are often estimated in hours (or Ideal Days).
3. Assign Tasks: Team members sign up for tasks. This part reinforces self-
organization [search].
43
marij
1. User Stories and Acceptance Criteria: Potential risks are identified during the
process of creating user stories and their acceptance criteria.
2. Spikes: Complex or high-risk technical unknowns are addressed using Spikes
(short experiments) before commitment, thereby reducing risk.
3. Historical Data Analysis: Teams review data from previous projects to identify
common patterns and risks relevant to the current one.
4. Retrospectives and Stand-ups: Risks (impediments) are identified and
discussed daily in Stand-ups and systematically reviewed and documented in
Retrospectives.
1. Iterative Adjustments: Risk strategies are adapted as the project evolves and
new information becomes available, supporting the principle of Responding to
Change.
2. Slack: Allocating buffered time (Slack) in the iteration schedule is the primary
proactive response strategy, providing capacity to handle unforeseen risks like
complex bugs or integration issues.
3. Risk Reduction: Risk response activities are broken down into actionable tasks
that can be added to the sprint backlog, similar to user stories or technical
spikes.
4. Transparency: Risks are tracked visually on Scrum boards and communicated
clearly to all stakeholders, fostering a team culture where every member feels
empowered to discuss risks without fear of blame.
In Agile projects, Slack primarily refers to the concept of allocating buffered time in a
sprint schedule. This time is capacity that is not dedicated to specific features but
acts as a buffer for unexpected issues that inevitably arise during a sprint.
Slack is a critical strategy for mitigating risks, ensuring predictability, and maintaining
the team’s long-term health:
44
marij
Velocity and Burndown charts are both essential metrics for tracking and forecasting
project progress, often used together in Scrum/Agile.
Pa
ra
m Velocity Burndown Chart
et
er
De A measure of the amount of work (in A visual representation of the work
fin Story Points) a team can complete and remaining over the course of a single
iti deliver in a single iteration (sprint) on iteration or the entire project
on average [search]. [search].
Ti
m
Historical (Retrospective). Calculated Current (Real-Time). Tracks
e
over the last 3-5 sprints to establish an progress day-by-day within the
Ho
average [search]. current sprint [search].
riz
on
Ke
Forecasting and Planning. Used to Tracking and Correction. Used to
y
estimate how much work the team can see if the team is on track to meet its
Us
commit to in the next sprint and to current sprint goal and to identify
e
forecast the total project duration delays or impediments early
Ca
[search]. [search].
se
45
marij
Vi
The "Actual" line should trend closely
su The value should trend towards a
toward the "Ideal" line, hitting zero
al consistent, stable horizontal average,
(work remaining) by the end of the
Go showing a sustainable pace [search].
sprint [search].
al
W
ar A flat or rising line suggests the
An erratic (jumping) velocity suggests
ni team is blocked, encountering
poor estimation or inconsistent process
ng unforeseen complexity, or has scope
(lack of sustainable pace) [search].
Si creep [search].
gn
A. Definition of Versioning
Versioning (or Revision Control) is the process of assigning unique identifiers (version
numbers) to iterations of the software at different stages of development and release.
The core mechanism supporting this is Version Control.
B. Importance in XP/Agile
1. Traceability and Auditing: Each version number uniquely identifies the exact
state of the code, tests, and configuration at a given time. This is crucial for
tracing a production defect back to the specific code version that caused it.
2. Managing Releases: The version number (e.g., 1.0, 1.1, 2.0) clearly
communicates the scope of the Incremental Release to customers and
stakeholders [search].
a. Major Version Change (1.0 to 2.0): Usually indicates a large set of new
features or a significant change in architecture.
b. Minor Version Change (1.0 to 1.1): Usually indicates a new, minor feature
set or set of changes.
c. Patch Version Change (1.1.0 to 1.1.1): Usually indicates only bug fixes.
3. Enables Rollback and Recovery: Versioning, paired with Version Control,
allows the team to precisely identify the last known working version of the
software. If a deployment fails, the team can quickly and safely revert to the
previous, stable version.
4. Supports Continuous Integration: The continuous stream of integrations is
managed by the version control system, which allows the team to "tag" the main
46
marij
10. Why planning is more flexible in Agile than Waterfall? (10 Marks)
Agile planning is inherently more flexible because it rejects the idea of Big Design Up
Front (BDUF) and operates under the principle: Responding to Change Over Following
a Plan [search].
47
marij
- Relative Estimation
- Time-boxing
48
marij
UNIT V — Developing
1. Early and Continuous Feedback: Teams deliver small, working features to the
customer frequently, allowing them to validate assumptions and correct course
quickly. This ensures the final product meets actual needs.
2. Adaptability to Change: Agile processes embrace the reality that requirements
frequently evolve. Incremental requirements provide the flexibility to change
direction based on market trends or new information, even late in development.
3. Reduced Risk and Time-to-Market: By building and testing features in small,
manageable chunks, the risk of a catastrophic failure is minimized. It also
enables a rapid time-to-market for core functionality.
4. Focus on Value: Incremental development forces teams to prioritize and deliver
the features that provide the most value first, ensuring development effort is
focused where it matters most.
5. Better Communication: They eliminate the risks of long, ambiguous, text-heavy
requirements documents by prioritizing direct, face-to-face conversation to
discuss the scope of each increment.
49
marij
B. Purpose in XP
• Confirmation: They confirm that the system meets the overall requirements and
business value described in the User Story.
• Contract: They serve as an executable contract between the customer and the
developer. If all Customer Tests pass, the feature must be accepted.
• Regression Prevention: Once automated, these tests become part of the
Continuous Integration system, ensuring that future code changes do not
break existing, accepted features (regression).
Customer Tests are often defined as the Acceptance Criteria on the back of a User
Story card.
A. Definition of TDD
50
marij
b. Since the production code for this feature does not yet exist, the test will
fail (RED) [search]. This step ensures the developer fully understands the
requirements before coding and validates that the test harness is
working.
2. GREEN: Write the Minimum Code (Make Test Pass)
a. The developer writes just enough production code (the simplest possible
code) to make that newly written test pass (GREEN) [search].
b. The focus is purely on functionality and speed, not elegance or perfect
design. All other existing tests must also still pass.
3. REFACTOR: Clean Up the Code (Improve Design)
a. Once all tests are GREEN, the developer cleans up (refactors) the code.
This involves eliminating duplication, improving naming conventions, and
simplifying the design, all while continuously re-running all tests to
ensure no existing functionality is broken [search].
4. Repeat: The cycle immediately begins again for the next small piece of
functionality.
A. Advantages of TDD
1. Higher Code Quality and Fewer Defects: TDD is a proven technique for
reducing the number of defects generated. Because tests are written first, the
code is continuously verified and less prone to errors.
2. Simpler, Testable Design: TDD forces the developer to consider how the code
will be used and tested from the outset. This naturally leads to code that is more
modular, cohesive, and easy to test—hallmarks of Simple Design [search].
3. Executable Documentation: The tests themselves serve as a form of
executable documentation, showing exactly how each component is supposed
to behave.
4. Enables Refactoring: The comprehensive suite of tests created by TDD acts as
a safety net [search]. This allows the team to perform Relentless Refactoring
with confidence, knowing that if they accidentally break existing functionality,
the tests will immediately turn RED.
5. Programmer Confidence: Developers gain high confidence in the code's
correctness, which is essential for Collective Code Ownership [search].
51
marij
B. Challenges of TDD
1. Initial Time Investment: Writing tests first can initially feel slower, leading to
resistance from developers new to the practice.
2. Requires Discipline: TDD requires high team discipline to follow the Red-Green-
Refactor mantra consistently, especially under deadline pressure [search].
3. Testing External Systems: Unit tests should focus on isolated components. It is
challenging to write unit tests for code that heavily interacts with external, non-
deterministic systems (like databases, APIs, or UIs) without using complex
mocks or fakes [search].
4. Risk of Testing Implementation, Not Behavior: If developers test too much of
the internal structure (implementation details), the tests become fragile and
must be rewritten every time the code is refactored, reducing the agility of the
test suite.
Refactoring is essential for long-term project health and for eliminating technical debt
(complicated, confusing code that breeds bugs).
52
marij
1. Extract Method: Taking a large block of code within a function and moving it into
its own, small, well-named function to improve clarity.
2. Rename Variable/Class: Changing unclear names (e.g., tmp or proc) to
meaningful names (e.g., memberEnrollmentProcess).
3. Eliminate Duplication: Merging two similar code blocks or functions into a
single, reusable component.
4. Move Field: Moving a field or variable to a more appropriate class or module to
improve cohesion.
A. Definition
It rejects the traditional Big Design Up Front (BDUF) model, which attempts to create a
complete, rigid design to anticipate all possible future requirements. BDUF is risky
because the extensive design is based on faulty initial assumptions and is costly to
change.
1. Initial Simple Design: The team creates an initial architecture that is just
sophisticated enough to handle the first few high-priority stories.
2. TDD and Refactoring Drive Design: The design evolves organically based on the
Relentless Refactoring and the local design decisions made during the TDD
cycle. TDD forces modularity, and Refactoring keeps the design simple.
3. Spikes Explore Complexity: When a design decision involves significant
technical unknowns, the team uses a Spike Solution to research the best
architectural approach before committing to the design.
53
marij
A. Definition
A Spike Solution (or simply "Spike") is a very simple program, technical experiment, or
short research effort constructed solely to explore the suitability of a proposed
technical solution. It is essentially a prototype designed to solve a specific, high-risk
technical question, not to be delivered to the customer.
B. Purpose
1. Reduce Technical Risk: Spikes are used when a User Story cannot be
accurately estimated because there is a major technical unknown or uncertainty
(e.g., "Will this new database integrate with our existing system?"). The Spike is
run to remove this unknown.
2. Inform Planning: The outcome of a Spike (a clear answer or a small, disposable
prototype) provides the team with the knowledge needed to confidently estimate
the original User Story or to make a critical Architectural Decision.
3. Time-boxed: Spikes are strictly time-boxed (e.g., one or two days) to ensure
they do not become a source of technical debt or over-engineering.
C. Key Principle
Spike code is disposable. The output is knowledge (e.g., "Yes, the new database is
feasible, and it will take 5 Story Points to integrate"), not production code. The team
typically throws away the Spike code and starts fresh with TDD for the actual feature
implementation.
54
marij
Fea
Scripted Testing
tur Exploratory Testing (ET)
(Traditional/Manual)
e
Ap Dynamic and Unscripted. The tester
Static and Predefined. Execution
pro simultaneously learns, designs, and
follows rigid, detailed, step-by-step
ac executes tests based on intuition and
test cases created long in advance.
h judgment.
Simulating Real-World Usage. Requirement Coverage. Focuses on
Fo Focuses on the tester's skill and verifying that every specified
cus creativity to find unexpected bugs and requirement is met exactly as written
flaws in the process. in the documentation.
Go To expose systemic problems and
To ensure all pre-defined Unit,
al hidden assumptions (e.g., unplugging
Integration, and Customer Tests are
in a network cable) and find new,
finished and passed.
XP unexpected bugs.
Fee
Instant Insights. Creates a quick,
db Slow. Feedback is often delayed until
continuous feedback loop because
ack the test execution phase is completed
testing and design happen
Lo and a report is generated.
simultaneously.
op
1. Measure First: Optimization is done only when profiling tools indicate a specific
area of the system is provably slow, and only in that specific area (i.e., when you
have a performance test that fails). Optimizing code that is already fast wastes
time and introduces complexity.
2. Keep it Simple (Refactoring): XP prioritizes Simplicity and Refactoring over
premature optimization. Optimizing early often involves complex code that is
hard to maintain and prone to bugs, which contradicts the core XP values.
55
marij
C. Importance
XP prioritizes correctness and clarity first, trusting that small, frequent Refactoring
keeps the code clean enough to be fast. If a part of the system is truly a bottleneck, it is
treated as a Technical Task in the backlog, estimated, and addressed like any other
feature.
The XP development cycle is a continuous, repetitive process built around the five life
cycle phases (Planning, Designing, Coding, Testing, Listening), executed in short
iterations.
1. Release Planning (Long-Term): The Customer prioritizes User Stories and the
Team forecasts what can be delivered in the overall release [search].
2. Iteration Planning (Start of Iteration): The Team selects the highest-priority
stories they can complete based on Velocity and breaks them down into fine-
grained Tasks [search].
3. TDD Loop (Daily, Minute-by-Minute): The team executes the core Red-Green-
Refactor cycle:
a. Write a failing Unit Test (RED) [search].
b. Write the simplest code to make the test pass (GREEN) [search].
c. Refactor the code to improve design while all tests stay GREEN.
4. Pair Programming (Continuous): All production code is written in pairs.
5. Continuous Integration (Hourly): Developers frequently integrate their small,
working changes into the main repository, and the Ten-Minute Build runs all
tests.
6. Customer Testing: The On-site Customer defines and executes Acceptance
Tests to confirm the completed stories meet the business requirements.
7. Iteration Demo (End of Iteration): The team presents the working software to
stakeholders for Acceptance and feedback.
8. Retrospective (End of Iteration): The team reflects on the process and adapts
its behavior for the next iteration.
56
marij
Par
am Acceptance Testing (Customer
Unit Testing (Developer Testing)
ete Testing)
r
Go To verify that a single, small unit of To verify that a completed feature
al/ source code (e.g., a function, a class, or (User Story) works correctly and
Foc a method) works exactly as the meets the customer's specified
us developer intended [search]. business requirements.
Wh The Customer (Product Owner or
o The Developer (specifically using TDD) On-site Customer), often with
Wri [search]. assistance from the
tes tester/developer.
Smallest possible scope. Isolated End-to-end functionality. Tests the
Sc
components only, often requiring the system's behavior across multiple
op
use of mocks/fakes for external components (UI, business logic,
e
dependencies. database).
Wh
en Continuously throughout the day (in the At the end of the iteration, before
Exe TDD cycle) and every time the the Iteration Demo, as the final
cut Continuous Integration build runs. check for feature acceptance.
ed
Rol
e in Acts as the final contract for "done
Acts as the safety net for Refactoring
Rel done" and ensures the software is
and code correctness [search].
eas Accepted by the stakeholder.
e
A. Definition
The Simple Design Principle in XP is the commitment to developing a system that has
just enough design to satisfy the current requirements, and no more. It is one of the
core principles that guides the Thinking practice in XP.
57
marij
The simplest design that can possibly work is one that meets four criteria, often referred
to as the 4 Rules of Simple Design:
1. Passes All the Tests: The design must fully implement the requirements and
pass all automated Unit Tests and Acceptance Tests [search]. This is the most
important rule.
2. Contains No Duplication: The design must follow the Don't Repeat Yourself
(DRY) principle. Duplication is a major source of bugs and is eliminated
constantly through Refactoring.
3. Expresses the Intent of the Programmer (Clarity): The code should be easy to
read and understand. Clear names and simple structure are prioritized,
supported by a clear Ubiquitous Language.
4. Minimizes the Number of Classes and Methods: The design should contain
the fewest elements necessary to achieve the goal, avoiding over-engineering or
unnecessary abstractions.
C. Importance
Simple Design ensures the design remains lightweight and flexible, preventing the
team from wasting time on speculative features that may never materialize. By coupling
it with Relentless Refactoring, the team ensures that the design continuously
improves to accommodate new requirements, leading to a long-term, maintainable
architecture.
58