# Why I Stopped Reading the Code AI Writes

> Source: <https://algocademy.com/blog/why-i-stopped-reading-the-code-ai-writes/>
> Published: 2026-11-25 10:27:05+00:00

**Recommendation:** Have coding agents write and run tests for concurrency, duplicate retries, rounding, timezone edges, permissions and data volume instead of reviewing every generated line yourself.
More in the playbook "Working with AI coding agents": <https://wpnews.pro/playbooks/coding-agents>

*By Mircea Dima*

I think we’re entering the age where you never check the code, only what it produces. I already work this way: I don’t read the code AI writes for me. I check what it does. AI agents can test code more thoroughly than most of us ever did, so the part that’s left for you is knowing what to ask.

That’s an unpopular view right now, so here’s the reasoning, and what checking what the code does looks like in practice.

## The advice I think will age badly

Most advice about AI coding goes the other way. Review every line the AI writes, it says. Keep fixing bugs by hand, so you don’t lose the skill.

I understand where it comes from. AI code does have bugs, and someone has to catch them. But reading is a slow way to catch them, and it gets slower every month:

- **The AI writes faster than you can read.** An agent can change twenty files in the time it takes you to review one. Line-by-line review makes you the bottleneck.
- **The expensive bugs look fine.** A booking check that compares start times reads perfectly well. It’s only wrong when two bookings overlap without starting at the same hour, and you won’t see that by reading.
- **Tests are cheap now.** Ask an agent for a hundred tests and you get a hundred tests, and it runs them for you. A test checks the behavior again every time the code changes. A reviewer reads it once.

So I spend my attention on the outputs, and on the questions that decide which outputs to check.

## What’s left for you: knowing what to ask

An AI agent will test whatever you point it at. It won’t know which cases matter unless you tell it, because those come from the problem and the people who use the software.

Some questions come from the client: what do they actually need, and what did the ticket leave out? Others come from knowing how software tends to break. These are the ones worth asking about almost any feature:

- **Two at once.** What if two people book the same bike at the same minute? What if two couriers accept the same order?
- **The same thing twice.** What happens when a payment is retried? Does the customer get charged twice? What if the same member is on the list twice?
- **Money and rounding.** Does a discount spread over three items come out a cent too much?
- **Time.** What happens to a rental that crosses midnight, or to a weekly reminder when the clocks go back?
- **Who is allowed.** Can one employee see another’s expense claim? Can someone approve their own?
- **Size.** Is the monthly report still fast with a year of orders?

None of these need you to read code. Each one turns into a test, and the agent can write it and run it.

## One question, turned into a test

Say you run bike rentals, and a customer tells you two families showed up for the same e-bike. Your question is: can the system book one bike twice for overlapping times? You ask the AI to fix it and to prove the fix with tests.

Here’s a small version in Python. `book` is a correct booking function. `book_broken` is the kind of fix that looks right: it rejects a second booking only when both start at the same hour. Two tests try each version. The weak one books the same hours twice. The strong one books 10:00 to 12:00, then 11:00 to 13:00.

``` python
def book(bookings, bike, start, end):
    for b in bookings:
        if b["bike"] == bike and start < b["end"] and b["start"] < end:
            raise ValueError("bike already booked")
    bookings.append({"bike": bike, "start": start, "end": end})

def book_broken(bookings, bike, start, end):
    # Only catches two bookings that start at the same hour.
    for b in bookings:
        if b["bike"] == bike and b["start"] == start:
            raise ValueError("bike already booked")
    bookings.append({"bike": bike, "start": start, "end": end})

def rejects_second(book_fn, first, second):
    bookings = []
    book_fn(bookings, "e-bike 3", *first)
    try:
        book_fn(bookings, "e-bike 3", *second)
    except ValueError:
        return True
    return False

# Weak test: the same hours twice.
# Strong test: 10:00-12:00, then 11:00-13:00.
for name, fn in [("book", book), ("book_broken", book_broken)]:
    weak = rejects_second(fn, (10, 12), (10, 12))
    strong = rejects_second(fn, (10, 12), (11, 13))
    w = "pass" if weak else "FAIL"
    s = "pass" if strong else "FAIL"
    print(f"{name:12} weak: {w}  strong: {s}")
```

Output:

```
book         weak: pass  strong: pass
book_broken  weak: pass  strong: FAIL
```

The weak test passes on both versions, so it proves nothing. With only that test, the broken code would ship with every test green. The strong test is the one that catches it.

That’s the most useful question to ask about any test the AI writes for you: **would this test fail if the code were wrong?** You can have the agent check it. Ask it to make a broken copy of the function, run the tests against that copy, and tell you which tests catch it. If none do, the tests don’t yet check what matters. The idea has a name, mutation testing, and tools such as mutmut for Python and Stryker for JavaScript do it at scale. Asking for one broken copy already helps.

## How to get better at asking

1. **Ask the client before you build.** A ticket that says “more on weekends” leaves out how much more, what happens to a rental that crosses midnight, kids’ bikes and holidays. The AI will guess every rule you don’t give it.
2. **Keep a list of how software breaks.** Two at once, the same thing twice, rounding, time, permissions, size. Run every feature past it.
3. **Check the tests against a broken copy.** A test suite that passes on wrong code only looks like safety.
4. **Use the result like a user would.** Some problems only show up on the screen. We wrote about that in[why brainstorming ideas matters when AI writes the code](https://algocademy.com/blog/why-brainstorming-ideas-matters-when-ai-writes-the-code/) .
5. **Train your eye for edge cases.** The questions above are edge cases from real businesses.[How to identify edge cases](https://algocademy.com/blog/the-importance-of-edge-cases-and-how-to-identify-them/) covers the classic ones from coding problems.

## Practice it on real tickets

This is the skill we built Booly to practice. Booly is AlgoCademy’s AI coding practice. A client brings you a ticket. Booly, your AI teammate, writes the code and runs the tests. You decide what to ask and what to check.

In one ticket, Marta, who rents bikes by a lake, writes that two families came for the same e-bike and the system let both of them book it. That’s all she says at first. She only answers what you ask, and she won’t think of everything. When you deliver, she tries it, and sends it back if a customer runs into a case you missed. You’re scored on what you found out and how you directed the AI.

There are 48 tickets in eight seasons, in Python and JavaScript: features, reviews of the AI’s code, bugs, slow pages, security and timed interview rounds. The first ticket is free, with no sign-up: [try AI coding practice](https://algocademy.com/ai-coding-practice/).

The code is the AI’s job now. Knowing what to ask is yours.
