SE Lecture - 4
SE Lecture - 4
SE Lecture - 4
Tehreem Aslam
FAST-NU
What is Agile
What is Agile
Agile Development
Rapid software development
• Rapid development and delivery is now often the most important requirement
for software systems
• Businesses operate in a fast-changing requirement and it is practically
impossible to produce a set of stable software requirements
• Software has to evolve quickly to reflect changing business needs.
• Plan-driven development is essential for some types of system but does not meet
these business needs.
• Agile development methods emerged in the late 1990s whose aim was to radically
reduce the delivery time for working software systems
What agile is , it is surprisingly flexible
Yielding …
25
26
27
28
Agile approach
29
30
Agile process models
• Extreme Programming (XP)
• Scrum
• Adaptive Software Development
• Dynamic System Development Method (DSDM)
• Crystal
• Feature Driven Development
• Agile Modeling (AM)
Extreme Programming (XP)
• Perhaps the best-known and most widely used agile method.
• Extreme Programming (XP) takes an ‘extreme’ approach to iterative
development.
– New versions may be built several times per day;
– Increments are delivered to customers every 2 weeks;
– All tests must be run for every build and the build is only accepted if tests run
successfully.
• XP Values
– Communication
– Simplicity
– Feedback
– Courage
– Respect
Extreme Programming (XP)
http://www.extremeprogramming.org/rules/spike.html
Extreme Programming (XP)
• XP Planning
– Begins with the creation of user stories
• XP Coding
– Recommends the construction of a unit test for a story before coding
commences
– Encourages pair programming
Extreme Programming (XP)
• XP Testing
– All unit tests are executed daily
– Acceptance tests are defined by the customer and executed to
assess customer visible functionality
XP and agile principles
• Incremental development is supported through small, frequent
system releases.
• These are written on cards and the development team break them down
into implementation tasks. These tasks are the basis of schedule and cost
estimates.
• The customer chooses the stories for inclusion in the next release based
on their priorities and the schedule estimates.
Story card for document downloading
Downloading and printing an article
First, you select the article that you want from a displayed list.
You
then have to tell the system how you will pay for it - this can either
be through a subscription, through a company account or by credit
card.
After this, you get a copyright form from the system to fill in and,
when you have submitted this, the article you want is downloaded
onto your computer .
You then choose a printer and a copy of the article is printed.
You
tell the system if printing has been successful.
If the article is a print-only article, you canÕ
t keep the PDF version
so it is automatically deleted from your computer .
XP and change
• Conventional wisdom in software engineering is to design for change. It
is worth spending time and effort anticipating changes as this reduces
costs later in the life cycle.
• Automated testing simplifies refactoring as you can see if the changed code
still runs the tests successfully.
Testing in XP
• Test-first development.
• Automated test harnesses are used to run all component tests each
time that a new release is built.
Task cards for document downloading
Input:
A string representing the credit card number and two integers representing
the month and year when the card expires
Tests:
Check that all bytes in the string are digits
Check that the month lies between 1 and 12 and the
year is greater than or equal to the current year
.
Using the first 4 digits of the credit card number
,
check that the card issuer is valid by looking up the
card issuer table. Check credit card validity by submitting the card
number and expiry date information to the card
issuer
Output:
OK or error message indicating that the card is invalid
Test-first development
• Tests are written as programs rather than data so that they can be
executed automatically. The test includes a check that it has executed
correctly.
• All previous and new tests are automatically run when new functionality
is added. Thus checking that the new functionality has not introduced
errors.
Pair programming
• In XP, programmers work in pairs, sitting together to develop code.
• This helps develop common ownership of code and spreads knowledge across the
team.
• It serves as an informal review process as each line of code is looked at by more than
1 person.
• It encourages refactoring as the whole team can benefit from this.
• Measurements suggest that development productivity with pair programming is similar
to that of two people working independently.
Problems with XP
• Customer involvement
– This is perhaps the most difficult problem. It may be difficult or impossible to find a
customer who can represent all stakeholders and who can be taken off their normal
work to become part of the XP team. For generic products, there is no ‘customer’ -
the marketing team may not be typical of real customers.
• Architectural design
– The incremental style of development can mean that inappropriate
architectural decisions are made at an early stage of the process.
– Problems with these may not become clear until many features have
been implemented and refactoring the architecture is very expensive.
• Test complacency
– It is easy for a team to believe that because it has many tests, the system is
properly tested.
Transparenc
Adapt
y
Inspect
Scrum
• Product Owner decides what should be produced so as to achieve success
• Gets inputs from users, teams, managers, stakeholders, executives, industry
experts etc.
• Produces the product backlog which contains the features of product to be
produced in order of priority
• The product backlog is the single master list of features, functionality etc ordered
based on business value and risk.
• The product backlog is constantly being revised by the product owner, to
maximize the business success of the team’s efforts
• Consists of 7 to 9 people
• Team has to be cross functional- containing members from different verticals required for
developing the product.
• Team is self organized and self managing – makes a commitment and manages its
responsibilities.
• Sprints is referred to the fixed period of time the team commits to work in course of
developing the product
• The length of sprint is decided by the team and product owner
• Working as sustainable pace is important to avoid burn out
• Team selects what it will to deliver by the end of sprint.
• Every member of team take part
Scrum’s Roles
• The Team
• Your management practices embrace ‘do it now and forget what I told you to do
yesterday’.
Difference between two agile processes
1. Scrum teams have sprint which are 2-4 weeks long whereas XP teams typically work in iteration no longer than
1-2 weeks long.
2. Scrum doesn't allow changes to the chosen sprint backlog once planned whereas XP teams XP teams are much
more amenable to change within their iterations, but change can only be made if the team hasn't started working on
a feature.
3. In Scrum product owner prioritizes the product backlog but the Scrum team can choose a lower priority item for a
sprint to work on before the high priority work whereas XP teams must always work in priority order as Features to
be developed are prioritized by the customer
XP mandates a set of engineering practices where Scrum does not. At the same time Scrum mandates planning
ceremonies and artifacts, where XP does not.
Criteria