Chap 3
Chap 3
Agile Development
1
THESE SLIDES ARE DESIGNED TO ACCOMPANY SOFTWARE ENGINEERING:
A PRACTITIONER’S APPROACH, 7/E (MCGRAW-HILL, 2009) SLIDES 2
COPYRIGHT 2009 BY ROGER PRESSMAN.
The Manifesto for
Agile Software Development
“We are uncovering better ways of developing software by doing it and
helping others do it. Through this work we have come to value:
That is, while there is value in the items on the right, we value the
items on the left more.”
3
What is “Agility”?
Effective (rapid and adaptive) response to change
Effective communication among all stakeholders
Drawing the customer onto the team
Organizing a team so that it is in control of the work performed
Yielding …
Rapid, incremental delivery of software
◦ The agility encourages team structures and attitudes that make communication (among team
members, between technologists and business people, between software engineers and their
managers).
◦ It emphasizes rapid delivery of operational software
◦ It adopts the customer as a part of the development team and works to eliminate the “us and
them” attitude that continues to pervade many software projects;
4
Agility and the Cost of Change
6
• Proponents of agility argue that a well-designed agile process
“flattens” the cost of change curve (Figure 3.1, shaded, solid curve),
allowing a software team to accommodate changes late in a software
project without dramatic cost and time impact.
• The agile process encompasses incremental delivery. When
incremental delivery is coupled with other agile practices such as
continuous unit testing and pair programming (discussed later in this
chapter), the cost of making a change is attenuated.
• Although debate about the degree to which the cost curve flattens
is ongoing, there is evidence to suggest that a significant reduction
in the cost of change can be achieved.
◦ Recognizes that plans are short-lived (some requirements will persist, some will
change. Customer priorities will change)
◦ Develops software iteratively with a heavy emphasis on construction activities
(design and construction are interleaved, hard to say how much design is necessary
before construction. Design models are proven as they are created. )
◦ Analysis, design, construction and testing are not predictable.
8
An Agile Process
• An incremental development strategy should be introduced.
• Software increments must be delivered in short time periods so that
adaptation keeps pace with change (unpredictability).
• This iterative approach enables the customer to evaluate the software
increment regularly, provide necessary feedback to the software team ,
and influence the process adaptations that are made to accommodate
the feedback.
9
Agility Principles - I
1. Our highest priority is to satisfy the customer through early and continuous
delivery of valuable software.
2. Welcome changing requirements, even late in development. Agile processes
harness change for the customer's competitive advantage.
3. Deliver working software frequently, from a couple of weeks to a couple of months,
with a preference to the shorter timescale.
4. Business people and developers must work together daily throughout the project.
5. Build projects around motivated individuals. Give them the environment and
support they need, and trust them to get the job done.
6. The most efficient and effective method of conveying information to and within a
development team is face–to–face conversation.
10
Agility Principles - II
7. Working software is the primary measure of progress.
8. Agile processes promote sustainable development. The sponsors,
developers, and users should be able to maintain a constant pace
indefinitely.
9. Continuous attention to technical excellence and good design enhances
agility.
10. Simplicity – the art of maximizing the amount of work not done – is
essential.
11. The best architectures, requirements, and designs emerge from self–
organizing teams.
12. At regular intervals, the team reflects on how to become more effective,
then tunes and adjusts its behavior accordingly.
11
Human Factors
Proponents of agile software development take great pains to emphasize the
importance of “people factors.”
the process molds to the needs of the people and team, not the other way around
Key traits must exist among the people on an agile team and the team itself:
12
Extreme Programming (XP)
• Extreme Programming (XP) is the most widely used approach to agile
software development.
• Although early work on the ideas and methods associated with XP
occurred during the late 1980s, the seminal work on the subject has been
written by Kent Beck
1. XP Values
Beck defines a set of five values that establish a foundation for all work
performed as part of XP
—communication, simplicity , feedback, courage, and respect.
Each of these values is used as a driver for specific XP activities, actions,
and tasks.
13
• In order to achieve effective communication between software engineers and
other stakeholders (e.g., to establish required features and functions for the
software),XP emphasizes close, yet informal (verbal) collaboration between
customers and developers, the establishment of effective metaphors for
communicating important concepts, continuous feedback, and the avoidance of
voluminous documentation as a communication medium.
• (a metaphor is “a story that everyone—customers, programmers, and managers can
tell about how the system works)
• To achieve simplicity, XP restricts developers to design only for immediate needs,
rather than consider future needs.
• Feedback is derived from three sources: the implemented software itself, the
customer, and other software team members.
• By designing and implementing an effective testing strategy, the software (via test
results) provides the agile team with feedback. XP makes use of the unit test as its
primary test
• The agile team inculcates respect among it members, between other stakeholders
and team members, and indirectly, for the software itself.
14
Extreme Programming (XP)
XP Planning
◦ Begins with the listening, leads to creation of “user stories” that describes required
output, features, and functionality. Customer assigns a value(i.e., a priority) to each
story.
◦ Agile team assesses each story and assigns a cost (development weeks. If more than
3 weeks, customer asked to split into smaller stories)
◦ Working together, stories are grouped for a deliverable increment next release.
◦ A commitment (stories to be included, delivery date and other project matters) is
made. Three ways: 1. Either all stories will be implemented in a few weeks, 2. high
priority stories first, or 3. the riskiest stories will be implemented first.
◦ After the first increment “project velocity”, namely number of stories implemented
during the first release is used to help define subsequent delivery dates for other
increments.
◦ Customers can add stories, delete existing stories, change values of an existing story,
split stories as development work proceeds.
15
Extreme Programming (XP)
XP Design ( occurs both before and after coding as refactoring is encouraged)
◦ Follows the KIS principle (keep it simple) Nothing more nothing less than the story.
◦ Encourage the use of CRC (class-responsibility-collaborator) cards in an object-
oriented context. The only design work product of XP. They identify and organize
the classes that are relevant to the current software increment. (see Chapter 8)
For difficult design problems, XP recommends the immediate creation of an operational
prototype of that portion of the design called “spike solutions”—a design prototype for
that portion is implemented and evaluated.
◦ Encourages “refactoring”—an iterative refinement of the internal program design.
Does not alter the external behavior yet improve the internal structure. Minimize
chances of bugs. More efficient, easy to read.
16
XP Coding
• The team develops a series of unit tests. Once the unit test has been created, the
developer is better able to focus on what must be implemented to pass the test.
Once the code is complete, it can be unit-tested immediately, thereby providing
instantaneous feedback to the developers.
• A key concept during the coding activity is pair programming. XP recommends that
two people work together. This provides a mechanism for real-time problem solving
and real-time quality assurance. In practice, each person takes on a slightly
different role.
• For Example, one person might think about the coding details of a particular
portion of The design while the other ensures that coding standards are Being
followed or that the code for the story will satisfy the unit test.
• As pair programmers complete their work, the code they develop is integrated with
the work of others. In some cases this is performed on a daily basis by an
integration team. In other cases, the pair programmers have integration
responsibility
17
XP Testing
◦ All unit tests are executed daily and ideally should be
automated.
◦ Regression tests are conducted to test current and
previous components.
◦ “Acceptance tests” are defined by the customer and
executed to assess customer visible functionality
18
Extreme Programming (XP)
20
THESE SLIDES ARE DESIGNED TO ACCOMPANY SOFTWARE ENGINEERING:
A PRACTITIONER’S APPROACH, 7/E (MCGRAW-HILL, 2009) SLIDES 21
COPYRIGHT 2009 BY ROGER PRESSMAN.
Other Agile Process Models
The most widely used of all agile process models is Extreme Programming
(XP). But many other agile process models have been proposed and are in
use across the industry. Among the most common are.
◦ Adaptive Software Development (ASD)
◦ Scrum
◦ Dynamic Systems Development Method (DSDM)
◦ Crystal
◦ Feature Drive Development (FDD)
◦ Lean Software Development (LSD)
◦ Agile Modeling (AM)
◦ Agile Unified Process (AUP)
22
Adaptive Software Development (ASD)
• Originally proposed by Jim Highsmith (2000)focusing on human collaboration
and team self-organization as a technique to build complex software and
system.
ASD — distinguishing features
◦ Mission-driven planning
◦ Component-based focus
◦ Uses “time-boxing” (See Chapter 24)
◦ Explicit consideration of risks
◦ Emphasizes collaboration for requirements gathering
◦ Emphasizes “learning” throughout the process
23
Three Phases of ASD
1. Speculation:
◦ project is initiated and adaptive cycle planning is conducted.
◦ Adaptive cycle planning uses project initiation information-
the customer’s mission statement, project constraints (e.g.
delivery date), and basic requirements to define the set of
release cycles (increments) that will be required for the project.
◦ Based on the information obtained at the completion of the
first cycle, the plan is reviewed and adjusted so that planned
work better fits the reality.
25
3. Learning:
As members of ASD team begin to develop the components, the emphasis is
on “learning”.
Highsmith argues that software developers often overestimate their own
understanding of the technology, the process, and the project and that
learning will help them to improve their level of real understanding. Three
ways:
◦ focus groups,
◦ technical reviews
◦ project postmortems.
26
Adaptive Software Development
27
Scrum
A software development method Originally proposed by Schwaber and Beedle in
early 1990.
Scrum—distinguishing features
◦ Development work is partitioned into “packets”
◦ Testing and documentation are on-going as the product is constructed
◦ Work units occurs in “sprints” and is derived from a “backlog” of existing changing
prioritized requirements
◦ Changes are not introduced in sprints (short term but stable) but in backlog.
◦ Meetings are very short (15 minutes daily) and sometimes conducted without chairs
( what did you do since last meeting? What obstacles are you encountering? What do
you plan to accomplish by next meeting?)
◦ “demos” are delivered to the customer with the time-box allocated. May not contain
all functionalities. So customers can evaluate and give feedbacks.
28
Scrum