CIS 3760: Software Engineering Agile Software Engineering –
Part II (Scrum & XP)
Instructor: Prof. Stacey Scott
School of Computer Science
University of Guelph https://www.uoguelph.ca/computing/people/stacey-scott stacey.scott@uoguelph.ca
© 2017-21 Stacey D. Scott – with content from J. McCuaig & F. Maurer, used with permission
CIS 3760
Software Engineering
2
Supplemental Resources for Agile SE (Parts I&II)
• Videos
– Agile Project Management: Scrum & Sprint Demystified from Project Management Videos (link on CourseLink)
– [Scrum 101] Scrum and XP (Extreme Programming) from Kane Mar (link on CourseLink)
– Dr.Scott’sYouTubeChannel(staceydscott)playlist:UsefulAgile Software Engineering Videos
• Readings:
– Ch. 1-4, 6, 8-10 (Intro to Scrum), Ch 13 (XP) in Kniberg text (lab manual)
CIS 3760
Software Engineering
3
Agile Software Engineering Outline
Part I: Intro to Agile SE and Agile concepts
Part II: Example Agile Methods / Practices: Scrum
– Extremeprogramming(XP)
CIS 3760
Software Engineering
4
Activity: Identifying Common Problems with User Stories…and Strategies to Fix Them…
(See handout “Good and Bad User Stories” on CourseLink)
User Story template: As a
I want to
so that
User Story 4: As a Zhers’ online grocery store customer, I want to see different food items types displayed in different colours – RGB=#FF0000 for meats, #A52AFa for grains, and #808000 for vegetables and fruits – so that I can quickly identify my food items by food type.
User Story 5: As the business owner, I would like logins to time out and log off after a preset number of seconds in case users leave their computers unattended.
CIS 3760
Software Engineering
5
Scrum Outline
• Scrum basics
• Scrum process
• Product and sprint backlogs: story characteristics
CIS 3760
Software Engineering
6
Scrum
CIS 3760
Software Engineering
© DamjanBNZ http://www.flickr.com/photos/64797134@N03/
SCRUM
7
Scrum Methodology: Distinguishing Features • Development work is partitioned into “packets” (stories)
• Testing and documentation are on-going as product is constructed
• Work occurs in “sprints” and is delivered from a “backlog” of existing requirements
• Meetings are very short and sometimes conducted without chairs! (i.e. stand-ups)
• “demos” are delivered to the customer at the end of the allocated time-box
CIS 3760
Software Engineering
8
Scrum still has all the “traditional” SE activities…
CIS 3760
Software Engineering
http://scrumtrainingseries.com 9
Scrum Roles
• ProductOwner
– Prioritizesthelistoffeaturesthatcouldbeworkedon
– Finalarbiteronrequirements
– Declares features to be done (or not done)
• ScrumDevelopmentTeam – Cross-functionalandcollaborative
• Scrum Master / Agile Coach – Enforcestime-boxes
– Removesimpediments
– Facilitatesmeetings
– Maintainssprint/productbacklog
CIS 3760
Software Engineering
10
Scrum Artifacts
• Product Backlog
– Product backlog items (PBI) (also called “stories”)
• Sprint Backlog • Sprint Task
CIS 3760
Software Engineering
11
Scrum Artifacts
Tasks
• Product Backlog
– Product backlog items (PBI)
• Sprint
• Sprint Backlog • Sprint Task
CIS 3760
Software Engineering
12
Scrum Board (w/ Sprint Burndown Chart)*
CIS 3760
Software Engineering
*from Kniberg, Ch 6
13
CIS 3760
Software Engineering
If all backlog items are completed before the sprint ends, add new ones from here
*from Kniberg, Ch 6 14 *from Kniberg, Ch 6
A few days into the Sprint…
CIS 3760
Software Engineering
*from Kniberg, Ch 6 15
Sprint Burndown Chart
• A visualization of the team’s ongoing progress during a sprint compared to the estimated sprint “velocity”
– Velocity = estimated number of backlog items (i.e. stories) the team will complete during the sprint
CIS 3760
Software Engineering
*from Kniberg, Ch 6 16
Scrum Outline
Scrum basics
Scrum process
• Product and sprint backlogs: story characteristics
CIS 3760
Software Engineering
17
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
18
Backlog Creation
Potentially Shippable Functionality
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
19
Backlog Creation
Potentially Shippable Functionality
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
20
Backlog Creation
Potentially Shippable Functionality
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
21
Backlog Creation
Potentially Shippable Functionality
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
22
Backlog Creation
Potentially Shippable Functionality
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Team members answer 3 Q’s: -What did you do since last Scrum?
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
23
Backlog Creation
Scrum: 15 min daily meetings
-Do you have any obstacles?
-What will you do before next meeting?
Potentially Shippable Functionality
Scrum Flow (Sutherland, Schwaber and Beedle)
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
24
Backlog Creation
Potentially Shippable Functionality
CIS 3760
Software Engineering
25
UofG Mental Health Supports
Campus support: Student Wellness
Counselling and mental health care, including psychiatry, (via phone and video in some cases during COVID‐19)
• Appointments: 519‐824‐4120 x53244
Off campus support
Urgent Access (24/7 mental health support lines available):
• Here 24/7 at 1‐884‐437‐3247
• Good2Talk at 1‐866‐925‐5454
• HelpPhone at 1‐800‐668‐6868, or text UofG to 686868
Other options are available, including resources for coping with COVID‐19
anxieties: wellness.uoguelph.ca/covid‐19‐faqs‐ student‐wellness‐services
CIS 3760
Software Engineering
26
• •
Review poll on Zoom…
What is the following chart called? What is it used for?
Some Review and Discussion
CIS 3760
Software Engineering
https://lookforwardconsulting.com/2010/10/30/using-a-sprint-burndown-chart/ 27
Scrum Outline
Scrum basics
Scrum process (cont’d)
• Product and sprint backlogs: story characteristics
CIS 3760
Software Engineering
28
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
Microsoft Press: 2004.
29
Scrum Flow Review
Backlog Creation
Ken Schwaber, Agile Project Management with Scrum,
Potentially Shippable Functionality
Scrum process: Backlog refinement
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
Microsoft Press: 2004.
30
Backlog Creation
Ken Schwaber, Agile Project Management with Scrum,
Potentially Shippable Functionality
Backlog Creation/Refinement
• Brainstorm for all features needed for product
• BPI are written as “user stories”
• Stories no bigger than 1⁄4 of Sprint
• Large stories are split into smaller stories
• Product owner prioritizes importance of stories
• Team estimates effort (e.g. story points) for each story
• Meetings are time-boxed (enforced by Scrum Master)
CIS 3760
Software Engineering
31
Scrum process: Sprint Planning meeting
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
Microsoft Press: 2004.
32
Backlog Creation
Ken Schwaber, Agile Project Management with Scrum,
Potentially Shippable Functionality
Sprint Planning
• Select the stories for the next Sprint
– Sprint backlog
• Product owner sets the goals
for the Sprint
• Selected stories must have agreed upon definition of “done” – Properlytested,refactored,potentiallyshippable
• Dev team adds initial tasks associated with story for each Sprint backlog item
• Meetings are strictly time-boxed (enforced by Scrum Master)
CIS 3760
Software Engineering
33
Backlog Refinement
Scrum process: Sprint Demo
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
CIS 3760
Software Engineering
Microsoft Press: 2004.
34
Backlog Creation
Ken Schwaber, Agile Project Management with Scrum,
Potentially Shippable Functionality
Sprint Demo
Sprint Review Meetings (aka Sprint Demo)
• Held at end of Sprint
• Whole team participates, including product owner
• Team demos the product
• Product owner asks/answers questions
• Product owner declares the story done or not done
• No partly done stories…unfinished stories go back into product backlog (do not get demoed)
CIS 3760
Software Engineering
35
End-of-Sprint: Sprint Retrospective Meeting
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
Sprint Retrospective Meeting
CIS 3760
Software Engineering
Microsoft Press: 2004.
36
Backlog Creation
Ken Schwaber, Agile Project Management with Scrum,
Potentially Shippable Functionality
End-of-Sprint: Sprint Retrospective Meeting
• ScrumMasterandDevelopmentTeam
• ReflectontheSprint,theprocess,what worked, what didn’t
• Knibergrecommendsidentifying: – TheGood
– The Could have done better
– Improvements (concrete ideas about
how to improve future Sprint performance)
• Thishelpsteamslearnfromexperience and improve!
• Time-boxed meeting
CIS 3760
Software Engineering
37
That completes the whole Scrum Process
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
Backlog Refinement
CIS 3760
Software Engineering
Microsoft Press: 2004.
38
Backlog Creation
Ken Schwaber, Agile Project Management with Scrum,
Potentially Shippable Functionality
Scrum Outline
Scrum basics
Scrum process
Product and sprint backlogs: story characteristics
CIS 3760
Software Engineering
39
Ken Schwaber, Agile Project Management with Scrum, Microsoft Press: 2004.
Backlog Refinement
More on the Product Backlog…
Features assigned to Sprint (during Sprint Planning Mtg)
Sprint: 2-4 weeks
CIS 3760
Software Engineering
40
Backlog Creation
Potentially Shippable Functionality
What is in the Product Backlog?
• User stories
– Productrequirements/featuresdescribedfromtheuser perspective
• Technical stories (should be fewer of these!)
– Technicalaspectsoftheproductthatneedtobe developed/improved to support the project goals
– E.g. refactoring of a specific component, refactoring of the database to improve scalability/performance, etc.
CIS 3760
Software Engineering
41
User Story
Traditional Requirement
User Story vs. Traditional Requirement: What’s the Difference??
“As a
Lists a feature the system must/shall have:
E.g. An example user story for a basic e-commerce site:
E.g. Example requirements for a basic e-commerce site:
“Asacustomer,Iwanttobe able to view the items in my cart so that I know for sure what I’m purchasing.”
– Displaythenameofeach item in the shopping cart.
CIS 3760
Software Engineering
42
– Displaythequantityofeach item in the shopping cart.
– Allow the user to remove any items in the shopping cart.
Important User Story Characteristics
• Discrete
– Describesasingle,independentbitoffunctionalityor
expectation of the user
– Canbegeneralinnature(atleastinitially)–canbefactored
(split) later into more precise stories
• Estimable
– Devteammustbeabletoestimatehowmuchtimewillbe
needed to realize the story in production quality software
• Testable
– Story must have some associated acceptance criteria for being
deemed satisfactorily “done”
– Product owner and dev team must agree on definition of “done”
• Prioritized
– Product owner determines the relative importance of this story
compared to other stories (i.e. its priority) based on the business value
CIS 3760
Software Engineering
*from Scenarios, Stories, and Use Cases, Ch 13
43
Sample Product Backlog / User Story
Estimate can be measured in story point (= person x days) or more simply by basic notion of size (=SM, M, L, XL), or other methods…
CIS 3760
Software Engineering
*from Kniberg, Ch 244
5
Importance can simply be tracked by ordering of stories in product/sprint backlog
Definition of Done vs. Acceptance Criteria
A “completed” story needs to pass both the definition of done criteria and acceptance criteria
CIS 3760
Software Engineering
45
https://www.visual-paradigm.com/scrum/definition-of-done-vs-acceptance-criteria
Recall: Story Test Driven Development – Agile Approach to Quality
CIS 3760
Software Engineering
(may be other activities that are also defined)
“Acceptance criteria”
Relates to “definition of done”
46
Definition of “Done”
CIS 3760
Software Engineering
https://www.scruminc.com/definition-of-done/ 47
Activity: Identify Acceptance Criteria
Context:
Goals of Acceptance Criteria
• • •
Clarify what the team should build before they start work Ensure everyone has a common understanding of the problem Help the team members know when the Story is complete
Activity:
(From: https://www.visual-paradigm.com/scrum/definition-of-done-vs- acceptance-criteria/)
For the user story: “As an eCommerce website user, I want to register online, so that I can shop under my personal profile.”
Use the think-pair-share activity method to brainstorm potential acceptance criteria for this user story.
CIS 3760
Software Engineering
48
Agile Software Engineering Outline
Part I: Intro to Agile SE and Agile concepts
Part II: Example Agile Methods / Practices: Scrum
Extreme programming (XP)
CIS 3760
Software Engineering
49
Scrum vs. Extreme Programming (XP)
• Scrum focuses on project management
• XP focuses on actual programming practices
– Most XP projects look a lot like Scrum projects in terms of the process they follow, but incorporate specific coding practices
• They are consistent and complementary agile frameworks
CIS 3760
Software Engineering
50
Common Extreme Programming Project Flow
CIS 3760
Software Engineering
*from http://www.extremeprogramming.org/map/project.htm5l 1
XP Practices*
• Pair programming
• Test-driven development (TDD)
• Incremental design (simple design, small releases, continued improvement)
• Spikes (Short intense periods of exploratory development to investigate an uncertain technical issue to assist project planning)
• Continuous integration and continuous delivery
– Each night whole product is rebuilt, including documentation (automated) testing, etc. – some products automatically deployed
• Collective code ownership (anyone can work on any part of code)
• Informative workspace (coding standard, updated project info)
• Sustainable pace / energized work (40 hour (or less!) work week)
CIS 3760
Software Engineering
*from Kniberg, Ch 13 and Extreme Programming Explained (Beck)
52
How Everything Fits Together
Ken Beck. Extreme Programming Explained: Embrace Change, Addison-Wesley, 1999, p. 70
CIS 3760
Software Engineering
53
Supplemental Resources for Agile SE (Parts I&II)
• Videos
– Agile Project Management: Scrum & Sprint Demystified from Project Management Videos (link on CourseLink)
– [Scrum 101] Scrum and XP (Extreme Programming) from Kane Mar (link on CourseLink)
– Dr.Scott’sYouTubeChannel(staceydscott)playlist:UsefulAgile Software Engineering Videos
• Readings:
– Ch. 1-4,6,8-10 (Intro to Scrum), Ch 13 (XP) in Kniberg text
CIS 3760
Software Engineering
54
Additional Materials (Optional, but likely helpful for practical project tips and/or deeper concept understanding
—
Also see supplemental slide deck posted to CourseLink called “User Stories Supplement”
55
Vertical slicing & sizing
• Try not to slice stories along technical lines
• Slice them vertically for as long as you possibly can
1. Exercising every layer reduces risk of finding last minute problems in one of the layers
2. Application with reduced functionality can still be released
• Example: “A job user can post a CV” (epic)
-> “A job seeker can fill out a CV form”
Correct:
-> “A job seeker can submit a CV that includes only basic information such as name, address and work history”
CIS 3760
Software Engineering
(adapted from May Quay’s Presentation “Writing User Stories”, Macmillan Cancer Support, April 2012)
56
Closed stories
• When breaking down stories aim for closed stories
• Closed stories end with the achievement of a meaningful
goal
– Example:“AsauserIwanttoreprintpreviousorderssoIcan double check against deliveries and remember what was ordered”
CIS 3760
Software Engineering
(adapted from May Quay’s Presentation “Writing User Stories”, Macmillan Cancer Support, April 2012)
57
Small / Sized appropriately
2 kind of epics
1. Compound epic 2. Complex epic
Compound epic
• Comprises multiple shorter stories Complex epic
• Cannot be easily separated into smaller stories -> use spikes to find out how to split epics
CIS 3760
Software Engineering
(adapted from May Quay’s Presentation “Writing User Stories”, Macmillan Cancer Support, April 2012)
58