Live data from Hacker News

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

news.ycombinator.com

131–140 of 491 posts

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

#131
The key insight most people miss: AI isn't a code generator, it's a thinking partner. Start by defining the problem precisely in plain English before asking it to code. Use it for refactoring and explaining existing code rather than generating from scratch. That's where you get the 10x gains.

Also, treat bad AI suggestions as learning opportunities - understand why the code is wrong and what it misunderstood about your requirements.

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

#132
post #121

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…

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?

That explains why it happens, but doesn't really help with the problem. The expectation I have as a pretty naive user, is that what is in the .md file should be permanently in the context. It's good to understand why this is not the case, but it's unintuitive and can lead to frustration. It's bad UX, if you ask me.

I'm sure there are workarounds such as resetting the context, but the point is that god UX would mean such tricks are not needed.

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

#133

Earlier quoted context omitted.

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

A lot of that would be people working on proprietary code I guess. And most of the people I know who are doing this are building stuff, not streaming or making videos. But I'm sure there must be content out there—none of this is a secret. There are probably engineers working on open source stuff with these techniques who are sharing it somewhere.

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

#134
I’ve been doing a rewrite of some file import type stuff, using a new common data model for storage, and I’ve taken to basically pasting in the old code, commented out and telling it to fill the new object using the commented out content as a guide. This probably got me 80% of the way? Not perfect, but I don’t think anything really is.

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

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

This is a great drill down.

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

#136

Earlier quoted context omitted.

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

I would like to see it as well. It seems to me that everybody sells shovels only. But nobody haven’t seen gold yet. :)

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

#137
post #55

Go slowly. Shoot for a 10% efficiency improvement, not 10x. Go through things as thoroughly as if writing by hand, and don't sacrifice quality for speed. Be aware of when it's confidently taking you down a convoluted path and confidently making up reasons to do so. Always have your skeptic hat on. If something seems off, it probably is. When in doubt, exit the session and start over. I still find chat interface gener…

> A 10% improvement every month gets to be a 10x improvement in (math...)

1.1^24=9.85, so yeah, if you could reliably get a 10% speed-up each month, you’d get to 10x in roughly 2 years. (But I’d expect the speed-up per month to be non-linear.)

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

#138

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]

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

#140
post #121

Earlier quoted context omitted.

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?

That explains why it happens, but doesn't really help with the problem. The expectation I have as a pretty naive user, is that what is in the .md file should be permanently in the context. It's good to understand why this is not the case, but it's unintuitive and can lead to frustration. It's bad UX, if you ask me. I'm sure there are workarounds such as resetting the context, but the point is that god UX would mean s…

Yeah the current best approach to aggressively compact and recreate context by starting fresh. It’s awkward and I wish I didn’t have to.
Post reply on HN