DEV Community

Cover image for We asked devs to guess how many bugs they'd catch in AI-written code. Most guessed wrong.
Anirudh
Anirudh

Posted on

We asked devs to guess how many bugs they'd catch in AI-written code. Most guessed wrong.

A few days ago I shared a small quiz here: 5 short AI-written snippets, and you guess your score before you start.

24 people have taken it so far (students, junior and senior devs). Some early numbers:

  • Average guess: 2.5/5
  • Average actual: 1.5/5
  • 15 of 24 thought they'd do better than they did
  • Nobody has gotten 5/5 yet

The part I didn't expect: the two people who said they read every line of AI code scored the lowest. The people who said they "only look when something breaks" did best.

Tiny sample, so I'm not calling it a finding. It does match what I keep hearing when I talk to devs, though. Almost nobody reads AI diffs line by line anymore. They:

  • read the decisions, not the syntax
  • jump straight to error handling, auth, anything touching data or money
  • keep diffs small so there's less to read
  • or lean on tests and CI and mostly trust it

So I'm curious how people here actually do it. When your agent hands you a big diff, what do you read first, and what do you skip?

If you want to see where you land: read-the-diff.netlify.app (about 90 seconds, no signup)

Top comments (3)

Collapse
 
jacksonxly profile image
Jackson Ly •

On one agent-built feature, all five tests checked the object the code had just created in memory and never read the row back from the database. The session ran with SQLAlchemy's expire_on_commit=False, so nothing reloaded after the commit. In review, deleting the insert left all five green, and each test looked fine on its own. So I read the tests first, and my agents' rules tell them to break the code on purpose when it's unclear a test can fail.

Collapse
 
anirudh_3eb6e4f31cae95630 profile image
Anirudh •

ooof... that's a nasty one, every test green and none of them could actually fail.

reading the tests before the code is interesting, most people I've talked to go straight to the diff. did one incident flip that for you or did it build up over time?

also would love to hear how you run multiple agents at once, if you're up for a quick call sometime

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

guessing 2.5 and catching 1.5 is the honest number. reading decisions instead of syntax is the part that moves it.