←back to thread

548 points kmelve | 3 comments | | HN request time: 0s | source
Show context
swframe2 ◴[] No.45108930[source]
Preventing garbage just requires that you take into account the cognitive limits of the agent. For example ...

1) Don't ask for large / complex change. Ask for a plan but ask it to implement the plan in small steps and ask the model to test each step before starting the next.

2) For really complex steps, ask the model to write code to visualize the problem and solution.

3) If the model fails on a given step, ask it to add logging to the code, save the logs, run the tests and the review the logs to determine what went wrong. Do this repeatedly until the step works well.

4) Ask the model to look at your existing code and determine how it was designed to implement a task. Some times the model will put all of the changes in one file but your code has a cleaner design the model doesn't take into account.

I've seen other people blog about their tricks and tips. I do still see garbage results but not as high as 95%.

replies(20): >>45109085 #>>45109229 #>>45109255 #>>45109297 #>>45109350 #>>45109631 #>>45109684 #>>45109710 #>>45109743 #>>45109822 #>>45109969 #>>45110014 #>>45110639 #>>45110707 #>>45110868 #>>45111654 #>>45112029 #>>45112178 #>>45112219 #>>45112752 #
dontlaugh ◴[] No.45109969[source]
At that point, why not just write the code yourself?
replies(4): >>45110017 #>>45110032 #>>45110323 #>>45111832 #
lucasyvas ◴[] No.45110017[source]
I reached this conclusion pretty quickly. With all the hand holding I can write it faster - and it’s not bragging, almost anyone experienced here could do the same.

Writing the code is the fast and easy part once you know what you want to do. I use AI as a rubber duck to shorten that cycle, then write it myself.

replies(3): >>45110095 #>>45110162 #>>45112850 #
jprokay13 ◴[] No.45110162{3}[source]
I am coming back to this. I’ve been using Claude pretty hard at work and for personal projects, but the longer I do it, the more disappointed I become with the quality of output for anything bigger than a script. I do love planning things out and clarifying my thoughts. It’s a turbocharged rubber duck - but it’s not a great engineer
replies(3): >>45110204 #>>45110349 #>>45112391 #
1. searene ◴[] No.45112391{4}[source]
Me too. I’ve been playing with various coding agents such as Cursor, Claude Code, and GitHub Copilot for some time, and I would say that their most useful feature is educating me. For example, they can teach me a library I haven’t used before, or help me debug a production issue. Then I would choose to write the code by myself after I’ve figured everything out with their help. Writing code by myself is definitely faster in most cases.
replies(1): >>45114629 #
2. bootsmann ◴[] No.45114629[source]
> For example, they can teach me a library I haven’t used before.

How do you verify it is teaching you the correct thing if you don't have any baseline to compare it to?

replies(1): >>45122650 #
3. searene ◴[] No.45122650[source]
You are right, I don't have any baseline. I just try it and see if it works. One good thing about the software field is that I can compile and run the code for verification. It may not be optimal, but at least it's testable.