Agility in cupcake engineering

Many stories have been written as examples of how to apply agile values in practice. One of my favourites is "The Phoenix Project", which applies agile values alongside DevOps philosophy to achieve transformation in a fictional company. But it's very hard to appreciate if you don't have experience of working in an IT team, and all sorts of companies can benefit from increased agility.

So please indulge me in reading this much shorter story that gets across (more bluntly, but more quickly) how a company could deliver more effectively by becoming more agile.

So: Imagine you run a cake shop.

The tastiest role-play

A typical cake shop shows off their previous work (a portfolio of sorts), takes orders from clients (specifications), bakes and decorates the cake, and then delivers it. This is fine - people order cakes for celebrations, so as long as it looks sort-of like the specifications and it matches the quality of the portfolio nobody's really going to mind. Everyone knows what a cake is, too, so it's unlikely that upon delivery the client realises they actually just needed an onion. A slightly "wrong" cake isn't likely to ruin a celebration, or have unexpected ongoing effects. Most cakes aren't load-bearing or structural.

Now imagine I come to your cake shop. I say that I have 12,000 people, and I will need to feed each of them 15-24 slices of cake every week for 12 weeks. This will be over a one year period.

I have an idea what flavours these 12,000 people like, but that's based on a survey - and really, they don't know what they like. They've never eaten a cake before. You have about half of them asking for coffee cake, a classic flavour. But you also have about half of them asking for lettuce flavour.

This is a big order. It really could turn your cake shop into a cake empire. You could branch out into flan. So you really want to accept this order. And you've done the maths - on cakes that split 12 ways that's 975 cakes a day. A cake takes an hour to bake, so if we run the ovens for 8 hours a day we need to bake ~122 cakes an hour.

You gotta spend money to make money

You have some savings, so you go out and buy the biggest oven you can find. And of course you need to deliver these cakes, so you contract out a company to deliver them. Bigger deliveries are cheaper, so (with a plan to use stabilisers to keep a one-week shelf life on your cakes) you opt for a one-year contract to deliver 5000 cakes once a week. Oh, and you'll need staff - so you put out the word, hire a team of people and train them on the new equipment.

Week one is hard. Your contract settled on two flavours - coffee and lettuce - and although the coffee is easy, making lettuce work in a cake is next to impossible. Staff are literally being battered (by flying cake batter) and burned out (by the massive and dangerous oven).

But you persevere, and by the end of the week you have 5000 cakes ready to deliver to your new client. Your first delivery! The truck arrives and you load in your cakes to be delivered on Monday. Tired, beaten (by the task, but also at times by accidental collision with the goliath egg beating machine you commissioned) but buoyed by the apparent success, you and your team turn in for the weekend.

Lettuce bad

Monday morning you arrive early, switch on all the machinery, and sit down at your desk - which is just a pile. Bills, queries, unpaid invoices - something you knew you'd get to once the unsustainable workload of last week passed, but now dawns on you will be just as much as the unsustainable workload you face this week. At that point, an email pings in.

It's from your client.

They loved the coffee cake. "Sublime", "Melty", "Caffeinated" are just a few of the words listed out. But before you get too excited, that's where the good news ends.

Some of the client's.. eaters? You start to wonder why a company is stuffing their people with so much cake over such a weird period - but only for a second. Some of them got Friday's cake, and they loved it - but some of them got Monday's cake, which was already out of date. It wasn't "melty", it was mealy.

And, of course, the lettuce cake was disgusting. You tried. You really tried. But the inevitable comments - "gross", "slimy", "like lettuce in a cake" - all rolled in. One of the eaters commented "I wanted cake that made me feel as happy as when I eat lettuce - but this just tastes like sadness". That one really got to you.

You promptly called your client.

"Yes! The delivery was intact. Certainly some teething problems, so we'll be holding back part of the payment until it's solved - but I'm sure it's nothing you can't solve", comes the voice down the phone.

Your heart sinks.

"I.. I don't think lettuce cake can be good. Anyway, it doesn't seem like your.. eaters? What kind of business are you running there anyway?"

"A normal business"

"Okay. Anyway, your people don't want lettuce cake. They thought they wanted lettuce cake, but it turns out they just want something light. Like lettuce. But not lettuce.". You are basically pleading down the phone at this point.

"Good insight! We can consider it as part of the next contract. For now, let's get these lettuce cakes up to the standards our people need." He hangs up.

Marching towards the sound of frosting

