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

  • Beej Jorgensen@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    12
    arrow-down
    2
    ·
    1 year ago

    Programming pays well because it’s hard. Just keep in mind that if AI is making it easy for you, it’s making it easy for a lot of people who could easily replace you.

    Use it as a tool, but know what it’s doing, and be able to do it yourself after you learn from it.

    Personally, I generally struggle through on my own first and then ask it to critique. Great teachers don’t just give you the code to copy.

    By analogy, you need to be able to hand fly this plane when the autopilot dies; those are the pilots who get the jobs.

    • Baldur Nil@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Trying yourself first seems like the best approach. There are people who recommend you not to Google the answer until you have tried all the options and looked at the official documentation as an “exercise” of problem-solving without being fed the answer, cause you won’t always have it.

      I’m in a situation like that. I currently work for a huge bank which requires a lot of custom configurations and using their own framework for a lot of stuff. So, most of the problems people have cannot be searched online as they’re company specific. I see new workers there struggle a lot because they don’t try to understand what’s wrong and just want a fed copy paste solution to make the problem go away.

      • Beej Jorgensen@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I see new workers there struggle a lot because they don’t try to understand what’s wrong and just want a fed copy paste solution to make the problem go away.

        I see that in my students a lot, as well. I’ve been hammering away that the goal (in school, but frankly in general) is not actually to solve the problem. It’s to learn to solve the problem. And that every experience you have, success or failure, is learning to solve problems. The 10 ways you failed to solve this problem all are solutions to other problems that you now know.

        “The expert has failed more times than the beginner has even tried.”

        I fear, however, the pervasive Pride in the Craft that existed 30 years ago is now something observed only by a minority.