Software folks always seem to be on the lookout for analogies to explain software development to interested lay colleagues, friends, family and the like. Here’s one I haven’t come across before (with photos!).
Software development is like… mowing your lawn. Let me explain…
Firstly, there’s getting started. We need some developers (“the team”, analog: the lawn-mower, in this case a venerable Murray 125/96 ride-on tractor mower). The task is to cut all the grass on the lawn.
What the customer wants is a nice, neat, stripey lawn:
The team is going to deliver on this requirement by converting, inch by inch (a.k.a. continuous delivery), un-mown lawn into mown lawn. Let’s take a look at what’s involved.
The team has three basic controls; height of cut, speed over the ground, and direction.
Height of cut. This governs the height of the rotating blades carried under the mower, which in turn controls the amount (length) of each stalk of grass removed as the mower passes.
Speed over the ground. This is the rate at which new work (uncut grass) enters the team.
Direction. This allows us to select which work (area of grass) to work on next. Our choice is somewhat limited owing to the customer wanting nice, straight stripes. Sometimes (e.g. at the end of a stripe) we have to raise the blades and NOT cut some grass (i.e. run the team without doing any real “work”) in order to best position the team (mower) for the next stripe.
Grass in Progress
The amount of grass cut, but not yet ejected from the mower, is the “grass-in-progress”. The mower pictured is not very tolerant of high levels of grass-in-progress. Its motor is relatively small, and setting the height of cut too low (cutting too much of each grass stem in one pass) or the speed over the ground too high (increasing the rate of entry of new grass into the mower) will increase the level of grass-in-progress to the point where the motor will stall out. Listening to the motor’s note, it will complain by sounding increasingly laboured just before reaching the point of stall. Anyone who has driven a vehicle with a petrol engine will recognise this situation instinctively.
Further, damp or wet grass, and long grass, increases the friction of the grass-in-progress.
So, to mow happily at top speed, we need, primarily, to limit the grass-in-progress at an optimum level, through judicious and continual adjustment of the speed over the ground and the height of cut (and taking into account the condition of the grass, too).
One serious constraint on throughput (how quickly we can mow the lawn) is the little bastard seen in the next picture. This is the grass exit nozzle. Cunningly (mis) designed so as to clog up with cuttings anytime we try to have too much grass-in-progress. But it has one redeeming feature, too. If we notice that cuttings have stopped exiting the nozzle, the operator can reach down and lift up the plastic chute, allowing a clod of cuttings to vomit directly out of the blade housing, a bit like a hairball.
Of course, life, and this team (mower), is not perfect. In particular, corner-cases and edge-cases are problematic. The limited manoeuvrability (skill set) of the team, and the awkward shape of some parts of the lawn and its boundaries, means that some areas of the lawn don’t get cut (some corners of the requirements are left undelivered). A conscientious operator (product owner) might choose to use another, more specialised team (like a strimmer) to finish up these little pieces more neatly.
And the operator is at risk of injury too, not from the team – which has numerous safety features – but from things in the wider environment, not directly part of the work (lawn), but close enough nearby to intrude. Here we see some pretty berries, but what we cannot see are the vicious thorns on the branches carrying the fruits.
Such risks suggest some combination of:
- a risk-mitigating tour around the lawn prior to starting to mow, with a pair of secateurs to remove the risks
- a not-fully-mown lawn (avoidance of the danger areas, requirements partially unmet), or
- some inevitable damage to the operator
Fuelling the Team
No team runs on air, rather it needs fuel in order to run, and do the work. Here’s the fuel container (jerry-can) for this team. This team runs on petrol, but a software team runs on knowledge – both knowledge it already has in its tank, and new knowledge added to the tank (through e.g. learning, recruitment, etc.), as the work requires. (and no, not on wages, nor even beer & pizzas).
Here’s the fuel funnel for this team. In software development, it would carry learning into the team, rather than two star. I almost named this the “HR and training department/funnel”.
Rework, Refactoring and Technical Debt
The thing that started me off on this analogy was the topic of refactoring. As the mower (team) works along one stripe of the lawn, it deposits a thin layer of cuttings on the adjacent stripe (no cuttings catchment here) – sometimes an already-cut stripe, sometimes a yet-to-cut stripe. When deposited thinly, they present no real problem if cutting them again on the pass down the next stripe. But ingesting the hairballs I mentioned above, suddenly and unpredictably increase the grass-in-progress for the team (technical debt). This generally requires operator intervention (lifting the nozzle), and sometimes can stall out the machine. An alternative intervention is to anticipate the problem, and reduce the grass-in-progress (by raising the cutting height and/or slowing the team) in advance of the hairball – i.e. refactoring.
As for rework, this simply means cutting the same area of grass more than once. Necessary either when we’ve ‘missed a bit’ (failed to meet quality standards) or when we’re repositioning the team and can’t be bothered to raise the blades. (Analogy: Type II and type I muda, respectively).
Team Maintenance, Breakdowns and Reliability
This poor mower rarely sees any maintenance. Hence it’s always a gamble whether it’ll start when it’s needed. And the jockey wheel/tensioner for the drive belt powering the gearbox and wheels has definitely seen better days. Often, at the end of a day’s cutting, the belt will jump the idler, requiring some faffing around to set it up again next time the mower is used.
For the literal-minded, here’s the analogous terms, laid out for you:
- Mower: Software Development Team
- Operator: Product Owner
- Lawn: Work
- Thorns: Risks
- Petrol: Know-how
- Stripes: User stories
- Grass in/under the mower: Work in progress
- Jerry-can: Sources of new know-how
- Strimmer: alternate “finishing” team or specialist(s)
- Cut grass: Code (and other artefacts)
- Mossy patches: Hmm, what would you say?