Coding and GenAI – an ideal match

8

October

2024

No ratings yet.

I remember my first assignment with RStudio in the Business Information course in the first year of my bachelor’s (in 2021). I had no experience with coding so I had to learn this from scratch. After crying and asking my lovely dad for help, I managed to write some code. This was all fun and games until I encountered my very first error code – and soon after many more followed. So of course, I stressed out and I didn’t know what to do. I started searching on Google and clicked on a number of webpages. And before I knew it, I was in deep into Stack Overflow. When I finally managed to find a post describing the same problem I encountered, I figured out that that the specific solution did not entirely work for my code, so the cycle repeated itself again. This process of resolving errors was time-consuming and definitely frustrating going from webpage to webpage and then going back to my code to see that the solution did not apply to my situation.

My journey

In 2022, ChatGPT entered the scene. Back then, I was on exchange in Hong Kong. While calling my dad, he mentioned something about an “AI bot who can generate everything you want it to generate”. I brushed this off seeing it as something similar to the Metaverse: the hype will last for a couple of months and then it will just be over. But when I came back home months later, everyone was still talking about this ‘ChatGPT’. One day, I tried putting my error codes in ChatGPT and it came up with a clear solution and even provided example code! How convenient! Now, I still use ChatGPT to take a look at my error codes.

Reflection

As you, the reader, might have noticed, I am very satisfied with using GenAI for coding. As I now genuinely love coding in RStudio, I still write my code myself. However, when encountering error codes, ChatGPT is definitely my ‘bestie’. Solving an error code is not the scope of writing code or running analyses. By using GenAI, it saves me a ton of time. No need to dive into the deep rabbit holes of Stack Overflow. I just provide my code and the error code to the GenAI bot and it will help me instantly. How amazing! It still blows my mind.

You still need to use your brain!

Using GenAI for coding does not, however, mean that you just let ChatGPT write your code and you just shut off your brain. In my opinion, it is still crucial to use a critical attitude when using GenAI for coding purposes. You can let the bot write all the code you want and resolve all of your problems every time, but if you don’t understand what the output is, using GenAI might as well be pointless. In my opinion, learning from the output from GenAI is the key to success. By learning from the output, you can prevent the same error codes next time you write code.

Thus, in my opinion GenAI is definitely useful for coding. No more wasting time on Stack Overflow as error codes are resolved in just a couple of seconds thanks to GenAI. Combine this with maintaining a critical mind and you might be able to hack a government soon.

Questions for the readers

As readers, are you as enthusiastic as me about using GenAI for coding? What are your experiences? Or have you encountered any difficulties by using GenAI for coding?

Please rate this

Leave a Reply

Your email address will not be published. Required fields are marked *