this post was submitted on 05 Feb 2025
165 points (82.1% liked)

Technology

61632 readers
7160 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] chaosCruiser@futurology.today 4 points 9 hours ago* (last edited 9 hours ago) (1 children)

Here’s a bit of code that’s supposed to do stuff. I got this error message. Any ideas what could cause this error and how to fix it? Also, add this new feature to the code.

Works reasonably well as long as you have some idea how to write the code yourself. GPT can do it in a few seconds, debugging it would take like 5-10 minutes, but that’s still faster than my best. Besides, GPT is also fairly fluent in many functions I have never used before. My approach would be clunky and convoluted, while the code generated by GPT is a lot shorter.

If you’re well familiar with the code you’ve working on, GPT code will be convoluted by comparison. If so, you can ask GPT for the rough alpha version, and you can do the debugging and refining in a few minutes.

[–] Windex007@lemmy.world -2 points 9 hours ago (1 children)

That makes sense as long as you're not writing code that needs to know how to do something as complex as ...checks original post... count.

[–] TimeSquirrel@kbin.melroy.org 2 points 7 hours ago

It can do that just fine, because it has seen enough examples of working code. It can't directly count correctly, sure, but it can write "i++;", incrementing a variable by one in a loop and returning the result. The computer running the generated program is going to be doing the counting.