How reliable is AI lke ChatGPT in giving you code that you request?

  • Laage@kbin.social
    link
    fedilink
    arrow-up
    5
    ·
    1 year ago

    I’ve used it a bit to get the framework or boilerplate I need. It’s not a one-click solution!
    What I will do is ask it to generate code for a purpose and then iterate over the suggested code adding and/or modifying specific areas until i have something usable… Depending on the complexity of the code/feature this can take quite a number of iterations. You need to understand the code it gives you!
    Once I feel satisfied I will copy the code to the editor for tweaking and adjusting to my environment.

    I will admit that I’ve been surprised sometimes by the suggestions I’ve been given. Sometimes in a good way, sometimes bad.

    Remember that whatever you feed it will feed the LLM, so don’t give it anything specific to yourself or your organisation.

    • azura@kbin.social
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      It seems like a small thing you said on the side, but it is really important that you actually understand and can explain the code it gives you that you’re copying into your project. Otherwise you’re taking in an unknown, unmaintained and unexplained dependency, and that can lead to problems once that dependency fails.

      • Laage@kbin.social
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Agreed that I should have been clearer…
        Both my statements of it not being a “one-click solution” and the aside about understanding the code was meant to emphasize that very point.