Live data from Hacker News

Ask HN: How can I get better at using AI for programming?

news.ycombinator.com

81–90 of 491 posts

Re: Ask HN: How can I get better at using AI for programming?

#82
post #79
post #37

Hey, 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…

> Use Opus 4.5. This drives up price faster than quality though. Also increases latency.

Obviously the Anthropic employee advertising their product wants you to pay as much as possible for it.

Re: Ask HN: How can I get better at using AI for programming?

#83
post #3

First you have to be very specific with what you mean by idiomatic code - what’s idiomatic for you is not idiomatic for an LLM. Personally I would approach it like this: 1) Thoroughly define step-by-step what you deem to be the code convention/style you want to adhere to and steps on how you (it) should approach the task. Do not reference entire files like “produce it like this file”, it’s too broad. The document sho…

With the current generation of model, it really isn't necessary to restart every time you don't like something. Certainly this depends on the model. Most of my recent experience is with Claude Sonnet/Opus and Gpt-5.x.

I very often, when reviewing code, think of better abstractions or enhancements and just continue asking for refactors inline. Very very rarely does the model fall off the rails.

I suppose if your unit of work was very large you might have more issues perhaps? Generally though, large units of work have other issues as well.

Re: Ask HN: How can I get better at using AI for programming?

#84
post #79
post #37

Hey, 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…

> Use Opus 4.5. This drives up price faster than quality though. Also increases latency.

Opus 4.5 is significantly better if you can afford it.

They also recently lowered the price for Opus 4.5, so it is only 1.67x the price of Sonnet, instead of 5x for Opus 4.

Re: Ask HN: How can I get better at using AI for programming?

#85
post #60

Earlier quoted context omitted.

I love the name "software carpentry" haha. IMO, I found those specific example tasks to be better handled by my IDE's refactoring features, though support for that is going to vary by project/language/IDE. I'm still more of a ludite when it comes to LLM based development tools, but the best case I've seen thus far is small first bites out of a big task. Working on an older no-tests code base recently, it's been thing…

Funny usually a lot of my code is software plumbing, and gardening. In terms of ai assisted programming. I microanage my ai. Give it specific instructions with single steps. Don't really let it build ehoe files by itself as it usually makes a mess of things, bit it's useful when doing predictable changes and marginally faster than doing it manually.

Yeah I can totally see that working well! I think the main thing is taking small, specific steps that keep you in the loop, and less so about the actual act of typing the specific bytes that are fed into the compiler, though I guess I still find that more efficient for myself than trying to describe what I want ~90% of the time.

Re: Ask HN: How can I get better at using AI for programming?

#86
what really got me moving was dusting off some old text about cognitive styles and team work. Learning to treat agents like a new team-member with extreme tendencies. Learning to observe both my practices and the agents' in order to understand one another's strengths and weaknesses, indicating how we might work better together.

I think this perspective also goes a long way to understanding the very different results different devs get from these tools.

my main approach to quality is to focus agent power on all that code which I do not care about the beauty of: problems with verifiable solutions, experiments, disposable computation. eg my current projects are build/deploy tools, and I need sample projects to build/deploy. I never even reviewed the sample projects' code: so long as they hit the points we are testing.

svelte does not really resonate with me, so I don't know it well, but I suspect there should be good opportunities for TDD in this rewrite. not the project unit tests, just disposable test scripts that guide and constrain new dev work.

you are right to notice that it is not working for you, and at this stage sometimes the correct way to get in sync with the agents is to start again, without previous missteps to poison the workspace. There's good advice in this thread, you might like to experiment with good advice on a clean slate.

Re: Ask HN: How can I get better at using AI for programming?

#87
You can using a single simple step: don't

The more you use IA, the more your abilities decreases, the less you are able to use IA

This is the law of cheese: the more cheese, the more holes; The more holes, the less cheese; Thus, the more cheese, the less cheese;

Re: Ask HN: How can I get better at using AI for programming?

#88
post #37

Hey, 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…

Do you recommend having Claude dump your final plan into a document and having it execute from that piece by piece? I feel like when I do plan mode (for CC and competing products), it seems good, but when I tell it to execute the output is not what we planned. I feel like I get slightly better results executing from a document in chunks (which of course necessitates building the iterative chunks into the plan).

a very common pattern is planner / executor.

yes the executor only needs the next piece of the plan.

I tend to plan in an entirely different environment, which fits my workflow and has the added benefit of providing a clear boundary between the roles. I aim to spend far more time planning than executing. if I notice getting more caught up in execution than I expected, that's a signal to revise the plan.

Re: Ask HN: How can I get better at using AI for programming?

#89
I have a whole workflow for coding with agents.

Get very good at context management (updating AGENTS.md, starting new session, etc).

Embrace TDD. It might have been annoying when Extreme Programming came out 25 years ago, but now that agents can type a lot faster than us, it's an awesome tool for putting guardrails around the agent.

(I teach workshops on best practices for agentic coding)

Post reply on HN