From design to tasks
Last updated
The design is done and the team is ready to build. But nobody can build “Pila” on a Monday morning. Work has to be cut into pieces small enough to finish in a day, check, and put together. In this lesson you'll turn a story into tasks, see why small batches flow better than big ones, and plan Pila's walking skeleton: the thinnest version that works end to end.
By the end of this lesson you can
- Break a user story into small tasks that can each be finished and checked
- Explain why small batches lower risk and speed up feedback
- Plan a walking skeleton: the thinnest end-to-end slice, built first
Stories into tasks
Lesson 3.3 wrote Pila's needs as user stories, and Stage 4 designed the parts that meet them. Building happens in smaller pieces again: tasks. A task is a piece of work one person can finish, check and hand over in a day or less.
A story usually becomes a few tasks across the design's parts. "As a patient, I want to get a number by text, so that I don't have to line up before dawn" becomes, for example:
- Receive the gateway's POST and read the phone number and message (
web.py, lesson 4.6's endpoint). - Give out the next number, one per phone (
queue_rules.py). - Save the ticket (
storage.py, lesson 4.5's model). - Send the reply text (
sms.py).
One small change from the design: the module lesson 4.3 called queue.py is called queue_rules.py in the code. Python's standard library already has a module called queue, and a file of the same name in the project would hide it from any code that imports it.
Good tasks and bad ones
A good task does one thing, fits in a day, and has a clear finish line, usually the acceptance criteria of its story. Sort these proposed tasks for Pila's board.
0 of 7 placed right
Give out the next number to a phone that texts PILA, and reply with it
Refuse a 61st number in a day, with the “all taken” reply
Build the SMS side
Make the queue better
Show the number being served on the waiting-room screen
Do the database
Let counter staff print a number for a patient without a phone
Notice that the good tasks are behaviours a person could see working. "The database" and "the SMS side" are layers; splitting work by layer means nothing works until every layer is done.
Small batches
How much work is in progress at once is a choice. Lean thinking (lesson 2.8) and Kanban's limits on work in progress (2.7) both say: keep it small.
| Three weeks of work, merged at the end | Fifteen one-day tasks, each merged when done | |
|---|---|---|
| When you find a mistake | After three weeks, in a pile of changes | The same day, in one small change |
| Reviewing it | 2,000 lines; reviewers skim | 100 lines; reviewers read |
| Combining with others’ work | Big, painful merges | Small merges, most of them automatic |
| If priorities change | Half-finished work is wasted | Stop after any task; everything merged works |
Martin Fowler sums it up as "if it hurts, do it more often": merging, testing and releasing all get easier the smaller and more frequent they are.
A walking skeleton
Which tasks first? Alistair Cockburn's answer is a walking skeleton: the thinnest version of the system that works end to end, through every main part, doing almost nothing. Freeman and Pryce recommend starting every project with one, built, deployed and tested automatically.
For Pila, the skeleton is a text that gets any reply. It proves the hard connections work, the gateway, the server, the database, deployment, before anyone polishes a single rule. Put the skeleton's tasks in the order the team should do them.
- 1 The web server answers the gateway’s POST with a fixed reply: “You are number 1.”
- 2 An empty Python project in a Git repository, with a README that says how to run it
- 3 The reply goes back through the gateway to a real phone
- 4 A web server on the hosting service that answers “hello”
- 5 The number comes from queue_rules.py and is saved in the database
- 6 Deploy it the same way, by script, so anyone on the team can
After the skeleton walks, each new task adds muscle to it: the 60-number limit, opening hours, the priority lane. Pila works, a little more each day.
Spot the trap: “build the backend”
Marco puts one card on the board: “Build the backend.” He estimates three weeks and says he’ll show it when it’s done.
What happens if…
Check what you learned
Sources
Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.
- Walking Skeleton (the Portland Pattern Repository wiki), after Alistair Cockburn: a tiny implementation that links the main parts end to end
- Steve Freeman and Nat Pryce, Growing Object-Oriented Software, Guided by Tests (2009): start each project with a walking skeleton that can be built, deployed and tested
- Mike Cohn: Five simple but powerful ways to split user stories: splitting work into thin vertical slices
- Martin Fowler: Frequency Reduces Difficulty: if it hurts, do it more often, in smaller pieces