Viewing a single comment thread. View all comments

SkylorBeck t1_j2eafqb wrote

I can't believe how many people are trying to use a chat bot to write code and expect it to work. Use a code bot.

23

bortlip t1_j2f1ech wrote

I've actually had better success getting good code out of chat GPT than I have out of the code specific models available on openai's playground.

I'm curious what code bots your are using.

16

mrpoops t1_j2f5f5j wrote

Yup, same here. It also documents it in chatgpt but not in the playground.

The trick, as always, is to modularize. Don’t ask chatgpt for an entire application. Outline the code yourself first. Figure out your data structures/custom objects. Then figure out the functions required to do the work in the application, and how those functions will pass around your objects.

Only after you understand the flow…THEN have chatgpt write all the individual functions. You should know how you want your program to work and what the data looks like anyway. So map it out then have chatgpt do only the tedious programming parts.

5

bortlip t1_j2f75co wrote

Agreed. I also can advance pretty quickly by going back in forth with it. It's like a junior developer that I just dictate to and correct here and there and it does all the typing and puts things together intelligently.

3

SkylorBeck t1_j2f94w2 wrote

Github Copilot. Even just saying it I can feel the comments starting now.

"I tried it for a day. It just makes boilerplate. Not impressed"

It's saved me dozens of hours since I started using it last year.

5

bortlip t1_j2f9oev wrote

No, I'm not looking to start an argument with you, that was a legitimate question.

I'm played with chatGPT and the models in the playground so far. I intend to start playing with copilot soon, but haven't tried it yet.
I really like the ability to go back and forth with the chat aspect and have the AI build the code that way and I am curious how the tab complete will compare to that experience.

3

SkylorBeck t1_j2fa6k0 wrote

I wasn't meaning you, but reddit really has a hate boner for Copilot and anyone who uses it.

The communication aspect is definitely lacking but you can use comments in your code to influence the suggestion. And you can also view alternative suggestions at the same time. Sometimes you need to clarify, or start one line with how exactly you want to go about things. Sometimes I just name the method and it autocompletes it based on the class name and method name. Sometimes it suggests new fields or alternative ways to do something and I change my methods to suit it.

Sometimes it's really hard to tell where the AI started writing and where I stopped. Really does feel like a copilot. I'd estimate anywhere from 40-60% of any given chunk of my code is AI written.

​

Edit for context: I make Minecraft Mods, Unity Games and Java based automation tools.

2

EternalNY1 t1_j2fknkc wrote

My point exactly. There are so many examples of it "failing" to write complex code yet the thing can explain quantum mechanics to you in the form of Shakespere.

And it still does a pretty amazing job with code!

1