Live data from Hacker News

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

news.ycombinator.com

71–80 of 491 posts

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

#71
post #61
post #54

Earlier quoted context omitted.

The Claude MD is like the documentation you hand to a new engineer on your team that explains details about your code that they wouldn't otherwise know. It's not bad to need one.

But that documentation shouldn’t need to be updated nearly every other day.

I certainly could be updating the documentation for new devs very frequently - the problem with devs is that they don't bother reading the documentation.

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

#72
post #44

Earlier quoted context omitted.

> I add to my team’s CLAUDE.md multiple times a week. How big is that file now? How big is too big?

Try to keep it under 1k tokens or so. We will show you a warning if it might be too big. Ours is maybe half that size. We remove from it with every model release since smarter models need less hand-holding. You can also break up your CLAUDE.md into smaller files, link CLAUDE.mds, or lazy load them only when Claude works in nested dirs. https://code.claude.com/docs/en/memory

How do you know what to remove?

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

#73

I 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 every case it produces satisfactory results.

Has this also been your experience?

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

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

> I'm not a particularly slow typer. I can go 70-90 WPM on a typing test. However, this speed drops quickly when I need to also think about what I'm saying. Typing that fast is also kinda tiring, whereas talking/thinking at 100-120 WPM feels comfortable.

This doesn't feel relatable at all to me. If my writing speed is bottlenecked by thinking about what I'm writing, and my talking speed is significantly faster, that just means I've removed the bottleneck by not thinking about what I'm saying.

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

#75
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 add to my team’s CLAUDE.md multiple times a week. How big is that file now? How big is too big?

Something to keep in mind is if your CLAUDE.md file is getting large, consider alternative approaches especially for repeatable tasks. Using slash commands and skills for workflows that are repeatable is a really nice way to keep your rules file from exploding. I have slash commands for code review, and git commit management. I have skills for complex tool interactions. Our company has it's own deployment CLI tool so using skills to make Claude Code an expert at using this tool has done wonders to improve Claude Codes performance when working on CI/CD problems.

I am currently working on a new slash command /investigate that runs triage for an active or past incident. I've had Claude write tools to interact with all of our partner services (AWS, JIRA, CI/CD pipelines, GitLab, Datadog) and now when an incident occurs it can quickly put together an early analysis of a incident finding the right people to involve (not just owners but people who last touched the service), potential root causes including service dependency investigations.

I am putting this through it's paces now but early results are VERY good!

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

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

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

#77
post #61
post #54

Earlier quoted context omitted.

The Claude MD is like the documentation you hand to a new engineer on your team that explains details about your code that they wouldn't otherwise know. It's not bad to need one.

But that documentation shouldn’t need to be updated nearly every other day.

Why not?

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

#78
post #44

Earlier quoted context omitted.

> I add to my team’s CLAUDE.md multiple times a week. How big is that file now? How big is too big?

Try to keep it under 1k tokens or so. We will show you a warning if it might be too big. Ours is maybe half that size. We remove from it with every model release since smarter models need less hand-holding. You can also break up your CLAUDE.md into smaller files, link CLAUDE.mds, or lazy load them only when Claude works in nested dirs. https://code.claude.com/docs/en/memory

1k tokens, google says thats about 750 words. That's actually pretty short, any chance you could post a few samples of instructions or even link to a publicly available file CLAUDE.md you recommend?

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

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

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

#80
post #15

Earlier quoted context omitted.

That's a fun idea. How do you get the transcript into Claude Code (or whatever you use)? What transcription service do you use?

I use Spokenly with local Parakeet 0.6B v3 model + Cerebras gpt-oss-120b for post-processing (cleaning up transcription errors and fixing technical mondegreens, e.g., `no JS` → `Node.js`). Almost imperceptible transcription and processing delay. Trigger transcription with right ⌥ key.

According to Google this is the first time the phrase "technical mondegreens" was ever used. I really like it.
Post reply on HN