Platform Engineering · Lesson F06

Building Software Together: Agile Methodologies

Software is rarely built alone. A team builds it, a little at a time, and shows the work often. Agile is the name for that way of working: short iterations, a daily check-in, and a willingness to change the plan when the work teaches you something new.

Difficulty: Beginner · Know this first: F05 — Drawing the Logic: Flowcharts

Run it as:

When it breaks, I check

One thing to remember

Where the time goes

The bar below is a worked example for this lesson, not a measurement. It shows shares of 100 for the effort in a sprint. The shape is the point: building is most of it, and the meetings are small on purpose. Switch the scenario and watch the fixing share grow when the team gets stuck.

Extra diagram · from scratch to master

A sprint, from list to shipped work

Start with the list. Add one step of the sprint at a time until the work is in front of users.

7 steps in a sprint1 demo1 change
The list
the backlog
Pick a sprint
two weeks
Daily check-in
three questions
Build it
one item at a time
Show it
the real thing
Look back
one change
Ship it
to the users
Request / flowResponse · the way backFailure / dead end

Extra diagram · from scratch to master

Kanban: work that flows across a board

Follow one piece of work from the left of the board to the right, and watch the team pull, not push.

6 columns on the board1 limit1 finished piece
To do
the list
Picked up
someone starts
Doing
work in progress
Limit
only so much at once
Checking
tested
Done
shipped
Request / flowResponse · the way backFailure / dead end

Try it: change the inputs and watch it bend

Plan a sprint yourself. Pick the team size, the sprint length, and how big a task is, and see how much work fits. The arithmetic is exact. The lesson is the shape: small tasks and a short sprint fit more finished work than big tasks and a long one.

5

How many people are on the team. A small team talks easily. A big team needs more coordination.

2

A sprint is 1 to 4 weeks. Each week has 5 work days, so a 2-week sprint has 10 work days.

2

How big one task is, in person-days. A task of 2 person-days takes one person two days, or two people one day.

Try this: (1) 5 people, 2 weeks, tasks of 2 person-days. That is 50 person-days, and 25 tasks fit. (2) Same team, tasks of 5 person-days. Only 10 tasks fit. Bigger tasks mean fewer finished pieces. (3) 3 people, 1 week, tasks of 1 person-day. That is 15 person-days, and 15 tasks fit.

Check yourself

Three questions. No score is saved anywhere — this is just you against the material.

Basic to master

I take the same way of working four times here. First I run a sprint. Then I run a board. Then I fix a stuck team. Last I run many teams together.

Basic — Work in short sprints

Definition: Agile means building software in small pieces, showing the work often, and changing the plan when the work teaches you something. A sprint is one or two weeks of work with a clear goal. The team shows what it built at the end.

Types:

  • Scrum: sprints, a daily stand-up, a demo, and a look back.
  • Kanban: work flows across a board, one piece at a time, with a limit on work in progress.
  • A mix: many teams use sprints for planning and a board for the daily work.

Uses: I use this when a team builds anything together. Small pieces, shown often, beat big pieces shown late.

Dimensions: One team, a few people, a few weeks. What breaks first is too much work started at once, and I notice it when nothing finishes. It costs discipline to finish one thing before starting the next. The trade is simple: small and finished beats big and half done.

Scrum has three roles, five events, and three artifacts. I name them here because the names show up in every job description. The Product Owner owns the order of the backlog. That person says what matters most and what the goal is. The Scrum Master keeps the events honest and clears what blocks the team. The Developers build the work. There is no boss in the room. The team decides how the work gets done.

The five events are the rhythm of a sprint. Sprint Planning opens it: the team picks the goal and the items. The Daily Scrum is the stand-up I already run. The Sprint Review is the demo. The Sprint Retrospective is the look back. The Sprint itself is the fifth event. It holds the other four. A sprint with no review and no look back is not Scrum. It is just two weeks of work.

The three artifacts are the things the team can point at. The Product Backlog is the ordered list. The Sprint Backlog is the items picked for this sprint plus the sprint goal. The Increment is the finished work, tested and ready to ship. If an item is not in the Increment, it is not done. I check the Increment, not the board, to see what really shipped.

Intermediate — The board and the stand-up

Definition: At this level I run the board and the stand-up. The board shows where every piece of work stands. The stand-up shows where the work is stuck. The limit on work in progress keeps the team finishing instead of starting.

Types:

  • The board: columns that show to do, doing, checking, done.
  • The stand-up: three questions, fifteen minutes, every day.
  • The limit: a number that says how much work can be in progress at once.

Uses: I use this to see the work without asking. I look at the board and I know what is stuck, what is moving, and what is done.

Dimensions: One team, a board, a few weeks of work. What breaks is a board nobody looks at, and I notice it when the stand-up becomes the only place the work is discussed. It costs minutes a day to keep the board true. The trade is that a true board costs attention, and it buys a team that never has to ask where the work stands.

