Comp Sci students and the ChatGPT disaster

It’s well known that given the chance, people will nearly always look for a shortcut in making a decision, in order to avoid the more laborious effort required to think things through from scratch. The psychology discipline has various terms for this: “cognitive miserliness,” “cognitive economy,” “satisficing,” “mental inertia,” reliance on “heuristics,” and others. It’s a near-universal practice.

This sounds pretty bad, but we’ll cut our fellow humans a break by recognizing that it’s likely a survival mechanism. In most instances, a “good enough” decision is good enough for whatever situation is confronting an organism, and in many such situations, seconds count. So you’ll probably do better conserving your resources (like “time and energy available for thinking”) rather than possibly overthinking every decision. Optimality can be overrated.

Every instructor of intro computer science has probably noticed a similar trend among their students. Computer programming requires choosing from various algorithmic building blocks that a programming language (like Java or Python) provides, and assembling them in a clever way to solve a problem. It’s hard and creative work, since no two problems are exactly alike, and since the building blocks interact in non-trivial ways.

Now an intro CS student who pays attention in class has invariably seen a number of example programs that solve various problems. They’re then given a homework assignment. Ideally, they’ll use the principles they’ve been taught — which the examples helped to illustrate — to succeed in writing their own, fresh solution to their homework. That homework problem will of course bear some resemblance to the example problems they’ve studied, just like a child’s (and even an adult’s) sentences bear resemblance to the previous sentences they’ve heard. But the student’s problem-solving thought process, ideally, will not be “let’s find an example solution from class and see if I can munge it into a solution to this homework.” After all, language speakers don’t say “let’s start with some existing sentence I’ve written down, and try to substitute a word here and there to arrive at the sentence I want to say now.”

The student, however, is tempted to do exactly that. “Cognitive miserliness,” or whatever you want to call it, whispers in their ear: “Hasn’t your professor shown you working programs that do something similar to what this homework calls for? Wouldn’t it be quicker to just copy from one of those and see if you can tweak it slightly and get it to work?”

From lots of experience teaching this material, I can tell you that in most cases, it’s actually not quicker to copy-and-modify an example, even though the student expects it will be. Students tend to underestimate how intrusive the necessary changes will be (and how long it will take to test them) and to overestimate how hard it would be to write the program from first principles.

But this is an aside. The main problem is that even if it were quicker and easier to copy-and-modify, most of the necessary learning does not take place when the student takes this approach. The student may produce a working program, but strangely enough, will not have acquired the skills necessary to produce working programs in general.

To see this, return to the language analogy. Imagine trying to learn (say) Japanese this way. Every time your homework tells you to write a Japanese sentence (expressing something specific like “I always go running alone before dark”) your procedure is to thumb through your list of example sentences looking for the one that most closely resembles what you want to say, make a few changes to its vocabulary, tense, supportive clauses, etc., and write down that modified sentence.

You might get a decent grade on the homework. But now try embarking on some actual Japanese conversation. Oof.

Now as bad as this transmogrify-an-example approach has been for learning to code, things have gotten immeasurably worse since the rise of ChatGPT-like tools. The issue with using AI assistants is the same as with the copy-and-modify-an-example strategy: the temptation to solve the problem without actually solving the problem. Put differently, it’s the false promise that one can get from A to B without actually learning what cognitive steps are required to get there, by offloading the thinking-it-out part to something else (a pre-written example, or an AI tool).

The seductive message is that ChatGPT will be able to write the program for you…or at least give you a start…or at least suggest things…or at least tell you when you make a mistake…or something. Students get the message (whether or not it was ever explicitly stated) that coaxing ChatGPT into producing the program is the “right way” to go about generating code. It’s the quicker and easier path. It would be dumb, students reason, to try and write the program yourself from scratch, no? I mean, who does that? Isn’t that exactly what ChatGPT is for?

And as if it couldn’t get any more tempting, new programming environments (like Replit, a tool used in some of our Data Science courses at UMW) present a bright, loud, front-and-center AI “co-pilot” feature designed to drag the unsuspecting beginner’s eyeballs right to it. My daughter, a DS major who has used Replit for a course, tells me that you actually have to deliberately search the interface a bit to find out how to manually disable the AI. 99% of students will not do that. They will be (mis)led into thinking that their path to programming success lies through that mysterious and centrally-located AI box.

All this is leading to a generation (or more) of students who produce programs they literally do not understand, because they didn’t even write them. They have no idea how the code actually works, only that it does seem to work for the scenario they’re immediately facing (their specific homework problem). But to maintain that code? adapt it? debug it for a previously-unseen test case? perceive its limitations and opportunities for improvement? These are all hopeless tasks.

At this point you may be tempted to say, “well, if the goal is to produce working programs, and ChatGPT lets you do that more quickly, does it matter whether the programmer understands them?” The fallacy here stems from confusing long-term and short-term thinking.

