Show contents
Chapter 1 of 7 · 20 min
Organise and prioritise the work
By the end of this chapter, you'll be able to
- Compare a sequential approach and an iterative approach
- Write user stories with acceptance criteria
- Prioritise a backlog with MoSCoW and the value-to-effort ratio
- Write a definition of done for the team
Two ways to run a project
- The sequential approach (known as “waterfall”) goes through the phases once: specify everything, then design everything, build everything, test everything, and finally deliver. It suits needs that are stable and well known. Its risk: misunderstandings are only discovered at the very end.
- The iterative approach (which includes the so-called agile methods, such as Scrum) splits the project into short iterations, of one to four weeks. Each one produces a usable version, shown to users, who react. The course is adjusted at every round.
In software, where the need often becomes clearer once people see the product, the iterative approach dominates. But it is not magic: it takes discipline, especially to decide what to do first.
User stories
Work is described from the point of view of those who benefit from it, as user stories:
As a parent, I want to register my child online so that I do not queue at the school office.
Each story comes with acceptance criteria that can be checked: “the form refuses a date of birth in the future”, “a confirmation email is sent”. All the stories to be done form the product backlog.
from dataclasses import dataclass, field
@dataclass
class Story:
role: str
need: str
benefit: str
criteria: list[str] = field(default_factory=list)
def text(self):
return f"As a {self.role}, I want to {self.need} so that I {self.benefit}."
s = Story("parent", "register my child online", "do not queue at the school office",
["the date of birth cannot be in the future", "a confirmation email is sent"])
print(s.text())
for c in s.criteria:
print(" -", c)
As a parent, I want to register my child online so that I do not queue at the school office.
- the date of birth cannot be in the future
- a confirmation email is sent
field(default_factory=list) gives each story its own list of criteria (a default empty list written = [] would be shared by all objects).
Prioritise the backlog
Not everything will fit in the time available: you have to choose. Two simple tools help decide.
The MoSCoW method sorts each item into four categories: Must (essential), Should (important), Could (nice to have), Won't (not this time). The value-to-effort ratio then breaks ties within a category: for equal value, do the cheaper one first.
backlog = [
("Online registration", "M", 8, 5),
("Fee payment by mobile money", "S", 8, 8),
("School office dashboard", "M", 6, 3),
("Dark theme", "C", 2, 2),
("Native mobile app", "W", 7, 20),
("Spreadsheet export of registrations", "S", 5, 1),
]
ORDER = {"M": 0, "S": 1, "C": 2, "W": 3}
prioritised = sorted(backlog, key=lambda e: (ORDER[e[1]], -e[2] / e[3]))
for name, moscow, value, effort in prioritised:
print(f"{moscow} {value / effort:>4.1f} {name}")
M 2.0 School office dashboard
M 1.6 Online registration
S 5.0 Spreadsheet export of registrations
S 1.0 Fee payment by mobile money
C 1.0 Dark theme
W 0.3 Native mobile app
Each item carries a value (from 1 to 10, estimated with users) and an effort (in days). Sorting is first by MoSCoW category, then by value-to-effort ratio in descending order (hence the minus sign). The spreadsheet export, very useful and almost free, thus comes before mobile payment, even though the latter is more awaited.
We only commit to what the team can really finish.
Text description of the animation
- Ideas come from everywhere, in no order.
- They are rephrased from the user's point of view, with checkable criteria.
- The essential is separated from the rest, owning the “not this time”.
- Within a category, the best value-to-effort ratio goes first.
- We only commit to what the team can really finish.
The definition of done
“It's almost done” is the most dangerous sentence in a project. The team therefore agrees on a definition of done: the list of what must be true for an item to count as delivered. For example: code reviewed by a colleague, automated tests green, acceptance criteria checked, documentation up to date, deployed to the test environment.
Mini-lab: your own backlogPython 3.13
Output
Click “Run”: Python will load in your browser (about 10 MB the first time).Your code runs in your browser, isolated from the page. · Ctrl/⌘ + Enter to run · Esc then Tab to leave the editor
Your turn
Worked exercise
Worked exercise: fill an iteration
The team has 10 days of work for its first iteration. Following the priority order computed above, add items one by one as long as they fit in the remaining capacity (skipping those that do not fit), never taking a “Won't”. Print the iteration's content and the days used.
Hint 1
remaining variable that starts at 10 and goes down by each selected item's effort.Hint 2
Show the solution and common mistakes
backlog = [
("Online registration", "M", 8, 5),
("Fee payment by mobile money", "S", 8, 8),
("School office dashboard", "M", 6, 3),
("Dark theme", "C", 2, 2),
("Native mobile app", "W", 7, 20),
("Spreadsheet export of registrations", "S", 5, 1),
]
ORDER = {"M": 0, "S": 1, "C": 2, "W": 3}
def fill(backlog, capacity):
iteration, remaining = [], capacity
for name, moscow, value, effort in sorted(backlog, key=lambda e: (ORDER[e[1]], -e[2] / e[3])):
if moscow != "W" and effort <= remaining:
iteration.append(name)
remaining -= effort
return iteration, capacity - remaining
content, days = fill(backlog, 10)
print(content)
print(days, "days out of 10")
['School office dashboard', 'Online registration', 'Spreadsheet export of registrations']
9 days out of 10
Mobile payment (8 days) no longer fits after the two Musts and the export: it moves to the next iteration. The dark theme (2 days) does not fit in the remaining day either. That free day is not wasted: an experienced team often keeps a margin rather than filling to 100%, because the unexpected always happens.
Common mistakes:
- Stopping at the first item that does not fit: capacity would be left unused when a smaller item could have fitted.
- Including “Won't” items to fill the capacity: that rating is a team decision, not a waiting list.
Summary
- 1The sequential approach goes through the phases once; the iterative approach delivers and adjusts in short cycles.
- 2A user story describes a need: “As a…, I want… so that…”, with acceptance criteria.
- 3MoSCoW sorts the backlog; the value-to-effort ratio breaks ties within a category.
- 4If everything is a priority, nothing is: own the “not this time”.
- 5The definition of done sets what must be true for an item to count as delivered.
Your progress is saved on this device. Create a free account to keep your progress on all your devices.