ChatGPT: The Double-Edged Sword of SWE

20 Nov 2023

I personally feel that the use of AI in education can either be detrimental or extremely beneficial, depending on the usage. In terms of its use for software engineering, it can be a useful tool for generating ideas, small code snippets, altering dataset formats, and more. In my software engineering endeavors, I have used ChatGPT for all of these tasks. For instance, I copied a dataset formerly using a space as a delimiter, and asked ChatGPT to use a comma as the delimiter instead. It returned exactly what I had needed. However, I would like to solidify my perspective that AI is merely a tool. Software engineering requires much more than what generative AI can do, such as problem solving skills.

ICS 314 (Software Engineering I) and ChatGPT

In ICS 314, there were many times when ChatGPT was useful, and useless in other scenarios. For the experience WODs as well as the in-class practice WODs, I preferred not to use ChatGPT. This is simply because I wanted to solve the problem myself. If I cannot figure it out now, and resort to using generative AI, then I will have learned nothing from this class. However, for the in-class WODs, I found them to be very similar to the practice WODs. For these, I used ChatGPT to generate an often failed solution which I debugged to finish the challenge. This was in the interest of saving time, as it was much faster this way. I already knew how to solve the problem, so it made more sense to finish this challenge as fast as possible and move onto other work. For in-class WODs, I would usually prompt ChatGPT for small code snippets with something like, “In React-Bootstrap, I want a NavBar component that has a logo centered and three nav-links justified to the right.” I would then combine all of the code snippets into my code, and debug the errors.

For my essays in ICS 314, I wrote them all myself. I personally am not a fan of the writing that ChatGPT outputs, as it often will not make sense or have errors. In addition to this, I see no point in writing if it does not come from my heart. The whole point of writing, in my opinion, is to convey your personal ideas in the way that you see fit. Generative AI, like ChatGPT, will never think like me. I do acknowledge, however, that I could prompt ChatGPT with all of the ideas, but I would rather not use it at all for writing purposes.

As far as the final project goes, I did utilize ChatGPT to get work done. A lot of the requirements for the projects are things we have seen or done before, so it made sense to accelerate my workflow with generative AI. ChatGPT is also useful for when I need to learn a new skill. For instance, learning how to implement a way for users to add images to our final project application. I prompted ChatGPT with, “I currently have a web application built with Meteor and React-Bootstrap. For a form where users enter in a recipe, how can I implement a way for users to add images as well?” Although it usually doesn’t work properly the first time, the responses from ChatGPT make everything a little faster. It gives me a crucial starting point to work with, so I waste less time figuring things out in the beginning.

To answer questions in class, on discord, or in the smart-questions channel, I would often use ChatGPT as a way to confirm my ideas before I respond. For instance, when someone asked me how to center a div, I gave a number of answers that I thought could work depending on the context. I asked ChatGPT, “What are some different ways to center a div?” to confirm my ideas, and get new ones as well.

Oftentimes, I will ask ChatGPT to give me an example of using a certain library or function, and write the code for me. I might ask a question similar to, “Give me an example of a subscription to a MongoDB database.” Furthermore, I usually like to have an explanation of the code as well. My prompt now might look like, “Give me an example of a subscription to a MongoDB database and explain each line of the code.”

For documentation of my code, I tend to stray from ChatGPT. This is due to the fact that I like to write comments before I start coding. These comments typically contain the steps to take, and then that becomes my documentation. Even for documentation that is added afterwards, I usually just do it as I code, so there is no need to really use ChatGPT here.

In terms of quality assurance for the code I write, I use ChatGPT to give me ideas as far as things like odd or unexpected behavior that occurs. For instance, I might ask something like, “When I first open localhost:3000 to view my web app, the landing page zooms in on the press of the “Get Started” button. This is the expected behavior. However, when going back to the landing page after viewing a different one, the background does not zoom in again. What could be a potential cause?” This usually results in some ideas for adjusting my code to get the expected behavior.

