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
Edit: Thanks everyone for insightful and considered replies.
I think the general consensus is basically where my head was at - use it as a tool like you would SO or other resources but be aware the code may be incorrect, and the reality is there will be work required to adapt and integrate with your current project (very much like SO) and that’s where you programming skills really come in to play.
I think I still have imposter syndrome when it comes to development, which is maybe where the question was coming from in my mind. :D.
I had similar experiences and nowadays I just ask for sample exemples of how to do stuff in isolation then I piece them together myself.
One example was trying to create some hooks for git to avoid copy-pasting something every commit. After trying to often correct it again and again, I just decided to start fresh and ask for a generic sample. It finally gave me a correct one. But I did the work to customize if for my needs and test it.
The nature of the software I was writing was inter-dependent on other functions, so it needed to understand the surrounding context, which was difficult to coach it on. Its strength is definitely in isolated examples.
I’ve been using Kagi’s Discuss Document feature for some things, like understanding documentation or an API. It’s pretty useful. Also works on videos/files like PDFs.