Most active commenters
  • jaggederest(4)

←back to thread

548 points kmelve | 12 comments | | HN request time: 0.608s | source | bottom
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 #
rco8786 ◴[] No.45110014[source]
I feel like I do all of this stuff and still end up with unusable code in most cases, and the cases where I don't I still usually have to hand massage it into something usable. Sometimes it gets it right and it's really cool when it does, but anecdotally for me it doesn't seem to be making me any more efficient.
replies(2): >>45110252 #>>45112137 #
1. jaggederest ◴[] No.45110252[source]
The key is prompting. Prompt to within an inch of your life. Treat prompts as source code - edit them in files, use @ notation to bring them into the console. Use Claude to generate its own prompts - https://github.com/wshobson/commands/ and https://github.com/wshobson/agents/ are very handy, they include a prompt-engineer persona.

I'm at the point now where I have to yell at the AI once in a while, but I touch essentially zero code manually, and it's acceptable quality. Once I stopped and tried to fully refactor a commit that CC had created, but I was only able to make marginal improvements in return for an enormous time commitment. If I had spent that time improving my prompts and running refactoring/cleanup passes in CC, I suspect I would have come out ahead. So I'm deliberately trying not to do that.

I expect at some point on a Friday (last Friday was close) I will get frustrated and go build things manually. But for now it's a cognitive and effort reduction for similar quality. It helps to use the most standard libraries and languages possible, and great tests are a must.

Edit: Also, use the "thinking" commands. think / think hard / think harder / ultrathink are your best friend when attempting complicated changes (of course, if you're attempting complicated changes, don't.)

replies(4): >>45111018 #>>45111665 #>>45112510 #>>45115398 #
2. shaunxcode ◴[] No.45111018[source]
I am convinced that this comment once read aloud in the cadence of Ginsberg is a work of art!
replies(1): >>45111215 #
3. jaggederest ◴[] No.45111215[source]
Now I'm trying to find a text-to-Ginsberg translator. Maybe he's who I sound like in my head.
4. thayne ◴[] No.45111665[source]
This works fairly well for well defined, repetitive tasks. But at least for me, if you have to put that much effort into the prompt, it is likely easier just to write the code myself.
replies(3): >>45112795 #>>45114458 #>>45114897 #
5. fragmede ◴[] No.45112510[source]
How much voice control have you implemented?
replies(1): >>45122274 #
6. NitpickLawyer ◴[] No.45112795[source]
I've found it works really well for exploration as well. I'll give it a new library, and ask it to explore the library with "x goal" in mind. It then goes and agents away for a few minutes, and I get a mini-poc that more often than not does what I wanted and can also give me options.
7. masto ◴[] No.45114458[source]
Sometimes I spend half an hour writing a prompt and realize that I’ve basically rubber-ducked the problem to the point where I know exactly what I want, so I just write the code myself.

I have been doing my best to give these tools a fair shake, because I want to have an informed opinion (and certainly some fear of being left behind). I find that their utility in a given area is inversely proportional to my skill level. I have rewritten or fixed most of the backend business logic that AI spits out. Even if it’s mostly ok on a first pass, I’ve been doing this gig for decades now and I am pretty good at spotting future technical debt.

On the other hand, I’m consistently impressed by its ability to save me time with UI code. Or maybe it’s not that it saves me time, but it gets me to do more ambitious things. I’d typically just throw stuff on the page with the excuse that I’m not a designer, and hope that eventually I can bring in someone else to make it look better. Now I can tell the robot I want to have drag and drop here and autocomplete there, and a share to flooberflop button, and it’ll do enough of the implementation that even if I have to fix it up, I’m not as intimidated to start.

replies(1): >>45124150 #
8. xenobeb ◴[] No.45114897[source]
I am certain it has much to do with being in the training data or not.

I have loved GPT5 but the other day I was trying to implement a rather novel idea that would be a rather small function and GPT5 goes from a genius to an idiot.

I think HN has devolved into random conversations based on a random % of problems being in the training data or not. People really are having such different experiences with the models based on the novelty of the problems that are being solved.

At this point it is getting boring to read.

9. rco8786 ◴[] No.45115398[source]
Have you made any attempt to quantify your efficiency/output vs writing the code yourself? I've done all of these things you've mentioned, with varying degrees of success. But also everything you're talking about doing is time consuming and eats away at whatever efficiency gain CC claims to offer.
replies(1): >>45122260 #
10. jaggederest ◴[] No.45122260[source]
Days instead of weeks, basically. Hard to truly quantify but I'm bloody minded enough to reimplement things three times to check and even with foresight the AI is faster.
11. jaggederest ◴[] No.45122274[source]
None but it's on the list! Actually using it to prototype a complete audio visual tracking and annotation tool, so feeding it back into itself is a logical next step.
12. theshrike79 ◴[] No.45124150{3}[source]
I've had the Corporate Approved CoPilot + Sonnet 4 write a full working React page for me based on a screenshot of a Figma model. (Not even through an MCP)

It even discovered that we have some internal components and used them for it.

Got me from 0-MVP in less then an hour. Would've easily taken me a full day