ChatGPT Isn’t as Good at Coding as We Thought::undefined

  • drkt@feddit.dk
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    2
    ·
    1 year ago

    Who are ‘we’? Surely not anyone who’s ever used it?

  • _e____b@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    arrow-down
    1
    ·
    1 year ago

    I don’t know how others are using chatGPT for coding, but I found I get the best results when starting small and iterate over the results few times. Like:

    1. write a function to make a GET request;
    2. write a function to handle this example JSON;
    3. write a function that combines the first two;
    4. etc etc

    I use it mostly for Typescript, Bash and Clojure and results vary from good to OK (Clojure). The whole process is way faster if you use a tool like sGPT.

  • Immersive_Matthew@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    2
    ·
    1 year ago

    I am using ChatGPT 4+ with the code interpreter to code c# scripts inside my Unity project and it works and to be unreliable, b it about a month ago when the code interpreter came out it became very useful. Like it rarely makes a compile error and when it does it often fixes it with no further issues. The code it writes is solid and it has even been able to write multiple, interacting scripts with singletons, etc to do all sorts of more complex things in Unity. It has saved my so much time I am blown away. Some of these scripts are 200-300 lines. Beyond 300 it seems to have many issues though al really only good for the smaller stuff, which is mostly what Unity tends to be.

    It is also amazing as feeding it error logs and having it tell you the bits that matter and why. Everyone should be using it for this at a minimum.

    I love it, but look forward to the day where it is in my Unity project editor and is able to see all and address all the ridiculous and mundane issues that consume far too much of my time and other developers time. Just finished implementing AssetBundles with it, which triggered many of my scripts needing to be updated, which it did in just a few seconds each. Amazing.

  • JoBo@feddit.uk
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    As who thought? There have been examples of wonky code being posted since the day it went live.

  • Bobby Turkalino@lemmy.yachts
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    2
    ·
    1 year ago

    I asked it to write a bash script which simply read a couple inputs using readline and then ran a couple commands inside an if/else

    It declared a variable that it never used. I pointed out the mistake and asked to remove the line. It simply renamed the variable.

    I’d trust an unpaid intern more

  • wpuckering@lm.williampuckering.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Whoever thought it was good at coding? That’s not what it’s designed for. It might get lucky and spit out somewhat functional code sometimes based on the prompt, but it never constructed any of that itself. Not truly. It’s conceptually Googling what it thinks it needs, copying and pasting together an answer that seems like it might be right, and going “Here, I made this”. It might be functional, it might be pure garbage. It’s a gamble.

    You’re better off just writing your own code from the beginning. It’s likely going to be more efficient anyways, and you’ll properly understand what it does.

  • 1984@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    2
    ·
    1 year ago

    It’s fine. I’ve been using it for all sorts of languages. Some issues with rust though, but that’s because I’m a newbie and I can’t fix the errors chatgpt is producing.

    Python, go, terraform… All great.

  • mom@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    I would say is really capable at HELPING a human with coding tasks, but I found it to be kind of limited and sort of dumb. For example I was able to creare in Flask a “Ticket Management System” Web-App just for fun, but I had to do 90% of the work, and I had to be very specific along every step to make sure the output would do what I wanted and I had to provide very technical details that a beginner won’t really know. I think in the future we will have more capable tools that will create better apps without too much human interaction.

  • daikiki@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    1 year ago

    I’ve experimented a bit with chatGPT, asking it to create some fairly simple code snippets to interact with a new API I was messing with, and it straight up confabulated methods for the API based on extant methods from similar APIs. It was all very convincing, but if there’s no way of knowing that it’s just making things up, it’s literally worse than useless.