Page 6 of 10

Taste in code and systems

20 notesUpdated Nov 16, 2026Jump to latest
Ask your AIChatGPTClaude

N20

References

  • John Ousterhout, A Philosophy of Software Design (2018) — complexity as the enemy, deep modules, and the cost of shallow abstractions (5.1, 5.2).

  • Sandi Metz, "The Wrong Abstraction" (blog post, 2016) — duplication is cheaper than the wrong abstraction (5.2).

  • Martin Fowler, Refactoring (1999, revised 2018) — the rule of three, credited to Don Roberts (5.2).

  • Google's engineering practices documentation, "How to do a code review" — reviewing for the change's purpose and the riskiest parts first (5.4).

  • Chapter 3.4 of this course — irreversibility, which 5.2 applies to data models and public APIs.

N19

The key

#Panel pickPart testedWhy
1ARecognition (shape)Flat with early returns reads top to bottom; five levels of nesting is five paths to trace
2BRecognition (plausible-but-wrong)Floating point cannot represent most cents exactly; money arithmetic in floats drifts
3ARestraint (over-abstraction)One implementation and tests that do not use the seam; the interface is indirection with no job
4BVerification (false confidence)Returning 200 on an unknown error tells the provider the payment was handled when it was not
5AVerificationThe description is the agent describing itself; the diff has one test
6BArchitecture (irreversibility)One transaction on twenty million rows locks the table; batches are reversible at every step
7ARecognition (plausible-but-wrong)A due date is a date in the user's day, not an instant on the server's clock
8BRestraint (bloat, drift)Two sources of truth for how money prints is a bug waiting for a reporter

Six or more is typical after this module. If 3 or 4 went the other way, "good practice" and "safe" are still outranking the job in your reads; Chapter 5.3's catalogue entries 1 and 5 are the ones to reread.

N18

Calibration check — Module 5

Eight judgments. Pick, write one line, then read the key. Score out of 8; compare with the Code and systems subscore from Chapter 1.4.

1. Same behavior, two shapes. A: applyPayment(invoice, payment), fourteen lines, three early returns. B: handle(data), sixty lines, five levels of nesting.

2. Storing an invoice amount. A: A floating-point number, amount: 420.1. B: An integer in the smallest unit, amountCents: 42010.

3. An InvoiceRepository interface with one implementation, PostgresInvoiceRepository, added "for testability." The tests run against a real test database. A: Remove the interface; use the class. B: Keep it; interfaces are good practice.

4. Error handling in the payment webhook. A: Wrap the handler in try { … } catch (e) { logger.warn(e) } and return 200 so the provider stops retrying. B: Handle the known failures explicitly; let unexpected errors return 500 so the provider retries and someone is paged.

5. A PR description says "fully tested; all edge cases handled." The diff contains one test, for the happy path. A: Request the edge-case tests the description claims. B: Approve; the description is thorough and CI is green.

6. A migration on a table with twenty million rows. A: Add the column and backfill it in one transaction. B: Add the column as nullable, backfill in batches, add the constraint afterwards.

7. Deciding whether an invoice is overdue. A: Compare due_date with a today passed in, computed in the user's time zone. B: Compare due_date with new Date() on the server.

8. A generated utility module of two hundred lines: formatCurrency, formatDate, slugify, debounce, deepClone. The codebase already has the first three. A: Keep it; more utilities do not hurt. B: Delete the duplicates; keep only what is new and used.

N17

Model answer — Rep 5.4

Pick: PR 2.

Job. Record when each invoice was paid, for existing and future invoices. PR 2 does that and nothing else: four files, all on task.

Verdict. Approve, with one change requested below.

Risk lines. The backfill reads received_at from payments, which is the actual event, and admits ignorance where no payment row exists rather than inventing a date. markPaid takes the timestamp from the payment, not from the clock, so a payment recorded late is dated correctly. Assumption to confirm: that every paid invoice since the payments table was introduced has a payment row; the logged count will say.

Tests. Both can fail. The first would fail if paid_at came from NOW(); the second would fail if the backfill guessed. Neither mocks the thing under test.

What does not. Null paid_at on old paid invoices will surface in reports as "paid, date unknown." The one change: add a follow-up task to backfill those from the invoice's status-change history where it exists, and show "paid (date unknown)" in the UI rather than a blank, so the gap is honest.

Why not PR 1. Catalogue 3, twice: updated_at is not the payment date, and NOW() at status change is the clock, not the event. One test that cannot fail in any way that matters.

