Live data from Hacker News

Ask HN: Those with success using GPT-4 for programming – what are you doing?

news.ycombinator.com

31–40 of 109 posts

Re: Ask HN: Those with success using GPT-4 for programming – what are you doing?

#31
I did this experiment (a game) to see what's up and what's down around all this: https://github.com/romland/llemmings.

While there is some GPT4 in there, it's mostly ChatGPT and a small handful of LLaMA solutions.

That project is a contrived scenario and not realistic, but I wanted to experiment with _exactly_ what you are talking about.

Very often I could have done things a lot faster myself, but there is one aspect that was actually helpful, and I did not foresee it. When inspiration gets a bit low and you're not in the "zone"; throwing something into an LLM will very often give me a push to keep at it. Even if what is coming up is mostly grunt work.

The other day I threw together a script to show the commits in a reverse order and filter out (most of) the human commits (glue) over at https://llemmings.com/

Re: Ask HN: Those with success using GPT-4 for programming – what are you doing?

#33

It works well for non-programming tasks, writing the bullshit career development I'm forced to write and crap like this. It's absolutely useless for software development though. I just use Amazon CodeWhisperer as a nice autocomplete but that's it.

Nah. It’s pretty useful for software dev too. Granted, you need to be able to vet the information you’re getting back to an extent, but I can’t even begin to calculate the boost in productivity I’ve had when learning a new language or library since I’ve started using ChatGPT.

Re: Ask HN: Those with success using GPT-4 for programming – what are you doing?

#34
post #29
post #27

Earlier quoted context omitted.

Reading your blogpost it wasn't clear to me how you ran your code through GPT-4. Which prompts did you use?

I brought up the web UI, and said something like this: "Here is a Go source file, see any problems, issues, or suggested bug fixes? " Simple as that. Of course, sometimes I got the "message too big" error. So I pasted bits of the sources files, choosing pieces I thought were reasonably self-contained. I also fed much of my unit tests through it, asking "see any missing test cases?" While some of the answers were not…

I can't believe they are only charging me $20/month for access to GPT-4. I'd pay more for it.

Re: Ask HN: Those with success using GPT-4 for programming – what are you doing?

#35

SQL queries. I am poor at writing SQL queries with bunches of joins. I just show it the table definitions and tell it what I want. Sometimes it doesn't get it quite right (which is why you need some knowledge of what you are asking of it) and I point it out and it fixes it. Regular Expressions. I hate doing regexps. It is excellent at them. Wiki articles for an encyclopedia I'm developing. It is great at this, but oc…

It's also great at fixing SQL queries that the database errors on.

So now, rather than take time to get complex queries right, I quickly sketch a query that's roughly what I want, and tell ChatGPT to "Fix this Sqlite query."

Re: Ask HN: Those with success using GPT-4 for programming – what are you doing?

#36

Top tips: * If you can write it from memory, go ahead and do so. Do not consult GPT-4 * If you know what to do but need to look a few things up - put your best effort into GPT-4. It will flesh it out * If you're using a library that is new, you can copy paste the library examples into GPT-4 and then describe what you want to do. It will give a great starting point

>"If you can write it from memory, go ahead and do so."

I know how to for example divide and multiply on paper. Still I use calculator for that.

Re: Ask HN: Those with success using GPT-4 for programming – what are you doing?

#38
I'm using it for single file programs and building command line utilities, it excels at building apps from scratch, but struggles to follow code it didn't write.

I've had so much success that I built my own command line utility (https://github.com/0xmmo/codemancer) to use in the VSCode terminal and my side projects are now ~70% written by LLM.

Post reply on HN