r/ChatGPTCoding • • 3d ago

Discussion Small experiment: devs finished ~10 min faster with an LLM chat, then took ~60% longer to find planted bugs in that same code (arXiv 2611.24216)

A paper from Nov 18 that I think is worth a few minutes if you code with a chat model all day.

Setup. 35 people (students, academics, working devs) each did two small Java tasks in a crossover design: one with LLM chat, one without. Afterwards, the researchers planted bugs (mutations like off-by-one) in each person's own solution and in some unseen code, and timed how long people took to find them.

Results (averages)

  • Writing: 14m31s with the LLM vs 24m41s without.
  • Seconds per planted bug found: 37.1 in self-written code, 60.4 in their own LLM-generated code, 108.5 in code they'd never seen.
  • Share of bugs found: 88.5% / 80% / 66.9%.
  • 59.3% of bugs found in self-written code were found "from memory", vs 34.3% in generated code.

Both versions passed the same test suites. The authors' line: "cognitive debt can accumulate behind working code and passing tests."

The part I found most practical. It wasn't uniform. High reliance on the chat plus low engagement with the task went with clearly lower comprehension. Writing your own prompts and leaning less on generated code predicted faster bug-finding.

Caveats

  • n=35 and small tasks. The authors say the effect is "less pronounced for small tasks".
  • Finding mutations is a proxy for comprehension, which the authors flag themselves.
  • The LLM group still came out well ahead on total time for these tasks.

If you only read one part, read the bug-finding section before the headline speed numbers.

15 Upvotes

21 comments sorted by

9

u/WordWithinTheWord 3d ago

Did the planted bugs pass unit tests?

My experience with these comparisons is that they don’t follow the typical path of how human-developed code gets to a PR stage.

0

u/Mballow_Masine96 2d ago

when you say typical path to a PR, are you talking about local test runs catching mutations or the actual code review process?

2

u/WordWithinTheWord 2d ago edited 2d ago

If I’m manually developing a feature let’s say a shopping cart UI with the back end already wired up.

I will code the feature, add unit/sanity tests as I go. Fixing whatever code doesn’t pass.

Then run the app, using it myself, fixing as I go.

Finally add functional tests to guard against regression once I’ve finalized the UI.

Then finally PR.

So some “off by one” type bug would have never made it into the PR. The bugs that I ship are always either misinterpreted requirements or collateral changes that I inadvertently introduced like renaming a method that was being dynamically invoked via reflection in an externally dependent library.

And again that’s not to say that I’m a perfect developer. But these synthetic tests just aren’t indicative of the types of bugs that I see shipped.

1

u/Dedap85 3d ago

3

u/ipreuss 3d ago

Mutations like off-by-one errors aren’t the kinds of bugs I’d worry about.

I currently have a bug in my game where, if I receive a phone call while the game is running and then return to the game while still on the call, the music resumes prematurely. It’s likely a bug in the underlying framework.

It would take me ages just to figure out how to debug this. Claude told me which tools to install, how to configure my phone, added diagnostic logging to the game, and wrote a test protocol. I’m reasonably confident that we’ll have identified and patched the underlying issue within a few iterations.

I haven’t really looked at the code since I started the project in January, and so far, I haven’t felt the need to. The ability to systematically investigate and resolve bugs matters much more to me than whether I personally understand every line of code.

3

u/ipreuss 3d ago

Mutations like off-by-one are not the bugs I would worry about.

I currently have a bug in my game where when I get a call while the game runs and go back to the game while still staying on the call, the music comes back prematurely. This is likely a bug in the framework I use.

It would take new age to even learn how to debug that. Claude told me what tools to install, how to configure my phone, added logging to my game and wrote the test protocol. I’m confident that we will have identified and patched the bug in a couple of iterations.

I haven’t really looked at the code since the beginning of the project in January. I don’t feel the need to.

4

u/Longjumping-Sweet818 3d ago

Developing with AI is a new paradigm, and as always, people are too slow to adapt and are asking the wrong questions.

This is like going from Java to Rust and asking "How do I write an EventListener?"

1

u/Lambdastone9 3d ago

The paradigm is way more different than a simple rise in abstraction

This is like having your own personal worker, and having to be the manager on the hook for all the work. Proper delegation without disengagement with the subject is a skill good manager have, the ones that don’t are burnt out and detached from their work.

Ai has benefits, but the worthwhile ones are where humans are in charge and in the pilot seat using ai as they please, until we get full autopilot-ready ai which not even fable is close to yet, that in between hybrid workflow region of mixing ai and human work is like the uncanny valley of productivity where the ai and human just bottleneck eachother

1

u/OutOfDucttapes 2d ago

hard to agree, feels more like a trust issue. we just stop auditing the logic. dangerous loop.

1

u/Longjumping-Sweet818 2d ago

I'm not at all saying to stop auditing the logic. I'm saying you need to provide an environment where AI can perform the lion's share of the menial labor, and you're in charge of finding ways to verify that it is doing the correct thing. That could mean TDD. That could mean writing only the business logic yourself in something like a Datalog dialect. It could mean lots of things.

Bottom line is, having AI write code and then debugging the code yourself is ass-backwards.

Obviously I'm just talking about large-scale development. Like multi-year projects and shit.

2

u/ChemicalExcellent463 3d ago

the drop from 59% to 34% of bugs found from memory is the bit i'd worry about. every change in my setup gets reviewed by a different vendor's model, but that doesn't tell me whether i can debug it later.

1

u/EndOfWorldBoredom 2d ago

Your headline is misleading. You make 10 minutes sounds small and 60% sound large. 

But the total time was 24 minutes vs 14 minutes. 24 minutes is 71% longer than 14 minutes.

1

u/anoncaatyee 2d ago

faster typing can hide slower understanding. i'd love a follow-up that measures the whole loop: initial task, first bug fix, then a change a week later without the original chat. the interesting question is whether the time saved at creation survives contact with maintenance.

1

u/BarathKanna 1d ago

This matches what I see. When you write code, you build the mental model while typing. When you accept generated code, you skip that step and pay for it later during debugging, with interest.

The fix isn't avoiding the chat, it's paying the cost up front on purpose. Before accepting a chunk, write down in one line what each branch should do, then ask the model for the inputs that would break it. Better yet, write one failing test yourself before you let it implement anything. That forces the mental model to exist.

Off-by-one mutations are also the easy ones. The real tax shows up in state and lifecycle bugs, where nobody ever understood the flow, including the model.

1

u/synth_mania 10h ago edited 10h ago

I don't like how we are comparing relative with absolute measures.

What if 10 minutes faster is ≥ 60% x (time to find bug) faster? It could concievably be the case, depending on the exercise. The headline right now is too vague to draw any conclusions because it could go wither way, so it invites the reader to assume the case that suits their prejudices. 

A phrase like "saved ~10 minutes writing, cost ~23 seconds per bug to debug" presents the tradeoff much more transparently. 

2

u/[deleted] 3d ago

[removed] — view removed comment

4

u/joey_bag_of_anuses 3d ago

Just FYI, if you are a real human that wrote this, you sound just like AI.

1

u/bit_night 2d ago

The part nobody wants to hear

1

u/ChatGPTCoding-ModTeam 2d ago

This post or comment has been removed for the following reason:

Rule 6: No AI Slop

No raw AI output or low-value walls of text. AI for grammar/clarity is fine.

You can read the full subreddit rules here: https://www.reddit.com/r/ChatGPTCoding/about/rules/

If you feel this removal was made unfairly, please contact the moderators through modmail.