19CSE314
Software Engineering
Lecture 9-10
Introduction to Agile
Dept of Computer Science and Engg
Amrita Vishwa Vidyapeetham, Coimbatore
Summary
• Prescriptive process models have been applied for many years in an effort to
bring order and structure to software development
– Each of these models suggests a somewhat different process flow, but all perform the
same set of generic framework activities: communication, planning, modeling,
construction, and deployment.
• Sequential process models, such as the waterfall and V-models, are the oldest
software engineering paradigms.
– They suggest a linear process flow that is often inconsistent with modern realities (e.g.,
continuous change, evolving systems, tight time lines) in the software world
– They do, however, have applicability in situations where requirements are well defined
and stable.
• Incremental process models are iterative in nature and produce working
versions of software quite rapidly
2
An Introduction to
Scrum
Slides Credit: MountainGoat Software
Presentation by: Mike Cohn
[email protected] www.mountaingoatsoftware.com 3
•Scrum is an agile process that allows
Scrum
us to in 100 on delivering the highest
focus
words
business value in the shortest time.
•It allows us to rapidly and repeatedly
inspect actual working software (every
two weeks to one month).
•The business sets the priorities.
Teams self-organize to determine the
best way to deliver the highest
priority features.
•Every two weeks to a month anyone can
see real working software and decide to
release it as is or continue to enhance
Scrum has been used by:
•Microsoft •Intuit
•Yahoo •Nielsen Media
•Google •First American Real Estate
•Electronic Arts •BMC Software
•High Moon Studios •Ipswitch
•Lockheed Martin •John Deere
•Philips •Lexis Nexis
•Siemens •Sabre
•Nokia •Salesforce.com
•Capital One •Time Warner
•BBC •Turner Broadcasting
•Intuit •Oce
Scrum has been used for:
• Commercial software • Video game development
• In-house development • FDA-approved, life-critical
systems
• Contract development
• Fixed-price projects
• Satellite-control software
• Financial applications
• Websites
• ISO 9001-certified applications
• Handheld software
• Embedded systems
• Mobile phones
• 24x7 systems with 99.999% uptime
• Network switching applications
requirements • ISV applications
• the Joint Strike Fighter • Some of the largest applications
in use
Characteristics
• Self-organizing teams
• Product progresses in a series of month-long “sprints”
• Requirements are captured as items in a list of “product
backlog”
• No specific engineering practices prescribed
• Uses generative rules to create an agile environment for
delivering projects
• One of the “agile processes”
The Agile Manifesto–a statement
of values
Individuals and
over Process and tools
interactions
Comprehensive
Working software over
documentation
Customer collaboration over Contract negotiation
Responding to change over Following a plan
Source:
www.agilemanifesto.org
development team members and Scrum Master were committed, product owner
was merely involved.
9
Scrum 24 hours
Sprint
2-4 weeks
Sprint goal
Return
Sprint
Potentially shippable
Cancel
Return backlog
product increment
Gift
Coupons
wrap
Gift
Cancel
wrap Coupons
Product
backlog
Putting it all together
Image available at
www.mountaingoatsoftware.com/scr
um
Sprints
• Scrum projects make progress in a series of “sprints”
– Analogous to Extreme Programming iterations
• Typical duration is 2–4 weeks or a calendar month at
most
• A constant duration leads to a better rhythm
• Product is designed, coded, and tested during the sprint
Sequential vs. overlapping
development
Requireme
Design Code Test
nts
Rather than
doing all of one
thing at a ...Scrum teams do
time... a little of
everything all
the time
Source: “The New New Product Development Game”
by Takeuchi and Nonaka. Harvard Business
Review, January 1986.
No changes during a sprint
Change
• Plan sprint durations around how long you can
commit to keeping change out of the sprint
Scrum framework
Roles
•Product
owner
•ScrumMasterCeremonie
•Team
sSprint planning
•
•Sprint review
•Sprint
retrospective
•Daily scrum
Artifact
meeting
sProduct backlog
•
•Sprint backlog
•Burndown charts
First Step – Write User Stories…
Dr Ganesh Neelakanta Iyer 19
User Stories
seek to combine the strengths
of written and verbal communication,
where possible supported by a picture.
* Kent Beck coined the term user stories in Extreme Programming
Explained 1st Edition, 1999
What is a User Story?
• A concise, written description of a piece of functionality
that will be valuable to a user (or owner) of the software.
• Stories are:
– User’s needs
– Product descriptions
– Planning items
– Tokens for a conversation
– Mechanisms for deferring conversation
User Stories
• 3 aspects
– Written description of story used for planning/reminding
– Conversations about the story that serve to fill out details
– Tests that convey and document details & can be used to
determine when a story is complete
• Represent functionality that will be valued by users
Examples of specifying value to users
• Good:
– “A user can search for jobs”
– “A company can post new jobs”
• Bad:
– “The software will be written in C++”
– “The program will connect to the database through a
connection pool”
Sizing stories
• Too broad = impossible to test/code
• Too narrow = more time spent specifying than implementing
• Aim for test & code cycle of about 4 hours to 2 weeks by one or 2
programmers per story
• Split long stories (“epics”) into smaller pieces
• Rather than specify small details, get those in conversations with
customer & annotate story
• Big stories can serve as placeholders for areas of the system that
still need to be discussed
Writing Stories
• Customer writes stories
– Written in language of business to allow prioritization
– Customer is primary product visionary
• Good stories are
– Independent
– Negotiable
– Valuable to users or customers
– Estimatable
– Small
– Testable (INVEST)
INVEST in Good User Stories
• Independent – User Stories should be as independent as possible.
• Negotiable – a User Story is not a contract. It is not a detailed specification. It is a
reminder of features for the team to discuss and collaborate to clarify the details
near the time of development.
• Valuable – User Stories should be valuable to the user (or owner) of the solution.
They should be written in user language. They should be features, not tasks.
• Estimatable – User Stories need to be possible to estimate. They need to provide
enough information to estimate, without being too detailed.
• Small – User Stories should be small. Not too small and not too big.
• Testable – User Stories need to be worded in a way that is testable, i.e. not too
subjective and to provide clear details of how the User Story will be tested.
Independent
• Stories that depend on other stories are difficult to
prioritize and estimate
• Example:
– A company can pay for a job posting with a Visa card
– A company can pay for a job posting with a Mastercard
– A company can pay for a job posting with an American Express
card
Negotiable
• Story cards serve as reminders not contracts
• Details need to be fleshed out in conversation
• Story cards should have a phrase or sentence to serve as
reminder to have conversation & notes about
conversation
Valuable
• Both to people using the software and paying for the software
• Avoid stories valued only by developers (make the benefits to
customers/users apparent for these stories)
• Example
– “All connections to the database are through a connection pool” could be
rewritten as “Up to 50 users should be able to use the application with a 5-
user database license”
Estimable
• 3 common reasons why story might not be
– Developers lack domain knowledge
• Get details from customer
– Developers lack technical knowledge
• Perform spike to explore technology
– Story is too big
• Split the story into smaller ones
Small
• Easy to use in planning
• Split compound & complex stories
• Combine too small stories
Splitting Stories
• Compound
– Conversations may reveal multiple stories
– Split along Create/Update/Delete
– Split along data boundaries
• Complex
– Split into investigative and develop the new feature stories (define timebox
for investigation)
• Make sure each split-off portion is a good story (INVEST)
Testable
• Can’t tell if story is done without tests
• Aim for most tests to be automatable
Story Responsibilities (Developers)
• Help the customers write stories that
– Are promises to converse rather than detailed specs
– Have value to the users or the customer
– Are independent
– Are testable
– Are appropriately sized
• Describing the need for technology/infrastructure in terms of value
to users or customers
• Have the conversations with the customers
Story Responsibilities (Customers)
• Writing stories that
– Are promises to converse rather than detailed specs
– Have value to users or to yourself
– Are independent
– Are testable
– Are appropriately sized
• Have the conversations with the developers
Users
• Can be more than one type of user for system
• Different user types may have different roles and different
stories
• Disfavored users (e.g., hackers) may be included as well
as favored users
– Obviously, the value to users piece gets flipped for disfavored
users
Guidelines for Good Stories
• Start with goal stories
• Write closed stories (stories that have a definite end
point)
– “A recruiter can review resumes from applicants to one of her
ads” instead of “A recruiter can manage the ads she has
placed”
• Put constraints on the system on cards & implement
automated tests for them
Guidelines II
• Size your story appropriately for the time frame it may be
implemented in
• Keep the UI out as long as possible
• Don’t rely solely on stories if somethings are better expressed in
other ways
• Include user roles in stories rather than saying “user”
• Write for a single user (“A Job Seeker” not “Job Seekers”)
• Use Active Voice
User Stories are Not
• Requirements documents
• Use Cases
• Scenarios
Why do user stories?
• Emphasize verbal communication
• Comprehensible by everyone
• Right size for planning
• Work for iterative development
• Encourage deferring detail
• Support opportunistic development
• Encourage participatory design
• Build up tacit knowledge
Prioritize stories in a backlog
• Agile customers or product
owner prioritize stories in a
backlog
• A collection of stories for a
software product is referred to
as the product backlog
• The backlog is prioritized so
that the most valuable items
have the highest priorities
41
User Stories Summary
• User Stories combine written and verbal communications, supported
with a picture where possible.
• User Stories should describe features that are of value to the user,
written in the user’s language.
• User Stories detail just enough information and no more.
• Details are deferred and captured through collaboration
just in time for development.
• Test cases should be written before development, when the User Story
is written.
• User Stories should be Independent, Negotiable, Valuable, Estimatable,
Small and Testable.
Example
Travel Web Site
43
Where are the details?
• As a user, I can cancel a reservation
– Does the user get a full or partial refund?
• Is the refund to her credit card or is it site credit?
– How far ahead must the reservation be cancelled?
• Is that the same for all hotels?
• For all site visitors? Can frequent travelers cancel later?
– Is a confirmation provided to the user?
• How?
44
Details as conditions of satisfaction
45
Details added in smaller sub-stories
46
What you typically need to work on
47
User Stories identification
task 1
Story 1 tast 2
...
Feature 1 task 1
Story 2 task 2
... ...
Project
Story 1
Feature 2
...
...
Story 1
Feature N
...
48
Note
• In general terms, every project will have
• Epics
– Features
• Stories
– Tasks
• In this course we start from Features and ignore Epics
• In other words, we use the terms Features and Epics
interchangeably
49
The flow
• Epic/Feature - A general use case that is a collection of
user stories
• User Story - A concise, written description of a piece of
functionality that will be valuable to a user (or owner) of the
software
• Task - Represents development tasks to accomplish the
user story. Generally no more than 1-day tasks.
• (Engineering) Task - represents a set of engineering work
that is not directly related to a user story.
50
Example
• Epic/Feature: User Authentication. • Hook up login page to web service REST API.
– Forgot Password workflow:
• User Stories:
• ...
– User Login screen.
• (Engineering) Tasks:
– Forgot Password workflow.
– Lock account after too many failed attempts.
– Setup GitHub project repo.
– Google login support.
– Setup GCP (or AWS) account, containers,
– Facebook login support.
and services.
• Sub-Tasks: • (There might be Sub-Tasks for these too)
– User Login screen: • ...
• Design login page. – Setup Jenkins CI pipeline.
• Cut SVG icons and images. – Design overall (high-level) system
• Implement login page HTML/CSS/JS. architecture.
• Create SQL scripts to create tables.
– Research and decide on unit test and
• Create SQL scripts for stored procedures.
mocking framework.
• Create web service REST API for user resource.
51
References
• www.mountaingoatsoftware.com/scrum
• www.scrumalliance.org
• www.controlchaos.com
• https://www.mountaingoatsoftware.com/uploads/presenta
tions/User-Stories-for-Agile-Requirements-Norwegian-De
velopers-Conference-2014.pdf
Scrum framework
Roles
•Product
owner
•ScrumMasterCeremonie
•Team
sSprint planning
•
•Sprint review
•Sprint
retrospective
•Daily scrum
Artifact
meeting
sProduct backlog
•
•Sprint backlog
•Burndown charts
Scrum framework
Roles
•Product
owner
•ScrumMasterCeremonies
•Team
•Sprint planning
•Sprint review
•Sprint
retrospective
•Daily scrum
Artifact
meeting
sProduct backlog
•
•Sprint backlog
•Burndown charts
Product owner
• Define the features of the product
• Decide on release date and content
• Be responsible for the profitability of the product (ROI)
• Prioritize features according to market value
• Adjust features and priority every iteration, as needed
• Accept or reject work results
The ScrumMaster
• Represents management to the project
• Responsible for enacting Scrum values and practices
• Removes impediments
• Ensure that the team is fully functional and productive
• Enable close cooperation across all roles and functions
• Shield the team from external interferences
The team
• Typically 5-9 people
• Cross-functional:
• Programmers, testers, user experience
designers, etc.
• Members should be full-time
• May be exceptions (e.g., database administrator)
The team
• Teams are self-organizing
• Ideally, no titles but rarely a possibility
• Membership should change only between
sprints
Scrum framework
Roles
•Product
owner
•ScrumMaster
•Team Ceremonies
•Sprint planning
•Sprint review
•Sprint
retrospective
•Daily scrum
Artifact
meeting •sProduct backlog
•Sprint backlog
•Burndown charts
Team
Sprint planning
capacity meeting
Sprint
Product •prioritization
Analyze and evaluate Sprint
backlog product backlog goal
• Select sprint goal
Business
conditions Sprint
•planning
Decide how to achieve
Current sprint goal (design)
product • Create sprint backlog Sprint
backlog
(tasks) from product
backlog items (user
Technology stories / features)
• Estimate sprint backlog
in hours
Sprint planning
• Team selects items from the product backlog they can
commit to completing
• Sprint backlog is created
• Tasks are identified and each is estimated (1-16 hours)
• Collaboratively, not done alone by the ScrumMaster
• High-level design is considered
As a vacation planner, I want to
see photos of the hotels. Code the middle tier (8
hours)
Code the user interface
(4)
Write test fixtures (4)
Code the foo class (6)
Update performance tests
(4)
The daily scrum
• Parameters
• Daily
• 15-minutes
• Stand-up
• Not for problem solving
• Whole world is invited
• Only team members, ScrumMaster, product owner, can
talk
• Helps avoid other unnecessary meetings
Everyone answers 3 questions
1
What did you do yesterday?
2
What will you do today?
3
Is anything in your way?
• These are not status for the ScrumMaster
• They are commitments in front of peers
The sprint review
• Team presents what it accomplished during the sprint
• Typically takes the form of a demo of new features or
underlying architecture
• Informal
• 2-hour prep time rule
• No slides
• Whole team participates
• Invite the world
Sprint retrospective
• Periodically take a look at what is and is
not working
• Typically 15–30 minutes
• Done after every sprint
• Whole team participates
– ScrumMaster
– Product owner
– Team
– Possibly customers and others
Start / Stop / Continue
• Whole team gathers and discusses what
they’d like to:
Start doing
Stop doing
This is just one
of many ways to Continue doing
do a sprint
retrospective.
Scrum framework
Roles
•Product
owner
•ScrumMasterCeremonies
•Team
•Sprint planning
•Sprint review
•Sprint
retrospective
•Daily scrum
Artifact
meeting
sProduct backlog
•
•Sprint backlog
•Burndown charts
Product backlog
• The requirements
• A list of all desired work on
the project
• Ideally expressed such that
each item has value to the
users or customers of the
product
• Prioritized by the product
owner
• Reprioritized at the start of
This is the each sprint
product backlog
A sample product backlog
Backlog item Estimate
Allow a guest to make a reservation 3
As a guest, I want to cancel a reservation. 5
As a guest, I want to change the dates of a
3
reservation.
As a hotel employee, I can run RevPAR
8
reports (revenue-per-available-room)
Improve exception handling 8
... 30
... 50
The sprint goal
• A short statement of what the work will be
focused on during the sprint
Life Sciences
Support features necessary
Database for population genetics
Application studies.
Make the application run
on SQL Server in
addition to Oracle. Financial
services
Support more technical
indicators than company
ABC with real-time,
streaming data.
Managing the sprint backlog
• Individuals sign up for work of their own
choosing
• Work is never assigned
• Estimated work remaining is updated daily
Managing the sprint backlog
• Any team member can add, delete or change
the sprint backlog
• Work for the sprint emerges
• If work is unclear, define a sprint backlog item
with a larger amount of time and break it down
later
• Update work remaining as more becomes
known
A sprint backlog
Tasks Mon Tues Wed Thur Fri
Code the user
interface
8 4 8
Code the middle
tier
16 12 10 4
Test the middle
tier
8 16 16 11 8
Write online help 12
Write the foo class 8 8 8 8 8
Add error logging 8 4
A sprint burndown chart
Hours
Tasks Mon Tues Wed Thur Fri
Code the user
8 4 8
interface
Code the middle
16 12 10 7
tier
Test the middle
8 16 16 11 8
tier
Write online help 12
50
40
30
20
Hours
10
0
Mon Tue Wed Thu Fri
Scalability
• Typical individual team is 7 ± 2 people
– Scalability comes from teams of teams
• Factors in scaling
– Type of application
– Team size
– Team dispersion
– Project duration
• Scrum has been used on multiple 500+ person projects
Scaling through the Scrum of
scrums
Scrum of scrums of scrums
Where to go next
• www.mountaingoatsoftware.com/scrum
• www.scrumalliance.org
• www.controlchaos.com
• [email protected]
A Scrum reading list
• Agile and Iterative Development: A Manager’s Guide by
Craig Larman
• Agile Estimating and Planning by Mike Cohn
• Agile Project Management with Scrum by Ken Schwaber
• Agile Retrospectives by Esther Derby and Diana Larsen
A Scrum reading list
• Agile Software Development Ecosystems by Jim
Highsmith
• Agile Software Development with Scrum by Ken Schwaber
and
Mike Beedle
• Scrum and The Enterprise by Ken Schwaber
• Succeeding with Agile by Mike Cohn
• User Stories Applied for Agile Software Development by
Mike Cohn