Specifically for ICS 314, most of my uses for ChatGPT have been listed above. However, there are scenarios where a concept in ICS 314 will lead to me conducting further research outside of class, with the help of AI. For instance, during the UI module, I prompted ChatGPT with, “What are some other options as opposed to Bootstrap or React-Bootstrap? What are their pros and cons in comparison?”

AI as a Learning Tool

In my own learning experiences, ChatGPT has been a significant addition to my toolset. I think it’s great for understanding general concepts, but everything it generates does need to be taken with a grain of salt. It is far from perfect, but perfect for what I use it for. When I am struggling to understand concepts, a ChatGPT prompt might just be all that I need. Although I use it quite often, I prefer to try solving problems on my own before resorting to using ChatGPT. This is due to my fear that I might become reliant on it, and lose my current problem-solving skills.

Practicality of ChatGPT

For software engineering in the real world, I think generative AI like ChatGPT can speed up the coding process significantly. It’s kind of like pair programming, except your partner has a massive amount of data instead of an ability to think. You can ask questions as you go, or even have ChatGPT write small code snippets. This year, I got to participate in HACC2023 to get more of an idea of what developing for an actual client is like. Throughout my work on the project, I used ChatGPT quite often. I was able to finish tasks much quicker than on my own, and I felt less overwhelmed throughout. Even within my personal projects, I like to use ChatGPT in a similar manner.

AI is Far From Perfect

Usually, the code returned from ChatGPT will not work right off the bat. However, this is expected, given that it has no idea what my file structure or what all of my variables are named. Syntactical errors are easier to fix, but occasionally there are semantic errors in the code returned. Sometimes, this can be fixed by adjusting the prompt, but I have encountered times when ChatGPT simply cannot do the task. Thus, there are definitely limitations to what generative AI can do, but for most general cases, I think it works great. In the future, I think it would be a good idea for teachers to encourage the use of generative AI. However, they also need to solidify the idea that it cannot do everything, and should be viewed as a tool rather than a replacement for their brains.

AI in Education

If education were to be enhanced by AI, I think it could either be highly beneficial or detrimental to our society. I think an AI-enhanced approach to education would be good when students are older. This way they would not be as reliant on technology, and still develop their foundational skills. Ultimately, it likely depends on one’s mindset. If they are just copy-pasting from ChatGPT to finish every assignment, karma will likely catch up with them soon. Our society would lack the thinking and practical skills to support itself. Knowledge retention would also be worse, due to the students not working towards learning material, but rather memorizing what ChatGPT presents them with. All that said, there is potential for immense improvement in student learning overall. As AI continues to evolve, there could be personalized assistance for each student that would not require real life tutors. Teachers have a lot on their plate as it is, and AI could help free some of their time. Students would be able to get help on assignments or concepts at any time, from any place that has an internet connection. Thus, the integration of AI into education could either be our downfall or the best idea yet.

AI in SWE Education

Looking at the future of AI in software engineering education, I think one of the biggest challenges will be students blindly using it. For instance, if a student uses ChatGPT to write code, then great. However, I believe it is crucial that the student needs to understand the code, and be able to explain it. Otherwise, they might become a software engineer only capable of copy-pasting. Then your job would be replaceable, and there is no point to hiring that student as opposed to anyone else. I think one way to improve here is to incorporate a strong understanding of the foundational principles, without the use of AI initially. AI can be a great learning and coding partner, but students need to understand that it is the problem-solving mindset and abilities that make them software engineers.

Final Thoughts

Using ChatGPT as an assistant for my ICS 314 assignments has been immensely helpful. However, I was sure to avoid a dependency on it, so that I am able to learn and apply concepts on my own. Although I encourage AI integration into education, I suggest that anyone integrating AI into software engineering education be particularly careful about how it is integrated. Students still need to feel compelled to think and solve problems on their own. After all, what happens if ChatGPT goes down? AI does not make software engineers. Software engineers make AI.