Live data from Hacker News

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

news.ycombinator.com

11–20 of 491 posts

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

#11
post #7

I break everything down into very small tasks. Always ask it to plan how it will do it. Make sure to review the plan and spot mistakes. Then only ask it to do one step at a time so you can control the whole process. This workflow works well enough as long as you're not trying to do anything too interesting. Anything which is even a little bit unique it fails to do very well.

sounds like you're doing all the actual work. why not just type the code as you figure out how to break down the problem? you're going to have to review the output anyway.

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

#12
1. Introduce it to the code base (tell it: we're going to work on this project, project does X is written in language Y). Ask it to look at the project to familiarize.

2. Tell it you want to refactor the code to achieve goal Z. Tell it to take a look and tell you how it will approach this. Consider showing it one example refactor you've already done (before and after).

3. Ask it to refactor one thing (only) and let you look at what it did.

4. Course correct if it didn't do the right thing.

5 Repeat.

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

#13
In addition to what the sibling commenters are saying: Set up guardrails for what you expect in your project's documentation. What is the agent allowed to do when writing unit tests vs say functional tests, what packages it should never use, coding and style templates etc.

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

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

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

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

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

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

[deleted]

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

#18
Here’s how I would do this task with cursor, especially if there are more routes.

I would open a chat and refactor the template together with cursor: I would tell it what I want and if I don’t like something, I would help it to understand what I like and why. Do this for one route and when you are ready, ask cursor to write a rules file based on the current chat that includes the examples that you wanted to change and some rationale as to why you wanted it that way.

Then in the next route, you can basically just say refactor and that’s it. Whenever you find something that you don’t like, tell it and remind cursor to also update the rules file.

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

#19
post #11
post #7

I break everything down into very small tasks. Always ask it to plan how it will do it. Make sure to review the plan and spot mistakes. Then only ask it to do one step at a time so you can control the whole process. This workflow works well enough as long as you're not trying to do anything too interesting. Anything which is even a little bit unique it fails to do very well.

sounds like you're doing all the actual work. why not just type the code as you figure out how to break down the problem? you're going to have to review the output anyway.

It's useful to have the small functions all written.

I program mostly in VBA these days (a little problematic as is a dead leanguage since 2006 and even then it was niche) and I have never recived a correct high level ""main"" sub but the AIs are pretty good at doing small subs I then organize.

And yes, telling me where I make errors, they are pretty good at that

At the end of the day I want reliability and there is no way I can't do what without full review.

The funny thing is that they try to use the """best practices""" of coding where you would reasonably want to NOT have them.

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

#20
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'm not the person you're replying to, but I use Whispering connected to the whisper-large-v3-turbo model on Groq.

It's incredibly cheap and works reliably for me.

I have got it to paste my voice transcriptions into Chrome (Gemini, Claude, ChatGPT) as well as Cursor.

https://github.com/EpicenterHQ/epicenter

Post reply on HN