Building it · lesson 1 of 10
Ideas in this lesson
ATaska piece of a story one person can finish in a day or less
BSmall batcheslittle work in progress, checked often
CWalking skeletona thin slice through every part, first

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:

  1. Receive the gateway's POST and read the phone number and message (web.py, lesson 4.6's endpoint).
  2. Give out the next number, one per phone (queue_rules.py).
  3. Save the ticket (storage.py, lesson 4.5's model).
  4. 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

  1. Give out the next number to a phone that texts PILA, and reply with it

  2. Refuse a 61st number in a day, with the “all taken” reply

  3. Build the SMS side

  4. Make the queue better

  5. Show the number being served on the waiting-room screen

  6. Do the database

  7. 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.

One big batch, or many small ones
Three weeks of work, merged at the endFifteen one-day tasks, each merged when done
When you find a mistakeAfter three weeks, in a pile of changesThe same day, in one small change
Reviewing it2,000 lines; reviewers skim100 lines; reviewers read
Combining with others’ workBig, painful mergesSmall merges, most of them automatic
If priorities changeHalf-finished work is wastedStop 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. 1 The web server answers the gateway’s POST with a fixed reply: “You are number 1.”
  2. 2 An empty Python project in a Git repository, with a README that says how to run it
  3. 3 The reply goes back through the gateway to a real phone
  4. 4 A web server on the hosting service that answers “hello”
  5. 5 The number comes from queue_rules.py and is saved in the database
  6. 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”

Spot the trapMarco

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

What makes “Refuse a 61st number in a day” a good task?
What is a walking skeleton?
Why split work by behaviour rather than by layer (database, backend, frontend)?

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.

All sources for Simple Software Development