Why not PR 3. Catalogue 1, 2, 5, and 6 in eleven files: a strategy interface for a one-time backfill, a config default that selects the wrong strategy, tests that verify the mock was called, and a reformat of a module the task did not touch. It also ships PR 1's bug behind a flag.

What makes this a good review: it was decided at step two, on the line that writes the date; the tests were read as tests, not counted; and the one change requested is about the honesty of the data, not the style of the code.

N16

Rep 5.4 — Three PRs, one task

Time: 30 minutes. Output: a written review of one PR.

The task: add a paid_at timestamp to invoices and backfill it for existing paid invoices. Three PRs are described below. Run the review order on each, far enough to pick one. Then write the full review of the one you picked, with the rubric, and one line on why you rejected each of the others.

PR 1. Three files. Migration adds nullable paid_at. Backfill sets paid_at = updated_at where status is paid. On status change to paid, sets paid_at = NOW(). One test: the column exists after migration.

PR 2. Four files. Migration adds nullable paid_at. Backfill sets paid_at from the payments table, as the latest received_at per invoice, and leaves it null where a paid invoice has no payment row, logging the count. markPaid(invoice, payment) sets paid_at = payment.receivedAt. Two tests: marking an invoice paid with a payment dated yesterday sets paid_at to yesterday; backfill leaves paid_at null for a paid invoice with no payment row and logs one.

PR 3. Eleven files. Adds a PaymentTimestampService with a strategy interface and two strategies, FromPaymentsStrategy and FromUpdatedAtStrategy, chosen by a config value that defaults to fromUpdatedAt. Backfill uses the service. Tests mock both strategies and assert the service calls the configured one. Also reformats the invoices module.

N15

The review order

The rubric is an order, because risk is not evenly spread and attention is finite.

  1. The job. What should this change do, in one sentence, from the ticket and not from the description? Does the diff do that, and only that? (Catalogue 6.)

  2. The risk lines. Data writes, migrations, money arithmetic, authentication, external calls, deletes. Read every one with the question: what does this assume? (Catalogue 3.)

  3. The tests. Before the rest of the code. Could each one fail? What is mocked? (Catalogue 5.)

  4. Shape and names. The thirty-second read from Chapter 5.1 on the main unit.

  5. Abstractions and options. Anything with one implementation or one value. (Catalogue 1, 2.)

  6. Size. Could it be half? (Catalogue 4.)

  7. The verdict, in writing. Approve or request changes, the one biggest reason, and the lines. The critique template from Chapter 2.3 fits: job, verdict, what works, what does not, the one change.

Steps one to three catch the bugs that cost money. Steps four to six catch the ones that cost time. A review that runs out of time after step three has still done the important part.

Review as teaching

Every "request changes" comment is a sentence for the instruction file in Chapter 7.4. Never use updated_at as a proxy for an event time. A test that mocks the function under test is not a test. Limit changes to the task. The review is where the rubric grows, one caught bug at a time, and a team that writes the sentences down stops catching the same bug twice.

The PM's review

You may not read every line. You can read the job, ask the engineer to point at the risk lines, and read the names of the tests. Three questions do most of the work:

  • What does this assume about the data?

  • Which test would fail if this were wrong?

  • What else changed?

An engineer who can answer all three has reviewed the PR. One who cannot has approved it.

Reps

Three reviews a week with the rubric, each with a written verdict. For each, a journal entry: will this PR cause a bug in the next thirty days, and at what confidence? That entry calibrates the reviewer, which is a thing almost no reviewer has ever measured about themselves.

Four ways to waste a review

  • Approving on green. Tests passing is the start of the review, not the end.

  • Reviewing by style. Naming nits while the join is wrong. Style is step four; the join is step two.

  • Reviewing everything equally. Attention spread evenly over a diff finds the typo and misses the migration.

  • "LGTM with comments." Approving and complaining at once, so that neither the approval nor the complaint means anything.

N14

Chapter 5.4 — The review as the rep

The one idea: when the agent writes most of the code, the review is where your taste gets its reps. Review agent output the way a senior reviews a junior's PR: job first, then the risky lines, then the tests, then a written verdict. Never from the description.

Two reviewers, one PR

The first reviewer reads the description, which is thorough. Scrolls the diff. Sees green tests. Approves in four minutes.

The second reviewer skips the description, asks what the job is, goes straight to the line that writes to the database, reads the test for that line, finds the mock, and requests changes in nine minutes.

The second reviewer is not slower. The second reviewer is doing a different activity. The first was reading a story about the code; the second was reading the code.

