Agile Development
Steven J Zeil:
Abstract
Agile methods are a modern approach to incremental development.
They emphasze:
- Iterative & incremental development
- Frequent communication with customer representatives
- Short “time-boxed” development cycles
- Focus on quality as a matter of professional pride
This lesson is a discussion of the origins of Agile Development and a quick overview of the basic principles.
1 Agile as a Social Entity
1.1 Agile Development is
- A reaction against heavily-managed, documentation-heavy processes
- A social movement within the software development profession
- Introduced in the Agile Manifesto (2001)
1.1.1 The Agile Manifesto
We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value:
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan
That is, while there is value in the items on the right, we value the items on the left more.
1.1.2 The Twelve Principles of Agile Software
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.
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.
1.2 Variations
- Extreme programming
- Scrum
2 Fundamental Practices of Agile Development
source: The Agile Alliance
2.1 Teams
- small groups, largely full-time
- contains all required skills (technical and domain expertise)
- Stakeholder representative(s) is a regular team member
2.2 Incremental Development
Each successive version of the product
- is “usable”
- adds user-visible functionality
- that has use-value
Contrast this with a strategy of delivering successive, complete subsystems that will not be revisited.
- Think of building a house by adding room after room, as opposed to pouring the whole foundation, then framing all the exterior walls, then laying all the floors, then doing all the electrical wiring, then doing all the plumbing, then…
-
When can you start using the house?
-
2.3 Users Stories Guide the Planning
A user story is a simple description of desired functionality, often written as a single sentence on an ordinary index card.
Over time, user stories are modified by
- adding an estimated effort to implement that story.
- adding priority info indicating how important this story is to the end users.
- splitting stories that are too big to be implemented during a single pass of an incremental process
- merging related stories that have become too detailed to implement separately.
In an incremental construction process, small sets of stories are chosen for an upcoming increment as the target for the next round of construction.
2.3.1 Examples of User Stories
As a calendar owner, I want to view my schedule for the coming week.
As a visitor, I want to see when a calendar owner has free time in their schedule.
As a calendar owner, I want to receive email notication when someone accepts a proposed appointment.
As a systems administrator, I want to back up all calendars so that the data is safeguarded.
These illustrate some common patterns:
- “As a
{role}
, I want{goal/desire}
” - “As a
{role}
, I want{goal/desire}
so that{benefit}
”
2.3.2 Stories are not Requirements
…despite the focus on functionality and non-functional characteristics.
- Stories are “a promissory note for a future conversation” (Cockburn)
- A use-case is a transcript of that conversation (Standley)
- Stories are a way of prioritizing work
- Including the work of eliciting detailed requirements
2.3.3 Story Boards
- Stories grouped on a story board to help “enrich” the stories
- Story boards can be organized in many different ways
-
Commonly, stories are split into tasks that are shown in a common swimlane.
-
3 Common Practices of Agile Development
3.1 Supporting Technology
Teams are supposed to keep themselves up-to-date.
- Configuration Management
- Version control
- Multi-target builds
- Extensive 3rd-party library use
3.2 Iteration Planning
-
Teams typically try for 4-10 stories per iteration
-
Select stories to implement in current implementation
-
Often organized onto a task board
-
3.2.1 Velocity
Rate at which functionality (user stories) completed per iteration.
-
Most agile approaches define a fixed number of days per iteration
-
Add up the effort estimates of all stories completed during an iteration. This is the team’s current velocity.
- Used to estimate time remaining to complete the project
3.2.2 Task Board
Contains stories to be completed in current iteration
-
Combines story cards and task notes
- task notes indicate team member responsible
- color coding may designate feature, bug, general notes
- each task is marked with an estimate of hours required
-
Task notes organized in columns
- To do: tasks yet to be started
- In process: task that team members are working on
- To verify: believed completed, needs to be checked
- Done: verified as completed. Some boards also list
- Backlog: related stories not being handled this iteration
3.3 Sustainable pace
-
Setting a work pace that can be sustained indefinitely
- overtime only in critical, unusual, and limited circumstances
- Some evidence shows that routine overtime reduces productivity
- overtime only in critical, unusual, and limited circumstances
-
Once a pace has been established, teams can measure velocity
3.4 Meetings
- Emphasis on co-location of teams to enhance communication
- Daily meetings to review key coordination points
- time-boxed to very short time periods (e.g., 15 min.)
- Any topic that starts a discussion is cut short and discussed by interested parties after the meeting
- Three Questions (Scrum)
- What have you completed since the last meeting?
- What do you plan to complete by the next meeting?
- What is getting in your way?
- Avoid “Yesterday I did X. Today I will continue working on X”
- the Scrum Zombie pattern
- helps if user stories define units of work that can be completed in a day
3.5 Rules of Simplicity
(Kent Beck)
Each code unit
- is verified by automated tests
- contains no duplication
- expresses separately each distinct idea or responsibility
- contains the minimum number of components compatible with the first 3 rules
3.6 TDD
Test-Driven Development goes beyond the commonly sited “test first, code later” rule
- write a “single” unit test describing an unimplemented functionality
- run the test (it should fail at this stage)
- write “just enough” code to make the test pass
- refactor the code until it conforms to the rules of simplicity
The four steps above are repeated, adding new, tested functionality each time.
3.7 Simple Design
-
Design is on-going
Principles include
- refactoring
- YAGNI
“You Ain’t Gonna Need It” - argument against early design of elaborate components for future use: “We going to need X eventually. We might was well design it now.” “YAGNI”
-
Design should be emergent
- good global design will emerge from careful attention to local design questions
- Wishful thinking?
- good global design will emerge from careful attention to local design questions
4 Scrum
The most popular agile approach, characterized by
- small teams with a few distinct but clearly defined roles
- Development cycles through sprints of 7-30 days
- Planning meeting at beginning
- Daily scrum meeting (< 15 min.)
- Sprint Review meeting at end to review work completed (or not)
- Sprint Retrospective meeting at end to discuss process
Scrum in Context
As the name suggests, Scrum
- focuses a bit more on the team than on the tools
- envisions a kind of controlled chaos
5 Values
-
Transparency
- Process must be visible to those responsible for the outcome
- Common standards contribute to understandability
-
Inspection
- Scrum participants inspect one anothers’ work
-
Adaptation
- Inspections lead to adjustment of process (not products)
6 Practices
6.1 Scrum Teams
-
Product owner
- representative or agent of stakeholders
- manages the project backlog (list of unimplemented work)
-
Scrum master
- interface between project owner and development team
- aids project owner in arranging backlog
- ensures that development team adheres to Scrum practices
- removes impediments to team’s progress
- “facilitates” Scrum events
-
Development team
- 3–9 members
- must span required skill set
- any internal roles are self-organized
6.2 Scrum Events
6.2.1 Sprints
- 7–30 day, time-boxed iterations
- produces a new product increment
- focused on a Sprint Goal
6.2.2 Sprint Planning
Held at beginning of sprint:
- What will be delivered in the next increment?
- Stories selected from project backlog
- defines the Sprint Goal
- How will the work be done?
- Work planned for first few days of spring
- Decomposed into tasks.
6.2.3 Daily Scrum
-
15-minute daily meeting
-
Each development team member explains
- What did I do yesterday?
- What will I do today?
- Are there any impediments that will prevent us from reaching the Spring Goal?
6.2.4 Sprint Review
- Held at end of sprint
- 4-hour time-boxed meeting (for 1-month sprints)
-
Product owner
- explains what items are Done and not Done
- Reviews the new state of the project backlog
-
Development Team
- explains what went well and poorly
- demonstrates the increment and answers questions
-
Entire team
- discuss what to do next
- discusses external changes
6.2.5 Sprint Retrospective
- After sprint review, before next sprint planning
- 3-hour time-boxed meeting
-
Team inspects its own performance
- people, relationships, process, tools
- Identifies potential improvements
- Sets quality goals
- adjusting definition of “Done”
6.3 Backlogs
6.3.1 Project Backlog
- Unimplemented requirements
- often, but not always stories
6.3.2 Sprint Backlog
- Unimplemented tasks that are part of the Sprint Goal
- Managed on task board
6.3.3 Burndown Charts
A burndown chart shows amount of work remaining in the sprint backlog
- updated daily
- displayed in team work area
- provides visual indicator of progress
6.4 Scaling Up
An extension to Scrum for larger projects:
-
Scrum of Scrums
- Each Daily Scrum appoints one team member to serve as the day’s “ambassador” to a daily Scrum of Scrums meeting
- Same basic questions as Daily Scrum, adjusted for team level
- What has your team done since we last met?
- What will your team do before we meet again?
- What impediments (especially those that will affect other teams) does your team foresee?