Good Enough as an Engineering Idea¶
Chapter 1 of Good Enough Engineering
Some parts of your app can be rough. Some hold up everything else.
"Gate or wall?" — Sawyer the Beaver
A homeowner fixes a gate and plans to take out a wall¶
- The sagging gate gets a scrap-wood brace. Twenty minutes, one crooked screw, done.
- The wall between kitchen and dining room turns out to be load-bearing.
- Now there's a permit, a sized beam, temporary posts, and weeks of work.
- Same person, same day, two very different bars for care.
She set each bar with two questions¶
- What happens if I get this wrong?
- Can I fix it easily if I do?
A crooked brace costs a second trip to the garage. A wall taken out the wrong way can bring the ceiling down.
This book asks those two questions of the app you built with an AI agent.
Writing code got cheap, and judging it didn't¶
Software engineering is building software that keeps working, stays safe, and can still be changed after it ships.
| Task | Before AI agents | With AI agents |
|---|---|---|
| Writing a new screen or route | Days | Minutes |
| Deciding which parts must not fail | Hours of thought | Still hours of thought |
| Knowing a check quietly stopped running | Needs monitoring | Still needs monitoring |
| Deciding when the app is ready for users | Judgment | Still judgment |
The slow step moved¶
- Goldratt's theory of constraints: every system has one step that limits its output.
- A bakery with a fast mixer and a slow oven just makes a pile of dough.
- Writing code used to be the slow step. AI removed it.
- Now the slow step is judging whether the code is safe, correct and ready.
The running example is a dating-safety app¶
- A member uploads photos, voice clips and text about an online match.
- The app runs about eight checks in parallel against outside services.
- It returns a trust score from 0 to 100 and a page explaining each check.
- React and Vite, Express, Postgres through Drizzle, private photo storage, Stripe.
- The agent got a lot right. Gaps found later say nothing about the builder.
Must-be-right parts are the load-bearing walls¶
Must-be-right parts are where a mistake hurts a user, exposes private data, loses money, or can't be undone.
- Sign-in. No member can reach another member's scans.
- No false all-clear. A check that didn't run is "not checked," never passed. If all eight fail, the score is 50.
- Never reveal a location. No home address, workplace or location, even when a vendor has it.
Good-enough-for-now parts are the gates¶
Good-enough-for-now parts are where a mistake is cheap to notice and cheap to fix.
- The look of the results page: a plain circle instead of a gauge, a cramped layout on a small phone.
- Nobody is harmed, and each fix ships the same day.
- One catch: how the page looks is a gate, but whether it shows "not checked" truthfully is a wall.
Satisficing means you stop when a part meets its bar¶
- Herbert Simon, 1956: satisficing blends "satisfy" and "suffice."
- Search until an option meets your bar, then stop.
- Optimizing keeps searching for the best answer, which needs more time and information than anyone has.
- The aspiration level is the bar itself. It moves up when good options are easy to find.
Each part of the app gets its own bar¶
| Part | Bar | Done when |
|---|---|---|
| Sign-in and access to scans | No member ever reaches another's data | A test tries and gets nothing back |
| Scoring when checks fail | A check that didn't run is never passed | Every vendor down gives 50 and eight "not checked" labels |
| Look of the results page | Readable on a phone | Nothing overlaps on a phone |
If you can't check a bar, you won't know when you've cleared it.
Polishing one part costs the others time¶
- The cost of perfection is what you pay to raise a part above the bar it needs.
- Three days on the results page is three fewer days on the scoring rule.
- The page really does get better, so the cost is easy to miss.
- Good enough engineering sets a different bar for each part by what a mistake costs, and stops when each part meets it.
- Cutting corners lowers every bar. Good enough engineering lowers some so it can raise others.
Every choice about care is a trade-off¶
A trade-off is getting more of one thing by accepting less of another. Three come up again and again:
- Time against care. An hour on one part is an hour not on another.
- Cost against coverage. More outside checks catch more scams and raise the bill.
- Speed against certainty. Waiting for every check is complete. Returning early is fast.
Write both sides down, or the trade gets made without anyone choosing it.
The slow vendor: three ways to handle it¶
A people-search vendor usually answers in 2 seconds and sometimes takes 40 (illustrative timings).
| Option | What happens |
|---|---|
| Wait as long as it takes | Truthful, but some members leave |
| Stop at 10 seconds and score it passed | Fast, and it breaks the no-false-all-clear rule |
| Stop at 10 seconds and mark it "not checked" | Fast and truthful, with a visible gap |
The second option looks fine on screen. That's why it's the trap.
Practice: the trade-off card game¶
The chapter's card game gives six decisions from the dating-safety app.
- For each option, you mark "breaks a must-be-right rule" or "acceptable judgment call."
- The rule-breakers share a pattern: a check that didn't run counts as passed, a location gets revealed, or access is checked only in the browser.
- Everything else is a judgment call you can make either way and change later.
One-way doors and two-way doors¶
From Jeff Bezos's 2015 shareholder letter:
- A two-way door decision can be reversed cheaply. Rename a button, swap the AI model, change an email's wording.
- A one-way door decision is costly or impossible to reverse. Publish a secret key, delete a table with no backup, tell a member a match is safe.
- Make two-way doors fast. Give one-way doors slow thought and a second opinion.
Much of engineering makes one-way doors reversible¶
Reversibility is how cheaply and completely a decision can be undone.
| Decision | Door | What makes it more reversible |
|---|---|---|
| Deleting a database column | One-way | A tested backup taken first |
| Committing a live API key to a public repo | One-way | Nothing. You can only replace the key |
| Changing how the score is calculated | Both | A test suite that pins the score for known inputs |
Before a change, ask how you'd put it back tonight. No answer means one-way.
Risk is how likely, how bad, and how far¶
- Risk is the chance something goes wrong, weighed by how much harm it does.
- Likelihood is how probable a failure is in a given stretch of time.
- Impact is how much harm a failure does to a user, their data, your money, or trust.
- Blast radius is how many users and how much of the system one failure reaches.
- Rare failures with large impact are the easiest to skip, because they haven't happened yet.
The same outage can be low risk or high risk¶
| Failure | Likelihood | Impact | Overall |
|---|---|---|---|
| Score circle overlaps text on a small phone | High | Low | Low |
| Vendor down, failures shown as "not checked" | Medium | Low | Low to medium |
| Vendor down, failures read as "no matches" | Medium | High | High |
| Changing a number in a link opens another member's scan | Low | High | High |
Rows two and three differ only in how the code handles the failure. Fixing what users complain about first would fix row one and leave row four.
Heuristics are rules of thumb that can be wrong¶
- Billy Vaughn Koen: engineering runs on engineering heuristics.
- A heuristic helps you decide when you can't work out the answer for sure.
- "Fix the high-impact failure first" can be wrong when the likely failure costs users every day.
- "Build in small pieces" can be wrong when joining the pieces becomes the work.
- A skilled engineer notices when the situation has changed.
Commit late or freeze early¶
- Delay commitment: hold off while a wrong choice costs more than keeping options open. Try two vendors side by side before launch.
- Freeze the design: stop changing a part once changes teach less than they cost. Hold the scoring rule still after members understand what 50 means.
- Set-based design, from Toyota: keep several designs alive and drop them as tests rule them out.
- AI agents make set-based design cheap for gates. Never run three versions of sign-in.
Hora and Tempus show why finished pieces matter¶
- Herbert Simon's 1962 parable: two watchmakers, a thousand parts each, phones that keep ringing.
- Tempus builds in one run. An interruption sends him back to part one.
- Hora builds units of ten. An interruption costs her one small unit.
- At a 1-in-100 chance of a call per part, Tempus takes roughly two thousand times as long.
- A stable subassembly holds together on its own, so finished work stays finished.
Your phone rings too¶
Builders working with AI agents get interrupted all the time: the agent loses track, a vendor changes, the day job calls.
- Save working code often, so each save is a finished unit.
- Give the agent one small, complete task at a time.
- Make each adapter a stable piece with its own tests.
- Write the app's rules in a project file, so a fresh session doesn't start from part one.
Judgment grows from fast feedback¶
- Engineering judgment is making sound decisions when the rules don't settle the answer.
- Gary Klein found that experts recognize patterns they've seen many times.
- Expertise from feedback: skilled intuition forms only where you get clear, timely feedback.
- A fast feedback loop tells you whether a change worked within minutes: tests on every change, an alert when errors jump.
- With one, a scoring bug shows up in ten minutes. Without one, it shows up three weeks later in a member's email.
Four questions sort any part of an app¶
- What happens to a user if this part is wrong?
- Can a mistake here be undone?
- How many users would one failure reach?
- Would a failure here be noticed quickly?
High on any of the first three: must-be-right. High on the fourth: add a fast feedback loop. Everything else is good enough for now.
Tell your agent¶
"Go through every route, every background job and every outside service in this app. For each one, answer the four questions. Put the answers in a table in docs/must-be-right.md, with the must-be-right parts at the top."
The chapter's other prompts ask the agent to list failure handling for every outside call, and to name one-way doors before making a change.
Next: how a web app fits together¶
- An app doesn't creak before it fails, so few people have a feel for its walls yet.
- Until you do, the four questions stand in for that feel.
- Chapter 2 follows one request from the browser to the server and back, so you can picture every part your agent builds.
You can sort an app now¶
You can look at any part of an app and ask the four questions. That sort decides where every later chapter spends its care.
Good enough for now, and you know why.
"Gate or wall?" — Sawyer