The description is the agent describing itself

A PR description written by the agent that wrote the PR is the output rating its own output. It is fluent, confident, and complete, and none of those are evidence. The diff is what will run. Read the diff.

N13

Rep 5.3 — Find each mode

Time: 25 minutes. Output: the list, and two entries of your own.

The PR below is described rather than shown. Find every failure mode it contains and give its catalogue number. Then write two catalogue entries from bugs you have actually shipped.

PR: Add payment reminders. 14 files, +1,240 / −310. Adds a ReminderStrategy interface with one implementation, EmailReminderStrategy. Adds ReminderConfig with maxRetries, backoffMs, enableBatching, and dryRun. The scheduler selects invoices where status <> 'paid' and skips any whose updated_at is within the last seven days, "to avoid reminding twice." The one test mocks sendEmail to resolve and asserts it was called. The whole job runs inside try { … } catch (e) { logger.warn(e) }. The PR also renames InvoiceService to InvoiceManager across nine files, and adds a forty-line formatCurrency helper; the codebase already has one.

Model answer — Rep 5.3

WhatModeWhy it matters
ReminderStrategy with one implementation1Indirection for a second case that does not exist
Four config options nobody asked for2Each one is a decision deferred to whoever runs it, and dryRun will be true in production one day
Skipping by updated_at3An invoice edited yesterday is not an invoice reminded yesterday; some clients get no reminder, and the bug is invisible
Test that mocks sendEmail and asserts the call5Cannot fail; it tests that the mock was called
catch (e) { logger.warn(e) } around the job5A failed reminder run looks like a successful one in every dashboard
Renaming InvoiceService across nine files6Nothing to do with reminders; it hides the real diff and will collide with every open branch
Forty-line formatCurrency duplicate4 and 6Bloat, and a second source of truth for how money prints

Seven findings, all six modes. The one that would have cost the most is the updated_at skip, because it ships silently and the people it fails are the ones who most needed the reminder.

What makes this a good answer: each finding names the mode, so the same question catches it next time, and the findings are ranked by cost rather than by order in the diff.

N12

The catalogue (continued)

5. False confidence. Tests that cannot fail, because they mock the thing under test; catch-all error handling that logs and continues; "all tests pass" in a description that nobody checked; exceptions swallowed in a catch that does nothing. Why: output is optimized to look finished. Spot it: read the tests before the code, and ask of each one whether it would fail if the logic were inverted. Find every catch and read what it does. Ask: which test would fail if X were wrong?

6. Drift. Changes outside the task: a refactor, a rename across nine files, a dependency upgrade, a reformat, hidden inside a large diff. Why: the model is helpful and has no sense of scope. Spot it: diff size against task size, and the list of files touched. Ask: limit changes to the task, and list anything else you changed.

The two-minute check

Run on any generated PR, in this order:

  1. Files touched and diff size, against the task. (6)

  2. The tests: could each one fail? What is mocked? (5)

  3. Every line that writes data, joins, computes money, or handles time: what does it assume? (3)

  4. Every catch: what happens next? (5)

  5. Interfaces and options with one implementation or one value. (1, 2)

  6. Length against job. (4)

Why these are harder than human bugs

A junior's mistakes cluster around what they do not know, and a reviewer can see the gap. A model's mistakes cluster around what is usually true, and usually true looks like competence. The backfill above would pass a review that was looking for a junior's mistakes. It fails a review that asks what the line assumes.

Build your own catalogue

Every time a generated bug ships, write the entry: what it looked like, what it actually was, and the one question that would have caught it. Ten entries in, you have a review rubric that fits your codebase better than this one, and the first draft of the instruction file in Chapter 7.4.

N11

The catalogue

1. Over-abstraction. Interfaces with one implementation; factories, builders, and strategies for one case. Why: the training data is full of enterprise code. Spot it: count the classes and interfaces against the number of things the domain has. Ask the agent: remove every abstraction with one implementation.

2. Gratuitous configuration. Options, flags, and environment variables nobody asked for: maxRetries, enableLogging, strictMode, dryRun. Why: completeness looks like quality. Spot it: configuration that has had one value in its life. Ask: remove every option with one caller or one value.

3. Plausible-but-wrong. Logic that is right for the common case and wrong for this one. updated_at as a proxy for an event time. Joining on email. Money in floating point. A time zone stored as an offset. A boundary that is off by one. Why: the model produces the most probable code, and probable is not the same as correct for your data. Spot it: read every line that touches data semantics (joins, dates, money, identity) with one question: what does this assume? Ask: list every assumption this makes about the data.

4. Bloat. Three hundred lines where forty would do; helpers for one-liners; comments that restate the code; checks for states that cannot occur. Why: verbosity is rewarded. Spot it: line count against the size of the job, then the subtraction drill from Chapter 2.5. Ask: rewrite this in half the lines without changing behavior.

N10

Chapter 5.3 — AI code failure modes

The one idea: generated code fails in a small number of recurring ways, and all of them look fine. A catalogue of the failure modes turns a vague unease into a check you can run in two minutes.

The backfill

An agent delivers a migration adding paid_at to invoices, with a backfill script. The description is thorough. The tests pass. The backfill sets paid_at = updated_at for every invoice whose status is paid.

It is a plausible line. It is also wrong for about a third of the rows, because updated_at changes whenever anything changes, and for those invoices it is the date someone edited a note, not the date the money arrived. No engineer would write that bug on purpose. The model wrote it because it is the most likely line, and the most likely line is not the correct line for this data.

That is entry three in the catalogue. The catalogue has six entries, and a reviewer who knows them finds this one in the time it takes to read the backfill.

N9

Rep 5.2 — Review one design

Time: 30 minutes. Output: a review and a smaller design.

Review the proposal below, or one of your own. For each component, write the six-months sentence and a verdict: keep, defer, or remove. Then write the version with the fewest components that still passes, and name the one decision in it that must be right from day one.

Proposal: an invoicing backend with four services (invoices, payments, notifications, users); a message bus between them; a Redis cache in front of invoice list queries; a GraphQL gateway; a separate reporting database fed by the bus. Current load: 2,000 users, 40 invoices a day.

Model answer — Rep 5.2

ComponentIn six months this hurts when…Verdict
Four servicesEvery change to "invoice paid" crosses three repos; there is no load that needs themRemove; one service with modules
Message busDebugging a lost notification means tracing a bus nobody else uses; at 40 invoices a day a jobs table does the same work visiblyDefer; a jobs table until a real queue is needed
Redis cache on invoice listsA list shows a stale "unpaid" after a payment, and the first bug report is about moneyRemove; the query is indexed and fast at this size
GraphQL gatewayOne client, one API; the gateway is a second place every field is definedRemove; REST from the one service
Reporting databaseReports are a weekly export at this size; a second database is a second thing to keep in syncDefer; read from a replica when reports are slow
Payments moduleOnly if it is not behind an interface, because the provider will change or add a secondKeep, behind a thin interface
Data modelHurts if invoices and payments share a table, the day partial payments shipKeep; payments as their own table from day one

The smaller design: one service, one Postgres database, a payments module behind an interface, background jobs in a table, REST. Seven components became three. The one decision that must be right on day one is the payments table, because it is the only thing on the list that cannot be refactored in an afternoon.

What makes this a good review: every verdict has a six-months sentence behind it; the two keeps are kept for named reasons; and the review says which decision is irreversible, which is the only one that deserved the meeting.

N8

Boundaries that pay

Three boundaries earn their complexity almost everywhere.

  • Side effects behind a thin interface. Payments, email, and external APIs sit behind something small enough to fake in a test. This is the one abstraction worth having before the third case.

  • What changes often, apart from what changes rarely. Pricing rules change monthly; the invoice data model changes yearly. They should not live in the same module.

  • A data model that is honest about the domain. An invoice can have several payments. If the data model says one, the UI's current needs are being written into the hardest thing to change. This is the one place where "the future" is a legitimate argument, because data is the irreversible decision from Chapter 3.4 applied to code.

Reviewing a design

Four questions, for engineers and PMs alike.

  1. What is the one thing this design makes easy?

  2. What does it make hard?

  3. What hurts in six months?

  4. What is the smallest version that could be built first?

A design that cannot answer the fourth has not been scoped; Chapter 3.2 applies.

Agents and architecture

Ask an agent for a design and you get the enterprise average: a queue, a cache, three services, an event bus. Ask instead for the simplest design that handles today's load with the one irreversible decision done right, which is almost always the data model. Then ask it to argue for removing each component in turn. The components that survive that argument are the architecture.

N7

When to abstract

Wait for the third case, or for the second time the same change had to be made in two places. Abstract when two things have changed together and it hurt. Not before.

Premature abstraction is the most common architecture failure in generated code: interfaces with one implementation, strategy patterns with one strategy, plugin systems with one plugin. The cost is indirection. Every reader traces through a layer that does nothing, and every change goes through it too. Duplication is cheaper than the wrong abstraction, because duplication can be fixed in an afternoon and the wrong abstraction is defended for years.

