• i_am_hungry@meganice.online
    link
    fedilink
    English
    arrow-up
    27
    arrow-down
    1
    ·
    1 year ago

    Are people not getting tired of all this stack overflow praise when that website is complete garbage that marks every question as duplicate of something asked 11 years ago.

    • GenderNeutralBro@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      8
      arrow-down
      2
      ·
      1 year ago

      Which is the greatest use case for ChatGPT.

      It’s been a while since I picked up a new language, but I remember the last time I did, the hardest part was just figuring out how to do trivial things. It’s crazy how long it took me to figure out how to do a simple thing like split a string into fields by a delimiter. I can literally paste a line of code into ChatGTP and say “convert this Python line into JavaScript” and it’ll just do it. Fantastic.

      Or yeah, I could spend five minutes reading the man page to remind myself of strptime’s date format every time I need to format a date. Orrrrrr I can just ask the bot something like How do I format this date to look like "YYYY-MM-DD HH-MM-SS" in python? Wed Oct 25 05:37:04 PDT 2023.

      • joao@aussie.zone
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        Untill it completely makes up a date format that looks reasonable but won’t work.I tried ChatGPT to research, in Rust, how to require at least one feature at compilation time just with Cargo.toml options. Turns out that’s not supported, but that didn’t prevent ChatGPT from trying to gaslight me with some hallucinations about options that would do this. It’s a waste of time when you can’t differentiate hallucinations from recollection, for an experienced dev parsing documentation without this uncertainty should be much more efficient.

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

          It works really well with Python, and just ok with everything else. It had issues with Lua over the summer when I started using it, but that was with gpt3

    • palordrolap@kbin.social
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      1 year ago

      The last I saw, AI models were very good at explaining what code did at a very superficial level, but not why it’s doing that or why it’s written that way.

      I assume it’s gotten better at that since then. (?)

      e.g. They’d be able to write comments for x = 0 along the lines of “set variable x to 0” but not why it’s being done or even why it might be a good idea.

      Deeper question: What can AIs do with obfuscated code? Can they pick that apart and explain it? What if it’s regular code with misleading function names?

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

        I don’t know how it would respond to obfuscated code, but it does a pretty good job explaining why things are being done. I use a set of custom instructions to get responses tailored more for the kind of work I do. Every day I ask what it thinks of ____ and I’ll paste a function for it to review. You’ll get really good results if you give it detailed instructions. I like to ask it to come up with a plan before generating any code for me, so that I can ensure every detail is correct first. It only has an issue if you ask it to make sure no lines are longer then 100 characters, because it can’t do math very well.

        It can rename all of your functions and variables if you ask it to. Tell it not to include placeholders in the output if it starts protesting.