Live data from Hacker News

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

news.ycombinator.com

191–200 of 491 posts

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

#191
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 number of times I’ve written “read your own fucking Claude.md file” is a bit too numerous.

“You’re absolutely right! I see here you don’t want me to break every coding convention you have specified for me!”

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

#192
post #168
post #160

Earlier quoted context omitted.

The real secret to agent productivity is letting go of your understanding of the code and trusting the AI to generate the proper thing. Very pro agent devs like ghuntley will all say this. And it makes sense. For most coding problems the challenge isn’t writing code. Once you know what to write typing the code is a drop in the bucket. AI is still very useful, but if you really wanna go fast you have to give up on you…

That's just irresponsible advice. There is so little actual evidence of this technology being able to produce high quality maintainable code that asking us to trust it blindly is borderline snake-oil peddling.

Not borderline - it is just straight snake-oil peddling.

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

#193

Earlier quoted context omitted.

Manually styling two similar things the same way is a code smell. Ask the ai to make common components and use them for both instead of brute forcing them to look similar.

Yeah, I thought about this in that case. I tend to think the way you do to the extent that it is sometimes a source of conflict with other people I work with. These navbars are similar but not the same, both have a pager but they have other things, like one has some drop downs and the other has a text input. Styled "the same" means the line around the search box looks the same as the lines around the numbers in the p…

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/... That’s what slots are for

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

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

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.

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

#195

Earlier quoted context omitted.

Yeah, but what did you produce with it in the end? Show us the end result please.

I cannot show it because the code belongs to my employer.

Ah yes of course. But no one asked for the code really. Just show us the app. Or is it some kinda super-duper secret military stuff you are not even supposed to discuss, let alone show.

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

#197

Earlier quoted context omitted.

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…

Yeah, but what did you produce with it in the end? Show us the end result please.

I've been writing an experimental pipeline-based web app DSL with Claude Code for the last little while in my spare time. Sort of bash-like with middleware for lua, jq, graphql, handlebars, postgres, etc.

Here's an already out of date and unfinished blog post about it: https://williamcotton.com/articles/introducing-web-pipe

Here's a simple todo app: https://github.com/williamcotton/webpipe/blob/webpipe-2.0/to...

Check out the BDD tests in there, I'm quite proud of the grammar.

Here's my blog: https://github.com/williamcotton/williamcotton.com/blob/mast...

It's got an LSP as well with various validators, jump to definitions, code lens and of course syntax highlighting.

I've yet to take screenshots, make animated GIFs of the LSP in action or update the docs, sorry about that!

A good portion of the code has racked up some tech debt, but hey, it's an experiment. I just wanted to write my own DSL for my own blog.

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

#198
post #38

> prompting just isn't able to get AI's code quality within 90% of what I'd write by hand Tale as old as time. The expert gets promoted to manager, and the replacement worker can’t deliver even 90% of what the manager used to. Often more like 30% at first, because even if they’re good, they lack years of context. AI doesn’t change that. You still have to figure out how to get 5 workers who can do 30-70% of what you c…

> But generally people let their agent make whatever change it makes and then wonder why trains are flying off the tracks.

IMO, this is the biggest issue. Well, along with just straight up ignoring what you tell it and doing whatever it thinks should be done.

But, to answer the actual thread question: Make it work (all the tests pass) then make it right is the way I'm getting quality work out of the robots. As long as you watch them to make sure they don't either change the tests to pass on buggy code or change the code to pass on buggy tests (yes, Claude is quite proficient and eager to do both) then the code gets better and better as new stuff is added and the 'flow of computation' is worked out.

Oh, and have an actual plan to follow so they don't get distracted at the first issue and say they're finished because they fixed some random unrelated bug. I've also found it helpful to have them draft up such a plan while they're knee deep in that section of the code for related work so they don't have to figure it all out again from scratch and try to add a few extra levels of abstraction just because.

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

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

Hey Boris from the Claude Code team - could you guys please be so kind so as to stop pushing that narrative about CLAUDE.md, either yourselves or through influencers and GenAI-grifters? The reason being, it is simply not true. A lot of the time the instructions will be ignored. Actually, the term "ignored" is putting the bar too high, because your tool does not intentionally "ignore", not having sentience and knowled…

CLAUDE.md is read on session startup.

If you're continually finding that it's being forgotten, maybe you're not starting fresh sessions often enough.

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

#200
Soft plug: take a look at https://github.com/tilework-tech/nori-profiles

I've spent the last ~4 months figuring out how to make coding agents better, and it's really paid off. The configs at the link above make claude code significantly better, passively. It's a one-shot install, and it may just be able to one-shot your problem, because it does the hard work of 'knowing how to use the agents' for you. Would love to know if you try it out and have any feedback.

(In case anyone is curious, I wrote about these configs and how they work here: https://12gramsofcarbon.com/p/averaging-10-prs-a-day-with-cl...

and I used those configs to get to the top of HN with SpaceJam here: https://news.ycombinator.com/item?id=46193412)

Post reply on HN