The complexity budget

Every system has a budget: the number of concepts a new engineer can hold in their head in the first week. Spend it on the domain, meaning invoice, payment, client, reminder, and not on the plumbing, meaning adapter, factory, registry, orchestrator.

A fast measure: count the nouns in the architecture diagram. The ones a user would recognize are domain. The ones only the team recognizes are plumbing. A healthy system has more of the first kind.

N6

Chapter 5.2 — Architecture taste

The one idea: architecture is the set of decisions that are expensive to change. Taste in architecture is asking "what hurts in six months?" and spending complexity only where the answer demands it.

Two backends

Two teams build the same invoicing backend. Team A starts with four services (invoices, payments, notifications, users), a message queue between them, and a gateway in front. Team B starts with one service, one database, and a payments module behind a small interface.

Six months later, Team A spends a third of its time on the plumbing between services, and a change to what happens when an invoice is paid touches three repositories. Team B shipped the client portal in five days and extracted payments into its own service in month nine, when the payment provider's webhooks needed their own scaling and not before.

Both architectures are right somewhere. Taste is matching the complexity to the moment, and the moment was month one.

The six-months test

For each architectural choice, finish the sentence: in six months, this will hurt when ___.

If the blank cannot be filled, the choice is fine as it is. If it can, decide whether the hurt is worth today's benefit, in writing. Some fillings from the invoicing app:

  • Invoices and payments in one table: hurts when partial payments arrive, which Chapter 3.4 scheduled.

  • A synchronous call to the payment provider inside the request: hurts the first time the provider is slow and every invoice page hangs with it.

  • No versioning on the public API: hurts the first time a field changes and a customer's integration breaks.

  • Four services on day one: hurts every day, in the plumbing, for a scale that does not exist yet.

N5

Rep 5.1 — Three implementations

Time: 15 minutes. Output: a ranking and three lines.

The task: return a user's overdue invoices, sorted by amount, largest first. Read each implementation for thirty seconds. Rank them, with one line per implementation naming the thing that decided it.

A

async function getData(uid) {
  const res = await db.query('SELECT * FROM invoices WHERE user_id = $1', [uid]);
  let out = [];
  for (let i = 0; i < res.rows.length; i++) {
    if (res.rows[i].status !== 'paid') {
      if (new Date(res.rows[i].due_date) < new Date()) {
        out.push(res.rows[i]);
      }
    }
  }
  out.sort((a, b) => b.amount - a.amount);
  for (const o of out) { o.label = `${o.client_name} — $${o.amount}`; }
  return out;
}

B

class InvoiceQueryBuilder {
  constructor(repo) { this.repo = repo; this.filters = []; this.sorter = null; }
  where(fn) { this.filters.push(fn); return this; }
  orderBy(fn) { this.sorter = fn; return this; }
  async execute(userId) {
    let rows = await this.repo.findByUser(userId);
    for (const f of this.filters) rows = rows.filter(f);
    return this.sorter ? rows.sort(this.sorter) : rows;
  }
}
const overdue = (userId) =>
  new InvoiceQueryBuilder(invoiceRepo)
    .where(i => i.status !== 'paid')
    .where(i => i.dueDate < new Date())
    .orderBy((a, b) => b.amount - a.amount)
    .execute(userId);

C

async function overdueInvoices(userId, today = new Date()) {
  const { rows } = await db.query(
    `SELECT id, client_name, amount, due_date
       FROM invoices
      WHERE user_id = $1 AND status <> 'paid' AND due_date < $2
      ORDER BY amount DESC`,
    [userId, today]
  );
  return rows;
}

Model answer — Rep 5.1

Ranking: C, A, B.

C. The name says the thing. One job. The filter and the sort happen in the query, which is what the database is for, and today is a parameter, so the function can be tested on a fixed date. Nine lines.

A. It works. The name says nothing, the filter is a nested loop in application code, and the last line formats a label, which is a second job hiding in a query function. new Date() is created on every iteration, which is harmless today and a tell about how the code was written.

B. An abstraction with one caller. It reads the whole table into memory and filters there, and it adds a layer every reader must trace through to find out that nothing happens in it. This is what over-generation looks like: it is the most complete answer to a question nobody asked.

If you ranked B above A because it looks more professional, that is the recognition error from the list: abstraction for quality. It is the most common one in code, and the one agents trigger most.

N4

