← Machine Coding

Read the Product, Not the Code

The machine reads the code; you read the product. How quality is judged when the machine does the coding.

The introduction to this book describes a walk. A research paper, an idea for a trading system, and in about three minutes a couple of thousand lines of code from GPT-4. I glanced at it, recognised that a substantial amount of work had been done, and was fairly sure it would run. Then I went home and ran it. With a few minor changes, it worked.

Notice what I did not do. I did not review two thousand lines of code the way I had reviewed code for most of my career, line by line, looking for mistakes. I ran the program to see what it could actually do.

And notice what that did not tell me. Running the program established that it could run; it did not establish that the trading strategy would make money. That was a different question, requiring different evidence.

Both halves of that story matter. I had changed where I looked: from the code to the product. But the properties I could not establish by using the product still needed verification. Increasingly, I can delegate that work too.

Stop looking at the code

For much of my career, code was where we looked for quality. We judged programmers by their code and changes by their diffs. The pull request, the code review, the second pair of eyes: these were central disciplines of the profession, alongside testing and using the software.

Machine coding changes where I concentrate that effort. Machines can inspect code, run tests and review one another’s changes. Given suitable access, context and verification tools, they can examine far more routine implementation than I could personally review at the pace it is now produced. They can also miss things, which is why the quality of that verification matters.

That leaves me free to look somewhere else: at the thing being created.

For a growing share of software work, my primary question is no longer “has the machine written good code?” but “have I created the thing I wanted?” The first question still needs an answer. Increasingly, the machinery can help establish it on my behalf. I read the source when the evidence or the risk demands it, not simply because that is how I have always worked.

Code that is not yours

Chapter 12 described the linker files and parser generators that once demanded my attention and then quietly stopped. The machinery still runs; I rarely need to inspect its workings. Much ordinary source code may follow the same path.

One consequence may unsettle experienced programmers. As machines write more of the implementation, the code will increasingly not look like yours. It may use structures you would not have chosen or patterns unfamiliar to you. Open it and you may feel like a guest in your own project.

That is not, by itself, a failure. The implementation must work, be verifiable, and be safe to change. Maintainability matters as much as ever: the machine maintaining the code next month needs a coherent structure, just as a human does. It need not resemble the code I would have written, but it must respect the project’s established conventions or justify a departure from them.

Unreadable code is not a virtue. Nor is personal familiarity a reliable measure of quality. The code need not be written for my daily reading; it must remain intelligible to whoever needs to inspect, verify or change it.

Two readers

I think of a machine-built application as having two readers, with different primary responsibilities.

The machine reads the code. Coding and reviewing agents, supported by tools, inspect changes, run tests, investigate failures and retain evidence. Do the functions behave as specified? Has the change broken something that used to work? Are there security defects or violated contracts?

I read the product. I use it and judge it against what I meant. Does it do what I wanted? Does it feel right? Is anything missing? Is anything there that should not be?

The distinction is about where attention is most valuable, not an exclusive division of ability. I cannot reliably find a subtle off-by-one error by playing a game. A machine’s assessment of the game cannot establish whether I find it dull. The mistake is to treat a report about the code as a verdict on the product, or my enjoyment of the product as a verdict on the code.

A product shown as a visible surface the human reads and a technical structure the machine reads; both readings feed acceptance.
The two readers. The machine reads the code — tests, diffs, defects, evidence. The human reads the product — behaviour, usefulness, feel. Neither substitutes for the other.

The machine’s layer is already becoming tooling. Roborev, an open-source tool I have used, illustrates the direction: automated commit reviews, retained findings and correction followed by further review. The review loop can run without me personally reading each diff. A clean review is not proof of correctness, however, and two machines can share the same blind spot. Chapters 17 and 18 take up the independence and verification needed to make such arrangements dependable.

The machine does the coding. Increasingly, other machines read the code. My attention moves to the product and to the evidence that supports it.

Use, observe, describe, change

The practice at the product layer is simple: use it, observe it, describe what you observed, let the machine change it, and use it again. It is the book’s master loop — communicate, build, evaluate, improve — from the perspective of the person using the product.

Use means encounter the real thing, not the machine’s account of it. A summary that says “the game now feels faster” is a claim. Playing it tells me whether it feels faster to me.

Observe means paying attention to what actually happens, including the small things: where you hesitated, what you looked for and could not find, what you stopped noticing, what made you smile.

Describe is where the experienced programmer may find the old habits hardest to break.

The temptation is to describe the fix rather than the observation. “Spawn an enemy every eight hundred milliseconds” is an implementation directive dressed as feedback. Compare: “The first thirty seconds are boring — nothing much happens until I’ve already lost interest.” The second describes what you experienced and why it matters. It leaves the machine free to investigate whether the answer is more enemies, faster enemies, a different opening, or something you would not have thought of.

Good descriptions share a few qualities. They say what you saw, not what you suspect in the source. They say what you wanted instead, or at least why what you saw was wrong. They use comparisons freely — “it feels like a screensaver”, “I want it to feel like the last minute of a close match” — because a good comparison carries more intention than a paragraph of adjectives. And they are specific about where: which screen, which moment, which step of the journey.

There are times to be prescriptive. If you know exactly what you want — this button here, that colour there — say so. The point is not to forbid precise instructions. It is to stop reaching for implementation language when what you actually have is an experience.

Change is the machine’s part, within the agreed boundaries. You need not follow every operation. Use the result again: is it better, has anything deteriorated, and is it closer to what you meant?

