I am probably going to get downvoted to oblivion for this but if you’re going to have AI write your code, you’ll get the most mileage out of letting it do its thing and building tests to make sure everything works. Don’t look at the code it generates - it’s gonna be ugly. Your job is to make sure it does what it’s supposed to. If there’s a bug, tell it what’s wrong and to fix the bug. Let it wade through its own crap…
Ask HN: How can I get better at using AI for programming?
291–300 of 491 posts
Re: Ask HN: How can I get better at using AI for programming?
#2921000s of files.
I had tried cursor, claude code, gemini cli, openai codex and all sorts of vscode based idea (like windsurf, antigravity etc). All of them get overwhelmed when there is something to implement or change in the codebase primarily due to the amount of code.
But I like aider. I had better capabilities and is controllable, you can try. And if you use it with latest claude sonnet or gemini 2.5 pro it will be most accurate. Adding files is a manual process but it has nearly 100% code accuracy.
And it will never change anything without your knowledge.
You can try it.
Re: Ask HN: How can I get better at using AI for programming?
#293Hey, Boris from the Claude Code team here. A few tips: 1. If there is anything Claude tends to repeatedly get wrong, not understand, or spend lots of tokens on, put it in your CLAUDE.md. Claude automatically reads this file and it’s a great way to avoid repeating yourself. I add to my team’s CLAUDE.md multiple times a week. 2. Use Plan mode (press shift-tab 2x). Go back and forth with Claude until you like the plan b…
Some things I found from my own interactions across multiple models (in addition to above):
- It's basically all about the importance of (3). You need a feedback loop (we all do). and the best way is for it to change things and see the effects (ideally also against a good baseline like a test suite where it can roughly guage how close or far it is from the goal.) For assembly, a debugger/tracer works great (using batch-mode or scripts as models/tooling often choke on such interactivie TUI io).
- If it keeps missing the mark tell it to decorate the code with a file log recording all the info it needs to understand what's happening. Its analysis of such logs normally zeroes the solution pretty quickly, especially for complex tasks.
- If it's really struggling, tell it to sketch out a full plan in pseudocode, and explain why that will work, and analyze for any gotchas. Then to analayze the differences between the current implementation and the ideal it just worked out. This often helps get it unblocked.
Re: Ask HN: How can I get better at using AI for programming?
#294Earlier quoted context omitted.
Yes, you have to learn those things. LLMs are hard to use. So are animals, but we've used dogs and falcons and truffle hunting pigs as tools for thousands of years. Non-deterministic tools are still tools, they just take a bunch more work to figure out.
> So are animals, but we've used dogs and falcons and truffle hunting pigs as tools for thousands of years. Dogs learn their jobs way faster, more consistently and more expressively than any AI tool. Trivially, dogs understand "good dog" and "bad dog" for example. Reinforcement learning with AI tooling clearly seems not to work.
That doesn't match my experience with dogs or LLMs at all.
Re: Ask HN: How can I get better at using AI for programming?
#295I find all AI code to be lower quality than humans who care about quality. This might be ok, I think the assumpt with AI is that we don't need to look at code so that it looks beautiful because AI will look at it .
My experience with generating code with AI is very limited across a limited set of programming languages but whenever it has produced low quality code, it has been able to better itself with further instructions. Like "oh no, that is not the right naming convention. Please use instead" or "the choice of design pattern here is not great because ${reasons}. Produce 2 alternative solutions using x or y" and in nearly ev…
Re: Ask HN: How can I get better at using AI for programming?
#296Re: Ask HN: How can I get better at using AI for programming?
#297Always remember that these agents are just LLMs running tools in a loop and treat them as such.
[1] https://www.skeptrune.com/posts/prompting-the-agent-loop/
Re: Ask HN: How can I get better at using AI for programming?
#298Re: Ask HN: How can I get better at using AI for programming?
#299Using voice transcription is nice for fully expressing what you want, so the model doesn't need to make guesses. I'm often voicing 500-word prompts. If you talk in a winding way that looks awkward when in text, that's fine. The model will almost certainly be able to tell what you mean. Using voice-to-text is my biggest suggestion for people who want to use AI for programming (I'm not a particularly slow typer. I can…
My go-to prompt finisher, which I have mapped to a hotkey due to frequent use, is "Before writing any code, first analyze the problem and requirements and identify any ambiguities, contradictions, or issues. Ask me to clarify any questions you have, and then we'll proceed to writing the code"
Re: Ask HN: How can I get better at using AI for programming?
#300Claude has been miserable for anything Java related, in my experience. Use it maybe as a cross check for ChatGPT, which is far superior. They both make mistakes, but Claude repeatedly changes course, contradicts itself, or makes suggestions that are basically unusable. I don't understand why conversations here are always focusing on a bad LLM.