Over the last year I’ve been learning Swift and starting to put together some iOS apps. I’d definitely class myself as a Swift beginner.

I’m currently building an app and today I used ChatGPT to help with a function I needed to write. I found myself wondering if somehow I was “cheating”. In the past I would have used YouTube videos, online tutorials and Stack Overflow, and adapted what I found to work for my particular usage case.

Is using ChatGPT different? The fact that ChatGPT explains the code it writes and often the code still needs fettling to get it to work makes me think that it is a useful learning tool and that as long as I take the time to read the explanations given and ensure I understand what the code is doing then it’s probably a good thing on balance.

I was just wondering what other people’s thoughts are?

Also, as a side note, I found that chucking code I had written in to ChatGPT and asking it to comment every line was pretty successful and a. big time saver :D

  • JackbyDev
    link
    English
    18
    edit-2
    1 year ago

    No, it’s not cheating, but also please don’t blindly trust it. Random people on the internet can be wrong too but people can at least correct them if they are. Stuff ChatGPT outputs is fresh for your eyes only.

    Edit: typo

    • @mrkite
      link
      English
      81 year ago

      Agreed. While I’ve never used ChatGPT on an actual project, I’ve tested it on theoretical problems and I’ve never seen it give an answer that didn’t have a problem.

      So I would treat it like any answer on Stack Overflow, use it as a start, but you should definitely customize it and fix any edge cases.

      • Senicar
        link
        fedilink
        English
        21 year ago

        I’ve never used ChatGPT (the workflow sounds tedious) but I have used GitHub copilot for personal stuff. The free ChatGPT has weird rights to your queries, whereas GH copilot doesn’t snarf up your code. It genuinely saves a ton of time if you treat it like an in-line Stack Overflow query. It never gets it 100% right, but it can crap out boilerplate like nobody’s business.

      • JackbyDev
        link
        English
        11 year ago

        It also seems to depend a lot on how popular what you’re asking about is. I asked it some questions about docker and it helped me understand some nuances between different commands in Dockerfiles that I was having trouble with. Docker is pretty widely used. I then asked it some questions about how to use the jpackage command from Gradle and it couldn’t help at all.