Shaping behaviour and feel

Most of the work of making something good happens in this loop, in many small turns rather than a few large ones.

Some turns are about behaviour. A website must support the journeys people actually take. A workflow must handle realistic inputs, not just tidy examples. A research tool must return relevant answers grounded in its sources; real questions and source checks help establish whether it does. Using the product is also where overlooked requirements surface. Trying to cancel an appointment may reveal that nobody thought about cancellations.

Some turns are about appearance and feel. You need not know the vocabulary of layout, animation or colour theory to begin. “Make this quieter.” “The important number should stand out.” “There are too many steps between opening this and doing anything.” “The movement feels sluggish.” Each gives the machine a direction to explore. Through successive changes and observations, you can shape the character of a product without touching its implementation.

Some of the best turns remove things. Using the product may reveal that a settings screen, a second navigation bar or an explanatory paragraph adds friction rather than value. Check whose needs it serves before removing it. When something does not earn its place, say so.

Reading evidence you did not produce

If machines read the code, you will increasingly receive reports about code you have not read: test results, review findings and claims that defects were fixed. Learning to read these reports is part of machine coding.

You need not understand every line to ask intelligent questions about the evidence. Four questions do much of the work.

What was checked? “All tests pass” is meaningful only if we know which tests ran, against which version, and what they exercised. Ask what behaviour they cover and what results were retained.

Who checked it? Was the reviewer the implementing agent, a separate agent working from the original requirement, or a specialist? Independence can expose shared assumptions; it does not guarantee correctness. Ask what tools and methods supported the review.

Against what? Was the change examined against the intended behaviour, the system’s contracts and the relevant risks, or merely for problems visible in the diff? A check can be excellent and still answer the wrong question.

What was not checked? A trustworthy report distinguishes findings from uncertainties and identifies the limits of its coverage. If those limits are absent, ask for them.

When a finding matters, ask for evidence rather than reassurance. For a reproducible defect, show me the failing case before the correction and the passing case afterwards. For a security or architectural finding, show me the relevant inspection or independent check. Establish that the evidence belongs to the version I am being asked to accept. You are still not reading every line of code. You are learning to read evidence.

What the product cannot tell you

Using a product reveals a great deal. It does not reveal everything, and the limits are worth stating plainly.

A game can feel excellent and contain a security hole. A website can look right and mishandle private information. A trading system can run flawlessly and embody a strategy that loses money. A service can behave perfectly for one user and collapse under a thousand. A calculation can be right for every example you tried and wrong for the one you did not.

These limits call for evidence of properties ordinary use cannot establish: targeted tests, security analysis, load tests, independent review and, for the trading strategy, evidence from the financial domain rather than the software alone. Some risks also demand specialist human inspection. And when the product is for other people, their experience matters alongside mine.

The decision to release or deploy rests on the appropriate combination of these findings, proportionate to the consequences. Machines can produce much of the evidence and help interpret it. The responsibility for accepting its limitations and authorising the release still has to belong somewhere.

Try Machine Coding — Tune the Game, Not the Code

Use the game from Chapter 13. If you have not built it yet, start there. Speak or type the following instructions and continue the conversation naturally. For this low-risk exercise, keep one rule throughout: do not open the code yourself. These are instructions to try, not a report of completed experiments.

Play it.

Help me open the current version of my game. I want to evaluate it as a player. Tell me how to play it and establish that the version I am opening contains the latest accepted changes.

Play several rounds before saying anything else.

Describe what you noticed — not what to fix.

Here’s what I noticed as a player. [Say it in your own words: what dragged, what confused you, what you liked, where you hesitated.] Before changing anything, tell me what you think is causing each of those, and suggest more than one way to address the ones that matter.

Compare your description with the machine’s diagnosis. Did it understand what you experienced?

Direct the change, then play again.

Make the changes we agreed. Keep the existing controls and scoring behaviour. Run the relevant checks and tell me when there’s a new version to play.

Play it. Is it better? Is anything newly wrong? Repeat while the changes are worthwhile, and stop when the agreed improvement is achieved or you decide another direction would be better.

Let the machinery read the code.

Arrange an independent review if your tools allow it. Have a separate reviewer inspect the implementation and its tests against the agreed behaviour, looking for defects and regressions. Report the findings, the evidence behind them, which were fixed and rechecked, and what remains open or unexamined.

Read the evidence, then decide.

Walk me through that report in terms of what the game does. For visible fixes, show me how I would notice the difference as a player. For defects I cannot observe by playing, show me the evidence that the correction works.

Play the game one last time and decide whether to accept this version. Weigh what you experienced against what the verification established. If independent review was unavailable, record that limitation rather than presenting it as completed. Neither a satisfying game nor a clean report answers every question.

Your job is to recognise the result

I want to create applications. I do not particularly want to write their code, read all of it, or maintain their tests, documentation and build scripts myself. I want the machine to do as much of that as it can reliably do, and to tell me honestly where its evidence stops.

I want to experience what has been made. See how it behaves. Find what is missing. Change what I do not like and improve what I do. When something matters that I cannot see by using it, I want the machinery to help establish it and present the evidence in terms I can judge.

That is not abandoning engineering. It is changing where my attention goes. The code is increasingly the machine’s responsibility, in both directions: it writes it, and it reads it. The creation is mine.

But what standard am I judging the product against? Working is not the same as good, and good is not the same as distinctive. That is the subject of Chapter 16, A New Approach to Quality.