Lect - 4 - 5 - 6 - Agile Methods
Lect - 4 - 5 - 6 - Agile Methods
Lecture Agenda –
▪ What is and Why we need Agile Methods?
▪ Agile Manifesto – Principle for Agile Methods
▪ Agile vs Plan-driven Approaches
▪ Types of Agile Methods
▪ Extreme Programming (XP)
▪ Software Change in XP
▪ Testing in XP
▪ Pair Programming
▪ Agile Project Management – Scrum
▪ Scaling Agile Methods
▪ Recap
Learning Outcome
Objectives
Contents
Learning Outcome
▪The aim of agile methods is to reduce overheads in the software process (e.g. by limiting
documentation) and to be able to respond quickly to changing requirements without
excessive rework.
Incremental delivery The software is developed in increments with the customer specifying the requirements to be
included in each increment.
People not process The skills of the development team should be recognized and exploited. Team members should be left
to develop their own ways of working without prescriptive processes.
Embrace change Expect the system requirements to change and so design the system to accommodate these changes.
Maintain simplicity Focus on simplicity in both the software being developed and in the development process. Wherever
possible, actively work to eliminate complexity from the system.
Customer Customers should be closely involved throughout the development process. Their role is provide and
involvement prioritize new system requirements and to evaluate the iterations of the system.
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.
▪ Rapid software development
▪ Specification, design and implementation are inter-leaved
▪ System is developed as a series of versions with stakeholders involved in
version evaluation. (Incremental Development Process)
▪ User interfaces are often developed using an IDE and graphical toolset.
(Software Prototyping)
Agile Methodology – When to go Agile?
Requirements
Requirements Design
Design
Implementation
Implementation
According to a predefined (fixed) plan
According to the context (changing) Situation
▪ In practice, most practical processes include elements of both plan-driven and agile approaches.
▪ There are no right or wrong software processes!
Plan-driven and Agile Development
▪ Plan-driven development
▪ A plan-driven approach to software engineering is based around separate
development stages with the outputs to be produced at each of these stages
planned in advance.
▪ Not necessarily waterfall model – plan-driven, incremental development is
possible
▪ Iteration occurs within activities.
▪ Agile development
▪ Specification, design, implementation and testing are inter-leaved and the
outputs from the development process are decided through a process of
negotiation during the software development process.
Develop/Integrate/
Evaluate System Release Software Test Software
XP Practices
Principle or Description
practice
Incremental Requirements are recorded on story cards and the stories to be included in a release are determined
planning by the time available and their relative priority. The developers break these stories into development
‘Tasks’. Discussed later.
Small releases The minimal useful set of functionality that provides business value is developed first. Releases of the
system are frequent and incrementally add functionality to the first release.
Simple design Enough design is carried out to meet the current requirements and no more.
Test-first An automated unit test framework is used to write tests for a new piece of functionality before that
development functionality itself is implemented.
Refactoring All developers are expected to refactor the code continuously as soon as possible code improvements
are found. This keeps the code simple and maintainable.
XP Practices
Principle or Description
practice
Pair programming Developers work in pairs, checking each other’s work and providing the support to always
do a good job.
Collective The pairs of developers work on all areas of the system, so that no islands of expertise
ownership develop and all the developers take responsibility for all of the code. Anyone can change
anything.
Continuous As soon as the work on a task is complete, it is integrated into the whole system. After any
integration such integration, all the unit tests in the system must pass.
Sustainable pace Large amounts of overtime are not considered acceptable as the net effect is often to
reduce code quality and medium term productivity
On-site customer A representative of the end-user of the system (the customer) should be available full
time for the use of the XP team. In an extreme programming process, the customer is a
member of the development team and is responsible for bringing system requirements to
the team for implementation.
Requirements Scenario
In XP, a customer or user is part of the XP team and is responsible
for making decisions on requirements.
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.
Example Story – Medication Prescription
Story title User Story
Prescribing Medication
Kate is a doctor who wishes to prescribe medication for a patient attending a clinic.
The patient record is already displayed on her computer so she clicks on the medication field
and can select current medication’, ‘new medication’ or ‘formulary’. If she selects ‘current
medication’, the system asks her to check the dose. If she wants to change the dose, she enters
the dose and then confirms the prescription.
If she chooses ‘new medication’, the system assumes that she knows which medication to
prescribe. She types the first few letters of the drug name. The system displays a list of possible
drugs starting with these letters.
She chooses the required medication and the system responds by asking her to check that the
medication
selected is correct. She enters the dose and then confirms the prescription.
Story Card
Example - Task Cards for Prescribing Medication
XP and Software Change
38
• Team selects the requirements that it can implement in the first iteration (Planning Meeting)
• Team defines tasks for completing requirements (Sprint Backlog)
• Team goes in 30-Day Development Cycle (Sprint)
• Team meets daily to sync up on progress (Daily Scrum)
• Team goes through the complete process (design, development, testing, documentation) to complete an
increment of functionality.
• At the end of 30 day sprint, Team demonstrates completed functionality to bosses and stakeholders (Sprint
Review)
• Team analyses its Sprint performance (Sprint Retrospective)
• Requirements are prioritized, redefined.
• Team goes through the process again (Sprint 2, Sprint 3, …, Release)
Scrum Process – Visually
39
The Sprint Cycle