A limit can sit on one column, not just the whole board. I put the limit on doing. A doing column with a limit of three stops at three even when the rest of the board has room. That is the point. The limit forces the team to finish before it starts. A limit on the whole board is weaker. It lets one column fill up while the others sit empty.

Flow metrics tell me if the board is healthy. I watch three numbers. Lead time is the days from when the work is asked for to when it ships. Cycle time is the days from when work starts to when it finishes. Throughput is how many items finish in a week. Lead time is longer than cycle time when work waits in the backlog. A short cycle time with a long lead time means the team is fast and the queue is full.

$ cat flow.txt
fix-login-bug 2 4
write-docs 2 3
add-tests 3 6
$ awk '{print $1, "took", $3-$2, "days"}' flow.txt
fix-login-bug took 2 days
write-docs took 1 days
add-tests took 3 days
$ awk '{s+=$3-$2; n++} END {print "average cycle time:", s/n, "days"}' flow.txt
average cycle time: 2 days

Try it: make the flow.txt file above. Each line is one item, the day work started, and the day it finished. Run the two awk commands. The first prints each item and its cycle time. The second prints the average. Then check the three numbers against each other with Little's Law. Count the items in progress. Count how many you finish in a day. Multiply the daily finish rate by the average cycle time. The answer should be close to the count in progress. When it is far off, work is waiting somewhere I cannot see.

Advanced — Fixing a stuck team

Definition: At this level I fix teams that have stopped shipping. The signs are the same: too much work in progress, items too big to finish, a stand-up where nobody names a blocker, a retrospective that changes nothing. The fix is the same too: smaller items, a lower limit, one change at a time.

Types:

  • Too much in progress: lower the limit until things finish.
  • Items too big: split them until each one fits in the sprint.
  • Silent stand-ups: ask what is blocking, and mean it.
  • Retrospectives that change nothing: pick one change and do it.

Uses: I use this when a team tells me it is busy and ships nothing. I look at the board, count what is finished, and start there.

Dimensions: One team, stuck for weeks. What breaks is the habit of starting instead of finishing, and I notice it when the board is full and the done column is empty. It costs honesty to admit the team is stuck. The trade is that honesty costs comfort, and it buys a team that ships again.

A WIP limit is a rule you can count. A board with no limit fills up with started work and nothing finishes. I set a limit on work in progress and I count it. When the count hits the limit, nobody starts anything new. They finish something first.

$ printf 'fix-login-bug doing\nwrite-docs done\nadd-tests doing\ndeploy-check doing\n' > board.txt
$ grep -c " doing" board.txt
3

Every flag in the commands above, letter by letter.

  • printf takes no flags here. The first word in quotes is the format. \n is a newline. The > writes the output to a file instead of the screen.
  • grep -c: -c counts matching lines and prints only the number. Without -c, grep prints the matching lines themselves. I use -c when I want a count for a report, and plain grep when I want to read the lines.
  • Two more flags worth knowing: grep -i ignores case, so DOING matches doing. grep -n prints the line number in front of each match, so I can open the file at the right line.

Check it: run grep -c " doing" board.txt, then grep " doing" board.txt. The first prints 3. The second prints the three lines. Then run grep -i "DOING" board.txt and grep -n " doing" board.txt.

Try it: create the board above and run the count. Three items are in progress. If your limit is two, the board is over the limit, and the next move is to finish one item, not to start a fourth. Run grep " doing" board.txt to see which three they are.

The ticket that never moves is a signal. A ticket that sits in the same column for a week is not slow work. It is blocked work, or work nobody understands. I find stale tickets by looking at the board every day and asking one question about each one that did not move.

$ grep " doing" board.txt
fix-login-bug doing
add-tests doing
deploy-check doing

Try it: run the grep above. Three items are doing. Pick one and ask what is blocking it. If the answer is nothing, the work is just not started, and the board is lying about it. Move it back to todo or finish it today.

Master — Many teams, one product

Definition: At this level many teams build one product together. Each team runs its own sprints, and the teams meet to line up their work. The hard part is not the code. It is the dependencies: my team cannot finish until your team ships the piece I need.

Types:

  • Shared planning: teams line up their sprints so the pieces arrive together.
  • Shared boards: one board that shows the work across teams.
  • Shared demos: the whole product shown together, not team by team.

Uses: I use this when a product outgrows one team. I stop asking how my team is doing and start asking how the product is doing.

Dimensions: Many teams, many sprints, one product. What breaks is a dependency nobody named, and I notice it when a team finishes its work and cannot ship because another team is not ready. It costs real coordination to line up many teams. The trade is that coordination costs meetings, and it buys a product that ships as one thing instead of many pieces.

