31
Finally (programming.dev)
submitted 1 year ago* (last edited 1 year ago) by likeaduck@programming.dev to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] Xanvial@lemmy.one 2 points 1 year ago

Most of the codes I copied from GPT doesn't even work Seems I spent more time fixing it compared to thinking it myself

[-] FaceDeer@kbin.social 1 points 1 year ago

Often when I tell ChatGPT what error its code produced it will immediately figure out what the bug was and fix it.

[-] lackthought@lemmy.sdf.org 1 points 1 year ago

interacting with chatgpt is a learned skill

i’ve used it several times and while the initial code may have some issues you can get them cleared up with a few direct follow ups

[-] FaceDeer@kbin.social 1 points 1 year ago

I recall reading a while back of one person's strategy, whenever ChatGPT generates code for him he immediately tells ChatGPT "there's a bug in that code" (without checking or specifying). It'll often find one.

Another approach I've heard of is to tell ChatGPT that it's supposed to roleplay two roles when generating code, a programmer and a code reviewer. The code reviewer tidies up the initial code and fixes bugs.

Since often ChatGPT's code works fine for me I don't usually bother with these steps initially, since I'm usually just wanting a quick and dirty script for a one-off task the quality doesn't matter much in my case.

[-] Pons_Aelius@kbin.social 1 points 1 year ago

Seems I spent more time fixing it compared to thinking it myself

AI code is just bad code written by someone else that I now have to fix, and we all know the one job every coder loves is fixing code written by someone who you cannot ask: "why did you do it this way?"

[-] Sigmatics@lemmy.ca 1 points 1 year ago

It can be helpful though if you just need to find the right library function of proper syntax in a foreign language. Usually faster than a search

this post was submitted on 14 Jul 2023
31 points (97.0% liked)

Programmer Humor

19315 readers
40 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS