Live data from Hacker News

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

news.ycombinator.com

271–280 of 491 posts

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

#271

Earlier quoted context omitted.

This is just meaningless knee-jerking, try making an actual argument. At least the GP is arguing that more use of AI leads to loss of personal coding skills. It's unclear at this point what level AI will grow to, i.e. it could hit a hard wall at 70% of a good programmer's ability, and in that case you would really want those personal coding skills since they'll be worth a lot. It could also far exceed a good programm…

"This is just meaningless knee-jerking," Your point is valid. "AI leads to loss of personal coding skills" Unfortunately, I can no longer do long division. No one will pay me to do long division and I have a calculator now. I could stay sharp at long division for a hobby though. Keep those for loops sharp if you want, but I don't see people paying you to hand code. Eventually, it will just be a liability. (like not u…

LLMs aren't calculators; for example, your calculator always gives you the same outputs given the same inputs.

Long division is a pretty simple algorithm that you can easily and quickly relearn if needed even your LLM of choice can likely explain that to you given there's plenty of writing about it in books and on the internet.

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

#272
I have never once said "Go build feature x" and let it run off. Not saying you do, but I feel like this is how a lot of people interact with these tools. I have a very conversational style of building with these tools, and I'm very blunt with them when I think they're wrong, since I'm fairly experienced and I can smell when something is seemingly wrong with the model's thinking.

I typically have a discussion about how I want the architecture to be and my exact desired end state. I make the model repeat back to me what I want and have it produce the plan to the degree I am happy with. I typically do not have it work in building large amorphous systems, I work with and have it plan subsystems of the overall system I'm building.

A lot of my discussion with the model is tradeoffs on the structure I'm imagining and methods it might know. My favorite sentence to send Claude right now "Is go google this." because I almost never take its first suggested response at face value.

I also watch every change and cancel and redirect ones I do not like. I read code very fast and like the oversight, because even small stupidities stack up.

The workflow is highly iterative and I make changes frequently, my non AI workflow was like this too. Write, compile, test, tweak and repeat.

I like this workflow a lot because I feel I am able to express my designs succinctly and get to a place I'm happy with with much less writing than a lot of the actual code itself which in many cases is not an interesting problem, but work that needs to happen for a working system at all.

I do wind up taking over, but feel less than I used to, in edges where its clear there is not a lot of training data or I'm working on something fairly novel or lower level.

I work in Python, Rust and Typescript (Rust by far most often) and the majority of my work is technically challenging but at the systems design level maybe not low level systems programming challenging. Think high concurrency systems and data processing, training models, and some web dev.

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

#273

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 The few times I've done that, the agent eventually faced a problem/bug it couldn't solve and I had to go and read the entire codebase myself. Then, found several subtle bugs (like writing private keys to disk even when that was an explicit instruction not to). Eventually ended up re…

You made the mistake of looking at the code, though. If you didn't look at the code, you wouldn't have known those bugs existed.

fixing code now is orders of magnitude cheaper than fixing it in month or two when it hits production.

which might be fine if you're doing proof of concept or low risk code, but it can also bite you hard when there is a bug actively bleeding money and not a single person or AI agent in the house that knows how anything work

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

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

This is sarcasm right?

I wish, that's dev brain on AI sadly.

We've been unfucking architecture done like that for a month after the dev that had hallucination session with their AI left.

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

#275

I have never once said "Go build feature x" and let it run off. Not saying you do, but I feel like this is how a lot of people interact with these tools. I have a very conversational style of building with these tools, and I'm very blunt with them when I think they're wrong, since I'm fairly experienced and I can smell when something is seemingly wrong with the model's thinking. I typically have a discussion about ho…

To add to this, I find talking to it about code quality or architecture issues can work quite well. Just treating it like another developer. Saying, “I’m not happy with the way the project is going because of X, and Y” and then making a plan for how to get things back on track. Maybe putting a complete rewrite on the table, or maybe just having it record the agreed code style principles in CLAUDE.md, etc

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

#276
post #61

Earlier quoted context omitted.

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.

and the other problem - when they see something is wrong/out of date, they don't update it...

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

#277

Earlier quoted context omitted.

I should not have to fight tooling, especially the supposedly "intelligent" one. What's the point of it, if we have to always adapt to the tool, instead of the other way around?

It's a tool. The first time you used a shell you had to learn it. The first time you used a text editor you had to learn it. You can learn how to use it, or you can put it down if you think it doesn't bring you any benefit.

even shell remembers my commands...

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

#278

This may sound strange but here is how I define my flow. 1. Switch off your computer. 2. Go to a nice Park. 3. Open notebook and pen, and write prompts that are 6-8 lines long on what task you want to achieve, use phone to google specific libraries. 4. Come back to your PC, type those prompts in with Plan mode and ask for exact code changes claude is going to make. 5. Review and push PR. 6. Wait for your job to be au…

oh my god, i am going to give this a go. thank you.

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

#279

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…

One of the things you get an intuition for after using these systems is when to start a new conversation, and the basic rule of thumb is “always.” Use a conversation for one and only one task or question, and then start a new one. For longer projects, have the LLM write down a plan or checklist, and then have it tackle each step in a new conversation. The LLM context collapse happens well before you hit the token lim…

[dead]

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

#280
post #15
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…

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 VoiceInk (needed some patches to get it to compile but Claude figured it out) and the Parakeet V3 model. It’s really good!
Post reply on HN