A sprint that looks full and is not. A board full of done tickets can still be a failed sprint if the done work was the easy work. I count done against the goal, not against the total. The goal is what the sprint promised. Everything else is filler.

$ grep -c " done" board.txt
1
$ grep -c " doing" board.txt
3

Try it: run both counts. One done, three doing. The board is heavy at the start and light at the end. A healthy board near the end of a sprint is the other way round. If your counts look like this on the last day, the plan was too big.

A change in the middle is a replan, not a failure. New information arrives mid-sprint and the plan has to change. I change the board in the open, move the ticket, and say what left the sprint to make room. Silent changes are how a sprint quietly fails.

$ sed -i 's/add-tests doing/add-tests done/' board.txt
$ cat board.txt
fix-login-bug doing
write-docs done
add-tests done
deploy-check doing

Every flag in the commands above, letter by letter.

  • sed -i: -i means edit the file in place. Without -i, sed prints the changed text and leaves the file alone. That is the safe way to test a change before I commit to it.
  • cat takes no flags here. It prints the whole file, top to bottom.
  • One more flag worth knowing: sed -i.bak writes a backup copy with .bak on the end before it changes the file. If the edit is wrong, the original is still there.

Check it: run sed 's/add-tests doing/add-tests done/' board.txt first, without -i. The file does not change. Then run it with -i.bak and list the files. board.txt.bak is the original.

Try it: move one item from doing to done in the file with any editor, then run grep -c " done" board.txt again. The count goes from 1 to 2. The board is the truth only if someone updates it when the work moves.

Go deeper

Agile is not the meetings. The meetings are the scaffolding. Agile is the loop: build a small piece, show it, learn, change the plan. A team that holds all the meetings and never shows the work is not agile. It is a team with meetings.

Done has to mean the same thing to everyone. Done means tested and ready to show. If done means written to one person and shipped to another, the team will argue about whether work is finished, and the argument will never end. Write the definition of done down.

The retrospective is the most valuable meeting in agile and the easiest to waste. One change, next sprint. That is the rule. A retrospective that lists ten problems and changes none of them is a complaint session.

At 10x the size, agile does not change. The teams multiply. Each team still runs short sprints, shows its work, and changes one thing. The new problem is lining the teams up, not the method.

At 100x, the method is the same and the coordination is the job. The teams still build small pieces and show them often. The product still ships in small pieces. The scale changes the meetings, not the loop.

Try it: count your own board. Make the four-line board file above. Count the doing items. The answer is 3. Now move one item to done and count again. The doing count drops to 2 and the done count rises to 2. Two numbers tell you more about a sprint than a whole meeting.

$ printf 'fix-login-bug doing\nwrite-docs done\nadd-tests doing\ndeploy-check doing\n' > board.txt
$ grep -c " doing" board.txt
3
$ grep -c " done" board.txt
1

One time it broke

What broke

A team ran sprints for months and shipped nothing. The board was full. Every stand-up, everyone said they were fine. The retrospective named the same problem every time: too much work in progress. Nobody changed anything.

Timeline

  • Week 1,the sprint started with twelve items. The team picked too much.
  • Week 2,nothing was finished. Ten items were started, none were done.
  • Week 3,the retrospective named the problem: too much work in progress. No change was picked.
  • Week 4,the same sprint, the same twelve items, the same result.
  • Week 5,the team picked one change: a limit of three items in progress at once.
  • Week 6,three items finished and shipped. The team learned what finishing felt like.

What changed after

Two things. First, a limit on work in progress, written on the board, and kept. Second, a retrospective that ends with one change and a name next to it. A problem named without a change is a problem that comes back next sprint.

If you remember nothing else

Design exercise

You join a team of 5 people. The backlog has 40 items. The team works in 2-week sprints. Each item takes about 2 person-days. Plan the first sprint: how many items fit, what the goal is, and what you will do when the team wants to start a sixth item while five are unfinished.

Clarifying questions to ask

  • How many person-days does the sprint hold, and how many items does that fit?
  • What is the sprint goal, in one sentence?
  • What is the limit on work in progress, and why that number?
  • What happens when a blocker appears in the stand-up?
  • What one change would you pick in the first retrospective?

Rough sizing

Start with the numbers. 5 people times 10 work days is 50 person-days. Items of 2 person-days mean 25 items could fit, but that is too many to finish well, so pick fewer: 8 to 10 items, with room for surprises. The goal is one sentence. The limit on work in progress is 5, one per person, so nobody starts a second item while the first is unfinished.

Trade-offs to name

Picking fewer items feels slow and finishes more. Picking more items feels fast and finishes less. A limit on work in progress feels like a constraint and buys finished work. The trade is that finishing fewer things well beats starting many things badly.

Next in this series
Lesson F07 — The Kernel: The Program That Runs the Machine