You spend the next few weeks trying to improve the lettuce recipe, but it's no use. Lettuce is a terrible ingredient for a cake, and you know your client's people don't want a lettuce cake anyway. There's no way to win. Outside of this, the inevitably stale cakes keep going down badly. You thought use-by dates, and documentation on how to use them, would be enough. But people don't want to read documentation, they just expect a cake to work how they want it to work.

And then it happens.

You told your new staff to wear their hair nets, and they've really tried to comply. But tired and demoralised people don't perform to the best of their abilities, and your workforce is constantly being knocked back by the inevitable failures, and the poor feedback you have no choice but to share with them.

One of them - Sarah, with long, flowing, blonde locks - gets their hair caught in the oven door. It tears most of it out, which then catches fire - and that was the straw that broke everyone. Most of your workforce walk out that day, never to be seen again. The oven is broken, and you can't afford to fix it. Sarah - rightfully - sues your shop for damages. You just settle. But you're broke - and broken.

Dust [the flour] off and start again

You tell your remaining staff to take their paid holiday, and hint to them that they should start looking for new jobs - you might be able to meet this month's payroll, but next month you'll probably have to declare bankruptcy. You consider what frugal options there are for a vacation yourself - a moment of bliss before the inevitable.

That's when you see it.

In the window of a local newsagents.

On the front of a cake magazine.

A cupcake.

A cupcake.

You might have snapped

You rush back into the shop, with a bag full of tools from the local DIY store.

You walk up to your old oven - the one you've been using for years, the one that's brought you so much joy - and, screaming, you rip it out of the cabinet. Your mind flits between plumbing, grinding, and whiteboards - almost like a montage - before slowly fading out, like a baker possessed.

Fade in

When you come to, you're in a truck. You don't know where you got it from. But you are driving it. On the sat nav, a route to your client's building. Your two remaining staff, sitting in the cab with you. They look scared.

Rolling into the car park, you jump out and open the trailer. Inside, your oven, hooked up to a large gas canister. You lower it into the parking area and, opening the bottle, you crank the thing into life.

"You! Start mixing the coffee cake batter", you shout at one of your staff.

You probably shouldn't shout at your staff - but you feel a dramatic crescendo welling inside you. You'll apologise later.

"And you!", you bark. "Get back in the truck, go to the store, and get me every flavour you can find".

"Every flavour?" she exclaims. "What does that mean?".

"If it tastes of something, buy it".

She honestly looks relieved to get further away from you, so she asks no further questions. Your other staff - he deserves a name.. Bob has a bowl of cake batter ready. You scoop a single dollop and place it into a small cupcake mould, which you then place into the oven. It bakes much faster than the bigger cakes, ready in only a few minutes. With a mad grin, you get down to the cupcake's level - and swallow it whole.

It tastes of hot. But the coffee flavour isn't coming through, and it's underbaked. You demand Bob adds more coffee flavouring and you fiddle with the temperature. You run it again. A little underbaked still - ugh.

You need more data, so - climbing back into the truck, and finding a drill - you make a hole in the oven and you stuff a meat thermometer into the side. This will do for now - and you can see that the oven is running a little colder than it thinks it is. You turn it up again.

People start coming out of the client's building, noticing the commotion, and you respond by giving out cakes. As they eat they tell you what's wrong and - through a combination of dial-twiddling and batter adulterating - you quickly perfect the coffee cake recipe.

But as your other staff member.. Sally. As Sally pulls back into the car park, you know you've only just started.

Frankenstein was the monster after all

Sally has brought a cornucopia of flavours - from vanilla to cat food, from lemons to lettuce. You take the lettuce, lob it across the yard, and then turn to Sally.

"Okay, I know this is weird, but - Sally, I need you to make a base mixture. And then we're going to add every one of these flavours to that mixture, and bake it. Got it?". She nodded. She's.. still scared.

You turn to the crowd. "Which of you said my cakes taste of sadness?", you bellow. You see someone twitch in the corner of your eye. A young woman. Terrible poker face. "You - come here". The first, monstrous cupcake came off the line. "Eat it", you insist. She hastily obliges.

"Now, what does it taste like".

This oven needs more wheels

"Ugh, this isn't like lettuce", she exclaims, retching slightly.

"What do you mean?!", you plead. "Of course it doesn't, you don't even like lettuce in a cake. Nobody does!"

She looks at you like you're stupid. "No, I don't want lettuce. I want it to taste like lettuce. You know.. a light snack". You tense up a bit. Why couldn't she just say she wanted something light? No matter.

