The engineering economics of the last 10%
A button takes five minutes to build and five days to engineer. On the nonlinear cost of quality, and where the last 10% of the work really lives.
I’ve always found it quite amusing that you can build a button in five minutes and spend the next five days engineering that same button.
It’s a button for God’s sake.
You click it, something happens. That’s the fundamental contract between the human and the machine. Surely there isn’t much left to engineer?
Well, what happens when I click it twice? What happens when I click it and immediately lose internet connectivity? What happens when the underlying request succeeds but the response never reaches my browser? What happens when I navigate to it using my keyboard? What happens when I click it midway through its exit animation?
And suddenly, a five-minute implementation has become a rather interesting engineering problem.
I’ve spent a considerable part of my career obsessing over this particular phenomenon. It’s what I like to call the engineering economics of the last 10%.
The nonlinear nature of quality
There’s an interesting assumption we make when estimating software. We tend to associate the percentage of completion with the percentage of effort.
If a feature is 90% complete, surely we only have another 10% of the work left?
Not necessarily.
The first 90% of a feature is often about establishing its existence. The remaining 10% is about establishing the conditions under which that feature continues to exist correctly.
There’s a considerable difference.
Take something as seemingly ordinary as a favourite button. An incredibly naive implementation could look something like this:
const [liked, setLiked] = useState(false);
async function toggleLike() {
await api.toggleLike(id);
setLiked(!liked);
}
And congratulations, we’ve built a feature.
Except the interaction is now dependent on the latency of a network request. The user clicks a button and potentially spends 800 milliseconds wondering if they actually clicked it.
So we introduce optimism.
async function toggleLike() {
const previous = liked;
setLiked(!previous);
try {
await api.setLike(id, !previous);
} catch {
setLiked(previous);
}
}
Immediately, the experience feels significantly better. We’ve decoupled the perceived responsiveness of the application from the responsiveness of the server.
But we’ve also introduced an entirely different class of problems.
What happens when the user toggles the button three times before the first request resolves? What happens when those requests resolve out of order? What if the first request fails and its rollback overrides the most recent successful interaction?
The interface looked identical in Figma throughout this entire conversation.
The engineering complexity, however, has changed dramatically.
One possible solution is to separate the user’s desired state from the server’s acknowledged state, serialising writes and reconciling them as requests complete.
let confirmed = false;
let desired = false;
let syncing = false;
let revision = 0;
function toggle() {
desired = !desired;
revision++;
render(desired);
void reconcile();
}
async function reconcile() {
if (syncing) return;
syncing = true;
try {
while (confirmed !== desired) {
const target = desired;
const requestRevision = revision;
try {
await api.setLike(id, target);
confirmed = target;
} catch {
if (revision === requestRevision) {
desired = confirmed;
render(confirmed);
notifyFailure();
break;
}
}
}
} finally {
syncing = false;
}
}
This is still a simplified implementation. It assumes a single client, a known initial server state and a failed request that hasn’t committed remotely. Ambiguous network failures would require additional reconciliation, while multiple clients might require server-side versioning.
But notice what we’ve done.
We’ve gone from thinking about a button to thinking about consistency, concurrency, failure recovery and the relationship between human intent and distributed state.
All because we wanted a button to feel right.
The economics of invisible engineering
One of the more unfortunate things about engineering exceptional experiences is that the better you become at it, the less obvious your work becomes.
Nobody opens an application and goes:
“Oh my God, that handled its beautifully.”
Nobody applauds the fact that a dialog returned focus to the correct element after being dismissed. Nobody writes a congratulatory email because an animation remained interruptible when they changed their mind halfway through.
They just use the damn thing.
And I find that fascinating because the absence of a problem is, in itself, a product of engineering effort. Yet it’s considerably more difficult to quantify the value of something that never happened.
Imagine two engineers implementing a modal.
Engineer A builds a component that appears when triggered and disappears when dismissed.
Engineer B builds the same component but also considers:
- Focus containment and restoration.
- Escape-key handling.
- Screen-reader announcements.
- Scroll locking without layout shifts.
- Nested overlays.
- Reduced-motion preferences.
- Content that exceeds the viewport.
- Dismissal during asynchronous operations.
- Interaction with the browser’s navigation history.
Both engineers have completed the ticket.
But they haven’t built the same thing.
Field Notes · Issue 14
A week of walking the coast between Lagos and Lekki, one notebook at a time.
Terms of service
These terms cover your use of Field Notes and the issues we send you.
You can cancel at any time from your account. We keep your notes for thirty days after, then delete them.
We never sell your email address. We send one issue a week and nothing else.
If these terms change, we tell you a month before they apply.
Field Notes · Issue 14
A week of walking the coast between Lagos and Lekki, one notebook at a time.
Terms of service
These terms cover your use of Field Notes and the issues we send you.
You can cancel at any time from your account. We keep your notes for thirty days after, then delete them.
We never sell your email address. We send one issue a week and nothing else.
If these terms change, we tell you a month before they apply.
One has engineered the existence of a modal. The other has engineered the experience of interacting with one.
The uncomfortable question is whether our conventional measures of engineering productivity can distinguish between the two.
Performance is also a psychological problem
During my time at Audiomack, I worked on performance improvements that brought First Contentful Paint from approximately four seconds to half a second, alongside significant reductions in memory consumption.
Those are improvements we can measure. I like measurable improvements. They give us a baseline against which we can evaluate our decisions.
But there’s another dimension of performance that I find equally interesting: perceived performance.
Consider two applications that both take two seconds to complete an operation.
Application A gives me absolutely no indication that anything is happening for the first 1.8 seconds.
Application B acknowledges my interaction immediately, communicates progress where appropriate, and completes the operation within the same two seconds.
They have identical operation latency.
They do not have identical experiences.
Humans don’t experience time as a collection of engineering metrics. We experience it in relation to uncertainty, expectation and control.
A delayed response without acknowledgement creates uncertainty. An acknowledged response gives me confidence that the machine understood my intent.
This is why I think performance engineering at the interface level deserves a much broader definition.
First Contentful Paint tells me when content first appeared. Interaction to Next Paint tells me something about responsiveness. Neither, independently, tells me whether the application communicated the right thing at the right moment.
A product can perform exceptionally well in a benchmarking tool and still feel somewhat miserable to use.
The metric is evidence. It isn’t the experience.
The architecture of feeling right
One of my favourite examples of this is animation.
Imagine an expandable panel that takes 300 milliseconds to open.
What happens if I change my mind 100 milliseconds into the animation?
A simplistic implementation might finish opening before closing. Another might cancel the animation and abruptly jump to its initial position.
Both technically honour my request.
Neither necessarily feels natural.
A more considered implementation might reverse the existing animation from its current progress, or use an animation model that preserves continuity of position and, where appropriate, velocity.
Now we’re thinking about interpolation, interruption, scheduling and state transitions.
We’re no longer merely asking whether the panel should animate. We’re asking whether the architecture of the animation accommodates a human being who is perfectly entitled to change their mind.
This is something I think about quite often.
Humans interrupt things. Software prefers that they don’t.
Humans click twice, change their minds, abandon forms, navigate backwards, lose connectivity, misunderstand instructions and occasionally do the exact opposite of what we anticipated.
Great interface engineering accommodates that unpredictability instead of treating it as an inconvenience.
When is enough actually enough?
Now, there’s a rather obvious argument against everything I’ve said so far.
Ade, if you spent five days building every button, you’d never ship anything.
And you’d be right.
I say this as someone who has built considerably more software than he’s released. I’m not particularly qualified to pretend that obsession is always productive.
There is absolutely a point of diminishing returns.
Spending two days choosing between two nearly indistinguishable shades of orange probably isn’t going to rescue a product nobody wants.
The objective isn’t to invest an equal amount of care into absolutely everything. It’s to exercise judgement over where that care creates the most value.
An interaction that a user performs hundreds of times a day deserves different consideration from one they encounter once during account setup.
An irreversible financial transaction deserves more engineering around correctness than changing a decorative preference.
An editor used by creative professionals demands a different level of interaction fidelity from a static marketing page.
And accessibility isn’t something we get to categorise as optional polish simply because fewer people are affected by a particular failure.
The last 10% is a metaphor for the consideration that separates adequate implementation from excellent execution. It isn’t a literal percentage or a recommendation to spend indefinitely.
Excellence without judgement eventually becomes indulgence.
Engineering for the last 10%
I increasingly think the solution is to stop treating quality as something we apply towards the end of a project.
If accessibility is important, component architecture should accommodate it from the beginning.
If an interaction requires optimism, the state model and API contract should account for reconciliation.
If a product depends on highly responsive manipulation, we should think about rendering boundaries and scheduling before we accumulate hundreds of components.
If we know users will change their minds, reversibility should be considered before we commit to destructive operations.
These aren’t finishing touches.
They’re engineering decisions.
And the sooner we recognise them as such, the less expensive excellence becomes.
This is also the reason I struggle with the conventional separation of design and engineering. So many of the qualities we admire in exceptional software are consequences of technical decisions made long before anybody starts polishing the interface.
You can’t necessarily animate your way out of an unsuitable state architecture. You can’t simply redesign your way out of an API that makes a critical interaction unnecessarily slow.
Sometimes the quality of the experience was decided six months before the experience even existed.
Good is the baseline
Software is becoming increasingly easy to produce. The cost of getting an idea onto a screen is considerably lower than it was when I first discovered HTML and started obsessing over other people’s website templates.
And yet, I don’t think exceptional software has become proportionately easier to build.
Because the difficult part was never exclusively the act of writing code.
It was understanding what the code ought to accomplish, how a human might interact with it, what might go wrong, and how much consideration the experience deserves.
If anything, the abundance of software makes that consideration more valuable.
Everybody can build a button.
The interesting question is how many people are willing to understand everything that happens after somebody clicks it.
That’s the last 10%.
And quite often, that’s where the real engineering begins.
— Adenekan