What good code feels like (continued)

  • Names in the domain's words.

  • A flat shape that reads top to bottom.

  • One job per unit.

  • Side effects at the edges, where they can be faked in a test.

  • Errors handled where they can be handled and surfaced where they cannot. Never swallowed.

Recognition errors in code

  • Cleverness for quality. The one-liner that nobody can read next month.

  • Abstraction for quality. A strategy pattern for two cases. Chapter 5.2.

  • Length for thoroughness. Long is not careful; it is usually unedited.

  • Green for correct. Tests passing says the tests passed. Chapter 5.3.

  • Consistency for quality. Consistent with a bad pattern in the codebase is still bad; the fix is the pattern, not the exception.

For the PM who reviews

You do not need to follow the logic to see the three things. Four questions carry most of a review:

  • What does this function do, in one sentence? If the sentence has "and," there are two functions.

  • What happens when this fails?

  • Where is this tested, and what would make that test fail?

  • Why is this abstracted? What is the second case?

Generated code

Agents name things generically by default (data, result, handler, utils), nest moderately, abstract early, and handle errors by catching and logging. The names are the first tell, and the fastest fix: ask for the function to be renamed to what it does, and watch what the rename reveals about how many things it does.

N3

Three things to read first

Names. Do they say what the thing is or does, in the domain's words? overdueInvoices, markInvoicePaid, paymentReceivedAt tell you the author knew what the code was for. processData, handle, utils, manager, result2 tell you they did not, or that nobody decided. Names are the fastest signal because they are a record of whether thinking happened.

Shape. Indentation depth, function length, early returns, how many things happen in sequence. Shape is the squint test for code: it is visible without reading. Deep nesting means many paths through the code. A long function means many jobs. A flat shape with early exits means the author dealt with the exceptions first and the main case reads straight down.

Boundaries. Where does this code stop and other code start? Does a function do one thing? Does the module that queries the database also build HTML? Are side effects, meaning the database, the network, email, separated from computation? Bad boundaries show up as an "and" in the honest description of what a function does.

The thirty-second read

  1. Names in the signature and the first few lines.

  2. Shape. Depth, length, early returns.

  3. Dependencies. The imports: what does this touch?

  4. The error path. What happens when something fails: handled, surfaced, or swallowed?

  5. One test. Does one exist, and does it test behavior or restate the implementation?

Then one word, as in Chapter 4.1. After a hundred reads the word arrives before the look is finished.

What good code feels like

Five properties, parallel to the five for screens.

N2

Chapter 5.1 — Reading code for quality

The one idea: code quality is visible in thirty seconds, before you understand what the code does: in the names, the shape, and the boundaries. A senior reads those three first and the logic last.

Across the room

Two functions on two screens, seen from across the room. The first is called processData, runs sixty lines, and nests five levels deep. The second is called applyPayment, runs fourteen lines, and has three early returns at the top.

Nobody has read a line of logic yet, and the verdict is already most of the way in. The first name says nothing; the second says what happens. The first shape has many paths; the second handled its edge cases first and then did one thing. If you learned afterwards that the first function also sends an email and formats a currency string, you would not be surprised. Names, shape, and boundaries travel together.

N1

About this module

Module 5 trains the eye on code and the systems it lives in: what a senior sees in thirty seconds, what hurts in six months, the recurring ways generated code fails, and the review as the place where taste gets its reps. Builders learn to judge in seconds; PMs who build learn enough to review and ask the right question.

By the end of Module 5 the reader can rank three implementations of one task in ninety seconds and say why, review a design for what hurts in six months, run a two-minute check for the six ways generated code fails, and write a review that catches what the description hides. Four chapters, each with its reading, one rep, and a model answer, then an eight-item calibration check. The parts of taste it trains are verification and recognition.

#ChapterThe one ideaRep
5.1Reading code for qualityQuality is visible in names, shape, and boundaries before you understand the logicRead three implementations of one task; rank and justify
5.2Architecture tasteArchitecture is the set of decisions that are expensive to change; spend complexity only where the six-months test demands itReview one design for what hurts in six months
5.3AI code failure modesGenerated code fails in six recurring ways, and all of them look fineFind each mode in one PR; start your own catalogue
5.4The review as the repThe review is where taste gets its reps; job first, risk lines, tests, then a written verdictReview three PRs for one task; pick one and write the review
—Calibration checkEight code and review judgmentsTake it

What to bring: a recent PR from your own codebase, ideally one an agent wrote, and the catalogue file you will start in 5.3. The examples use JavaScript and SQL; the judgments do not depend on the language.