Live data from Hacker News

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

news.ycombinator.com

121–130 of 491 posts

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

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

The Attention algo does that, it has a recency bias. Your observation is not necessarily indicative of Claude not loading CLAUDE.md.

I think you may be observing context rot? How many back and forths are you into when you notice this?

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

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

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 know of many experienced and capable engineers working on complex stuff who are driving basically all their development through agents. This includes production level work. This is the norm now in the SV startup world at least.

You don't just YOLO it. You do extensive planning when features are complex, and you review output carefully.

The thing is, if the agent isn't getting it to the point where you feel like you might need to drop down and edit manually, agents are now good enough to do those same "manual edits" with nearly 100% reliability if you are specific enough about what you want to do. Instead of "build me x, y, z", you can tell it to rename variables, restructure functions, write specific tests, move files around, and so on.

So the question isn't so much whether to use an agent or edit code manually—it's what level of detail you work at with the agent. There are still times where it's easier to do things manually, but you never really need to.

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

#123
post #14
post #10

Using 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…

Thanks for the advice! Could you please share how did you enable voice transcription for your setup and what it actually is?

Spokenly on macOS with Soniox model.

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

#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 list, separated by verification points. Seriously, less is more.

4. Then, just loop: Start a new session. Ask it to implement the next phase. Read the code, ask for tweaks. Commit when you're happy.

Seriously, that's it. Anything more than that is roleplaying. Anything less is not engineering. Keep a list in the Markdown file of amendments; if it keeps messing the same thing up, add one line to the list.

To hammer home the most important pieces:

- Less is more. LLMs are at their best with a fresh context window. Keep one file. Something between 500 and 750 words (checking a recent one, I have 555 words / 4276 characters). If that's not sufficient, the task is too big.

- Verifiable chunks. It must be verifiable. There is no other way. It could be unit tests; print statements; a tmux session. But it must be verifiable.

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

#125

A largely undiscussed part of AI use in code is that it's actually neither easy nor intuitive to learn max effectiveness of your AI output. I think there's a lot of value in using AIs that are dumb to learn what they fail at. The methods I learned using gpt3.5 for daily work still transaltes over to the most modern of AI work. It's easy to understand what makes AI fail on a function or two than understanding that acr…

[deleted]

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

#126

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 know of many experienced and capable engineers working on complex stuff who are driving basically all their development through agents. This includes production level work. This is the norm now in the SV startup world at least. You don't just YOLO it. You do extensive planning when features are complex, and you review output carefully. The thing is, if the agent isn't getting it to the point where you feel like you…

Can you show some example? I feel like there would be streams or YouTube lets plays on this if it was working well

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

#127
My favorite set of tools to use with Claude Code right now: https://github.com/obra/superpowers

1. Start with the ‘brainstorm’ session where you explain your feature or the task that you're trying to complete. 2. Allow it to write up a design doc, then an implementation plan - both saved to disk - by asking you multiple clarifying questions. Feel free to use voice transcription for this because it is probably as good as typing, if not better. 3. Open up a new Claude window and then use a git worktree with the Execute Plan command. This will essentially build out in multiple steps, committing after about three tasks. What I like to do is to have it review its work after three tasks as well so that you get easier code review and have a little bit more confidence that it's doing what you want it to do.

Overall, this hasn't really failed me yet and I've been using it now for two weeks and I've used about, I don't know, somewhere in the range of 10 million tokens this week alone.

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

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

Hah, that's funny. Claude can't help but mess all the comments in the code up even if I explicitly tell it to not change any comments five times. That's literally the experience I had before opening this thread, never mind how often it completely ignores CLAUDE.md.

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

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

100% concur with this as owner of multiple 20k+ LOC repos with between 10-30% unmodified AI code in production

If you treat it like a rubber duck it’s magic

If you think the rubber duck is going to think for you then you shouldn’t even start with them.

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

#130

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;

This is the fastest way to unemployment benefits (if that is the goal).

[deleted]
Post reply on HN