"Sally, we want a lighter batter. Reduce the number of eggs, beat it less". You rack your brains at what a "light" flavour could be. "Just run this one without any flavours", you sigh, popping open the oven - and catching your finger. Ow! You need a better way to keep loading in these cakes - some sort of continuous process.

Then you see an old conveyor belt in the corner of the client's yard, and it comes to you.

You rush back to the truck and, pulling out an angle grinder, you hack away at the side of the oven. After exposing the insides you slide the conveyor belt in, hook it up to the truck's battery, and fire it up. Now by placing a cupcake on the conveyor belt, and changing the voltage going coming from the battery, you can precisely and continuously run your bakes!

The plain cupcake goes in, the plain cupcake goes out. The plain cupcake goes into the girl's mouth. "Too plain!" She says, maddeningly. "But.. it's better, it's lighter". You fumble around the ingredients and load up more cupcakes on the conveyor..

Cupcake Engineering

In that afternoon you perfect the lettuce recipe; it turns out that it contains zero lettuce and mostly lemon. But it's light and fluffy, evoking the sort of "healthy" feeling a salad might. You call it the "Lettuce spread joy" cake, to meet your contractual requirements, and return to your cake shop.

By pivoting from cakes to cupcakes, and by using your old, small oven, you aren't near getting to the target of 122 cakes an hour. But you have the recipe down, so you can scale up operations knowing that you have a solid foundation to work from - and over the next few months you find that sticking to tight feedback loops and continuous processes allows you to quickly make enough cupcakes - more, even.

You also made a canny deal with the local supermarket, who does daily delivery all across the city. Their vans often go out half-full, so whenever they’re going near a client they’ll fill up with cupcakes and deliver those too! The small cupcake boxes mean they can fill their vans, and since it’s otherwise wasted space they are selling it to you much more cheaply than the old delivery service. And the cupcakes arrive so fresh!

Your staffing budget, while needing to stretch to hire new staff, also went on training your existing staff. Bob and Sarah weren't engineers, but with a 3D printer and the freedom to disassemble the old machinery they applied their baking skills to automating much of the tasks they were doing by hand (meaning you could pay them more - because they were creating more value). In fact, they could do the job better than trained engineers - who could build a motor from scratch, but knew nothing about how to beat an egg.

You christened the monstrosity you created "Amelia", and it became a staple of on-boarding new clients. You would set up a little cupcake manufactury in their car park, testing flavours, texture and variety - before signing a contract. People loved it, clients loved it. Your staff loved it.

So much more to learn

One day, on the way out, you catch Bob on the way back from a pilot day. He is holding a little.. manual? You ask what it is.

"We just got back from a school. The kids.. they kept eating the wrappers", he exasperates. "This is a small booklet I've written - 'How to eat a cupcake' - which explains thoroughly the process of eating one".

You smile, gingerly take the manual out of his hands, and drop it in a nearby bin. "It's a cupcake, Bob." You say, softly.

"But how am I meant to fix this then? They're just going to keep eating the damned things - they're not edible. They're.."

You wait, patiently - and when it comes, he lights up. "I have an idea", he exclaims, eyes darting around for a pen and some paper.

"Edible cupcake wrappers?", you ask.

"Edible cupcake wrappers", he says, and rushes back down the hall.

Your empire

Years later, you are sitting at the desk of your baked goods conglomerate. Someone is taking a picture of you in profile. You point mischievously at a picture of the first flan you ever shipped. You've shipped so much flan now.

The picture taker puts down his camera, pulls out a notebook, and asks: "So what made you so successful?"

You smile.

"You know, I almost wasn't. But I wasn't prepared to give up, and I wasn't prepared to run my team into the ground". You couldn't run your team into the ground - they quit - but that's ancient history now. "So I had to find another way"

"Oh!" says the picture taker. "This is when you started to automate everything, right? You're a real automation success story!"

"No - that's not the success. The success came when I stopped assuming I knew what my clients wanted - stopped assuming my clients knew what they wanted, even - and started to assume I had to change everything about my business to ensure we could pivot to constantly changing requirements. We shrunk our cakes to the smallest possible size, reduced our bake times from an hour to minutes. The automation came when we got the process right, and needed to.. hah."

You pause.

"The automation came when we got a process right, and we needed to BAKE it."

"More.. agility?", the picture taker enquires, ignoring your hilarious pun.

"Yes. Yes, I suppose so." You think for a second.

"Yeh, more agile. Good word, that".