Live data from Hacker News

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

news.ycombinator.com

281–290 of 491 posts

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

#281
get out of the way, maybe?

before getting into any implementation, i'd get claude to read and document the starting code, and propose its own idiomatic way to rewrite it to svelte. this is a good use for plan mode, and also a spot where you could walk through with claude to put documentation examples of what you consider good and bad, so it can monkey-see, monkey do.

the other thing that makes it go brrrr is to add lots of feedback loops. unit tests, e2e tests, linters, etc. make sure it can pass everything before it shows you anything.

my overall process would be to

1. go through plan mode for documentation and test writing

2. have claude lay out the plan into steps

3. project setup for builds/feedback loops, deploys, etc

4. for each step in that plan, run back through plan mode to clear up any confusions for the component (also record those in docs) and then let it rip on implementation until its ready for a commit.

claude might take a long time writing the code between qna sessions, but it can all be async so the 15-20min doesnt matter much

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

#282

Earlier quoted context omitted.

I’ve yet to see any real work get done with agents. Can you share examples or videos of real production level work getting done? Maybe in a tutorial format? My current understanding is that it’s for demos and toy projects

I use GitHub Copilot in Intellij with Claude Sonnet and the plan mode to implement complete features without me having to code anything. I see it as a competent software developer but one that doesn't know the code base. I will break down the tasks to the same size as if I was implementing it. But instead of doing it myself, I roughly describe the task on a technical level (and add relevant classes to the context) an…

My experience is that GitHub Copilot works much better in VS Code than Intellij. Now I have to open them together to work on one single project.

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

#283

Earlier quoted context omitted.

> 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. Sure, for 4/5 interactions then will ignore those completely :) Try for yourself: add to CLAUDE.md an instruction to always refer to you as Mr. bcherny and it will stop very soon. Coincidentally at that…

Yeah, adherence is a hard problem. It should be feeling much better in newer models, especially Opus 4.5. I generally find that Opus listens to me the first time.

I’ve felt that the LLM forgets CLAUDE.md after 4-5 messages. Then, why not reinject CLAUDE.md into the context at the fifth message?

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

#284
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).

I ask claude to dump the plan into a file and ensure that the tasks have been split into subtasks such that the description of each subtask meets the threshold such that the probability of the LLM misinterpreting is very low.

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

#285
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 - that’s not your tech debt. This is a new paradigm. No one is going to be writing code anymore, just almost like no one is checking the assembly output of a compiler anymore.

This is just my experience. I’ve come to the conclusion that if I try to get AI to write code that works and is elegant, or if I’m working inside the same codebase that AI is adding cruft to, I don’t get much of a speed up. Only when I avoid opening up a file of code myself and let AI do its thing do I get the 10x speed up.

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

#286
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…

> 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. Sure, for 4/5 interactions then will ignore those completely :) Try for yourself: add to CLAUDE.md an instruction to always refer to you as Mr. bcherny and it will stop very soon. Coincidentally at that…

Yes. One of my system-wide instructions is “Read the Claude.md file and any readme in the current directory, then tell me how you slept.”

If Claude makes a yawn or similar, I know it’s parsed the files. It’s not been doing so the last week or so, except for once out of five times last night.

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

#287
post #170
post #124

AI programming, for me, is just a few simple rules: 1. True vibe coding (one-shot, non-trivial, push to master) does not work. Do not try it. 2. Break your task into verifiable chunks. Work with Claude to this end. 3. Put the entire plan into a Markdown file; it should be as concise as possible. You need a summary of the task; individual problems to solve; references to files and symbols in the source code; a work li…

> it should be as concise as possible What’s more concise than code? From my experience, by the time I’ve gotten an English with code description accurate enough for an agent I could have done it myself. Typing isn’t a hard part. LLMs/agents have many other uses, but if you’re not offloading your thinking you’re not really going any faster wrt letting them write code via a prompt.

I find it quite interesting; there seems to be a set of AI enthusiasts who heavily offload thinking onto the LLM. There has to be difference in how they function, as I find as soon as I drift into letting the LLM think for me, productivity plummets.

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

#288

Earlier quoted context omitted.

Have been using Opus 4.5 and can confirm this is how it feels, it just works.

It also works your wallet

Just wait a few months -- AI has been getting more affordable _very_ quickly

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

#290

Earlier quoted context omitted.

Have been using Opus 4.5 and can confirm this is how it feels, it just works.

It also works your wallet

Highly recommend Claude Max, but I also want to point out Opus 4.5 is the cheapest Opus has ever been.

(I just learned ChatGPT 5.2 Pro is $168/1mtok. Insanity.)

Post reply on HN