← Back to context

Comment by maerch

7 days ago

> My experience is it often generates code that is subtlety incorrect. And I'll waste time debugging it.

> […]

> Or it'll help me debug my code and point out things I've missed.

I made both of these statements myself and later wondered why I had never connected them.

In the beginning, I used AI a lot to help me debug my own code, mostly through ChatGPT.

Later, I started using an AI agent that generated code, but it often didn’t work perfectly. I spent a lot of time trying to steer the AI to improve the output. Sometimes it worked, but other times it was just frustrating and felt like a waste of time.

At some point, I combined these two approaches: I cleared the context, told the AI that there was some code that wasn’t working as expected, and asked it to perform a root cause analysis, starting by trying to reproduce the issue. I was very surprised by how much better the agent became at finding and eventually fixing problems when I framed the task from this different perspective.

Now, I have commands in Claude Code for this and other due diligence tasks, and it’s been a long time since I last felt like I was wasting my time.