Suppose your goal was to run a marathon. As everyone knows, no matter how many books or video tutorials or personalized trainers or diet supplements you use, you aren’t going to make any progress towards this goal without doing the hard work of actually running, day in and day out. All the tools in the world cannot by themselves get you in shape for a marathon, because getting in shape necessarily is exercising your body.

Giving a novice programmer ChatGPT is, at best, like giving a beginning marathon runner a car. “Look,” you say, “why go through the pain of running 26 miles? In fact, why run at all? With this new contraption, you can just press a couple of pedals and you’ll get to your destination 26 miles away in no time!” Sure. And if the goal is merely to cross 26 miles, a car is a much more optimal way of getting there. It comes down to what you’re trying to achieve. You can drive all day, but will never get in shape.

The relevant long-term question is: what should our society’s goals and expectations be for the tech-savvy portion of the population? Those trained in computer science are the gatekeepers of technology who have made tremendous contributions to the rest of the human race. They bear the burden of maintaining, updating, fixing, improving, and transforming this giant storehouse of inventions, as well as imagining what will be possible tomorrow. What base of knowledge and skills do we want this guild of technocrats to have? To comprehend the technical details of these creations and critically reason about them? Or to be able to press buttons on an opaque dashboard, hoping by chance and brute force to produce something incomprehensible that based on cursory experimentation seems to satisfy an immediate need?

I do think that there’s a place for the AI co-pilot in the programming workforce. In the hands of a proficient technologist, who not only knows what questions to ask but can separate the tool’s nutty answers from its genuinely helpful advice, it promises to increase productivity. To return to the language example, this is like equipping a competent Japanese speaker with Google Translate (or even a Japanese-English dictionary). They have the base of skills necessary to properly use it, and it will help them venture outside their vocabulary and cut the occasional corner.

But at the learning level, AI assistants are an unmitigated disaster. I’ve seen many confused students struggling with their programming assignments, and it’s obvious at a glance that they haven’t even thought about how to algorithmically solve the problem before them. They’re wrestling with a vehicle breakdown which arose because they were trying to avoid running the 26 miles entirely. I don’t lay most of the blame on them: they honestly haven’t grasped what programming is. They think the right thing to do is tell the AI assistant things and try to force it to give the right answers. Even if they succeed, they will have failed.

— S



  1. Kevin Landry Avatar

    Great blog-post, really enjoyed the read!

    I agree with your thesis, particularly from my perspective as an older CPSC student, which differs from that of many younger peers. While AI can be a powerful learning tool when used responsibly, its use to complete tasks intended for personal effort can be problematic. It seems almost inevitable that students will turn to AI to alleviate the significant stress they face. The pressure to avoid failure, delayed graduation, parental disappointment, and peer embarrassment is intense for young adults. As an older student, my life experiences help steer my decision-making, but the allure of AI as a solution remains strong even for me. However, it’s not as easy as copy and pasting code from ChatGPT. I think instructors are good at sniffing out AI work from undergrad work. I feel AI is immensely helpful as a tool to assist, but is immensely harmful if used as a replacement for your own brain. Your focus on the issue of AI in CPSC programs is a step in the right direction. While I don’t claim to have all the answers, fostering ongoing discussions about the strengths and weaknesses of AI use in academic settings may be beneficial.

  2. Rylan Sedlacek Avatar

    After reading your post, I am glad to finally see that someone has been able to properly express the problem with Artificial intelligence and programming. I began coding during my freshman year of high school. Where at first most people “sucked it up” and learned how to at least do the basic actions needed to pass a class. Though some did cheat, which is expected, the majority of students around me seemed to be at least somewhat proficient in basic programming principles. This was until the first public release of Chat-GPT. At first, it seemed like this interesting tool could be used for good, rather than as a new tool for cheaters. However, it soon became obvious that it would serve the latter purpose. I have vivid memories of students using this new AI technology to write papers, complete discussion board assignments, or even take tests. However, this particular issue only lasted for a brief period, as soon new “AI-checkers” became available. A new tool for teachers that stopped many students in their tracks.
    Following this, I thought this would be the end of the “AI phase,” soon we would all go back to actually doing work, right? This was unfortunately not the case and became apparent soon after my Senior year was in full swing. At my high school, I had a “Senior Project” due at the end of the year, which was quite a task. Moreover, it meant that all students had a project due, with each week’s latest updates on these projects being posted on a website. Many students chose to make websites using HTML, CSS, and JS, and this is really where the use of Chat-GPT began to become apparent once more. I began to see interesting comments in student’s code. With many similar to the ones that I saw when experimenting with Chat-GPT during its first release. These comments were unmistakably AI-generated, saying things such as “adjust this value for your site,” or “replace this image with your own.” Seeing these comments had to be one of the most frustrating things I have witnessed throughout my entire high school career. Not only were these students cheating, but many were also receiving recognition for something they didn’t even understand! All of this to say, I completely agree with and appreciate your post regarding this almost “pandemic” affecting students in all forms of learning. I strongly agree that it’s much more important to think, rather than have a “robot” think for you.

  3. Ghana Durrani Avatar

    I agree with this statement made in the blog post: “most of the necessary learning does not take place when the student takes this approach”, referring to a student copying and modifying an existing solution to a problem for their homework. The reason why I agree to that is because I have learned from experience. For one of my classes last semester, we were allowed to use ChatGPT to an extent. For example, I wrote a program that worked but it had a bug that I couldn’t exactly catch, I copied my code and asked chatGPT what is wrong with it. It gave me the solution which worked for the test case the professor had designed however, the solution included a bunch of code that I was not familiar with. If I were to use that code, I would have gotten full credit but wouldn’t have understood what it all meant.
    I do believe that ChatGPT can save a lot of time by getting suggestions or getting started on a task. Whether it be original or considered plagiarism since ChatGPT is just pulling information from different sources on the internet is another question to be asked. What this article says about Replit is also quite true. Replit usually gives you suggestions automatically if you leave your cursor alone for a few seconds in the middle of coding a program.
    I also want to add that even though all of these are good points made in the article, the focus on getting good grades and appearing desirable to employers put a lot of pressure on students therefore, teachers, institutions and educators should also come up with ways to make learning fun and grading in a way that doesn’t punish a bright minded student. (Neil Degrasse Tyson, a famous astrophysicist, had As and Bs during his elementary, middle and high school period. Even he had some Bs!)

  4. Emily Halferty Avatar

    I would argue that people often look back on previous examples when learning a new concept to check their work, which solidifies their knowledge through further exposure. New programmers can learn keywords and commands, but their perspectives can completely change by having a more experienced programmer show them a snippet of code they wrote and explain why it works. Every human mind is unique, but sometimes we need that outside push to provide a new perspective. I disagree with your statements, believing it could be beneficial for computer science students to at least get somewhat acquainted with complex AI tools like ChatGPT so they can learn how to communicate with the program to receive the desired results and learn the limitations of the “machine brain”.

    As a counterargument, I do agree that students tend to only do enough for the assignment at hand without putting in any extra work. It could be related to the way the education system as a whole is built, as there is no reward for any extra effort beyond a 100% grade. Also, AI tools are very tempting these days as they continue to improve and output usable results. It can be a dangerous temptation for programmers, but I still stand by my conviction that the study of AI has a lot of potential knowledge, and warnings, to give to future and current computer science majors.

  5. Eric McGowan Avatar

    I completely understand and empathize with the stance you’ve taken. On the first day of class, we were to set up using eclipse/intellij with Webcat. Due to Webcat’s slow autograding time, we were switched to working solely in Replit. At first, it was fine if not unfamiliar to me, which was also fine. Come the third week however, it was becoming increasingly difficult to think for myself because of the automatic Replit AI. At this point, I was fully aware of AI’s impact on the coding community and practices overall, but I didn’t register how I was unknowingly adapting it into my own thought training by inadvertently having it enabled. It would basically show exactly what I was typing as I was typing, and I would just have to click enter to have it complete my statements. They even had entire paragraphs that you could enter on, but I never did that because that was what I had assumed the AI was doing, not what I was directly doing. I even asked a few of my friends at the time who are upper level computer science majors if it would be more effective for me to just type everything out, and they said it would just save me time by entering and blazing through it. A couple weeks later, my professor realized what was going on within Replit, and told us how to disable the AI, of which I became flabbergasted at the fact that the AI was doing so much work for us without us even thinking about it. After we set it to be disabled (like you noted within the article, it was dubiously hidden), the course became drastically more difficult as a byproduct of not having Replit tell us what to do with the language we were studying. The mastery quizzes were brutal for the entire class, and I had to work extremely hard to build myself up to stay afloat through outside resources like Codingbat. I ended up with an A, but it was disheartening to see people next to me re-enabling Replit AI, in conjunction with Chat-GPT, to feign the assignments. I assume they weren’t much help for the final exam which was on paper, but I was knowledgeable enough to pass it and survive what probably wouldn’t’ve been that difficult of a class if not for the task of deconstructing my brain from the handlebars and tricky pandering of AI. If not for a well-versed upper-level student telling me to think about my code before I touch the keyboard, I don’t think I would’ve been as successful and might’ve even dropped the major, as I just felt that uncomfortable, disengaged, and discouraged for a period of time.

    I believe that artificial intelligence, if not contained and utilized in an ethical and considerate manner I presume, dampens the learning environment of lower level courses if said user does not have a solidification of the basics. Bringing in an analogy, I do not believe that one can become a competent artist through using generative AI models as their vehicle, just as I am unsure of if one can become a competent programmer in a parallel way. AI co-piloting can lead to many breakthroughs, but setting it up to be poised as the answer to everything gives credence to the current domino effect of unethical decision-making. There is a difference between utilizing tools in a way compliant with standards, and eschewing necessary conversation and considerations to skate by, whether in the industry or on a personal computer. I don’t entirely fault the AI itself though, I fault the immorality of humanity to veer away from ethical usage to manifest advantageous opportunities spurred by the moment.

Leave a Reply

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