this post was submitted on 02 Jul 2023
6 points (100.0% liked)

For all your programming needs

26 readers
1 users here now

A community to discuss programming and or related topics

founded 5 years ago
MODERATORS
 

I’ve tried using ChatGPT for some basic coding syntax/logic, and I’ve had mixed results. Usually not so great.

Wondering if it had access to the whole code base and could better understand the context of the code if it would be better.

What’s your experience been like?

top 4 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 2 years ago* (last edited 2 years ago)

It worked reasonably well for me when I was doing very explicit tdd. Write test function name, get some code to fail, get copilot to add the fix where I expected the fix to be.

Main benefit feels like a long code snippet, but the content isn't good for anything slightly creative.

Particularly, I don't think it's helpful for beginners. It's a complicated tool, and if you don't already know what you are doing, in order to identify and fix its mistakes immediately, it is going to create more problems than solutions.

[–] [email protected] 3 points 2 years ago

It does a great job when it has full access to the code base. I often just write comments for what I want to do and it will guess what I want 90% of the time. It’s also super helpful for writing code that follows some specific format, e.g if i want some test json data with specific fields it will make some and fill them in properly.

[–] [email protected] 2 points 2 years ago

I tried it in the past but didn't really find it that helpful, mostly just for things that are really obvious, like writing a constructor that just copies argument etc. But my main issue is moral because I find the whole concept of using open source code like this quite disgusting. The only time I would consider using something like this again would be with open source alternative.

[–] DarthYodaX 1 points 2 years ago

It’s not bad, it doesn’t always get it right even with access to the whole code base.

It’s super useful though at getting you started with a function just by you adding a descriptive comment and it’s also great for completing repeatable sequences such as log statements.

It’s only like $10 a month, you should give it a try!

load more comments
view more: next ›