logoalt Hacker News

mattbeeyesterday at 12:35 PM6 repliesview on HN

Pasting a big batch of new code and asking Claude "what have I forgotten? Where are the bugs?" is a very persuasive on-ramp for developers new to AI. It spots threading & distributed system bugs that would have taken hours to uncover before, and where there isn't any other easy tooling.

I bet there's loads of cryptocurrency implementations being pored over right now - actual money on the table.


Replies

merlindruyesterday at 6:48 PM

I like biasing it towards the fact that there is a bug, so it can't just say "no bugs! all good!" without looking into it very hard.

Usually I ask something like this:

"This code has a bug. Can you find it?"

Sometimes I also tell it that "the bug is non-obvious"

Which I've anecdotally found to have a higher rate of success than just asking for a spot check

show 4 replies
wat10000yesterday at 10:12 PM

You just have to be careful because it will sometimes spot bugs you could never uncover because they’re not real. You can really see the pattern matching at work with really twisted code. It tends to look at things like lock free algorithms and declare it full of bugs regardless of whether it is or not.

dvfjsdhgfvyesterday at 1:12 PM

> Pasting a big batch of new code and asking Claude "what have I forgotten? Where are the bugs?"

It's actually the main way I use CC/codex.

show 2 replies
sligyesterday at 3:47 PM

> "Codex wrote this, can you spot anything weird?"

tostiyesterday at 5:08 PM

[dead]

aiedwardyiyesterday at 10:42 PM

[dead]