Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah it's the reason pair programming is nice. Now the bugs need to pass two filters instead of one. Although I suppose LLM's aren't that good at catching my bugs without me pointing them out.


I've found both various ChatGPT and Claude to be pretty good at finding unknown bugs, but you need a somewhat hefty prompt.

Personally I use a prompt that goes something like this (shortened here): "Go through all the code below and analyze everything it's doing step-by-step. Then try to explain the overall purpose of the code based on your analysis. Then think through all the edge-cases and tradeoffs based on the purpose, and finally go through the code again and see if you can spot anything weird"

Basically, I tried to think of what I do when I try to spot bugs in code, then I just wrote a reusable prompt that basically repeats my own process.


It's so interesting that you can tell it to think about a thing and then it does that.

Sounds like a nice prompt to run automatically on PRs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: