Generative AI and its Impact on the CS
Classroom and Programmers*.
Dr. Ed Lindoo
Regis University
Dr. Mohamed Lotfy
Utah Vally University
As the integration of generative artificial intelligence (GenAI) in educational settings becomes more widespread, students, teachers, and educational institutions face the challenge of utilizing these technologies in a responsible
manner.
We believe the responsible use of generative AI can help CS and IT
students develop critical thinking, enhance their learning experience
Facilitate the learning process,
Assist in understanding code concepts,
Increase programming skills, and/or enhancing the programming knowledge
We looked at how students might utilize, and potentially abuse, GenAI
In this paper we provide examples of how generative AI can be used to generate code modules
Discuss the use of generative AI in programming classes
Impact on the future of programming and programmers.
The results from a 2023 Forbes survey which involved 500 active
educators across the United States, found that over half of the participating educators expressed a belief in the positive impact of AI on the teaching and learning dynamics.
Today we are dealing with ChatGPT, IBM watsonx Code Assistant and similar GenAI tools.
The promising capacity
of ChatGPT to improve the software development process carries significant implications
Students, teachers, and educational institutions face the challenge of utilizing these technologies in a responsible manner.
Chatbots like ChatGPT have ignited debates among educators regarding their capacity to encourage academic dishonesty and disseminate misinformation.
At the forefront of educators’ concerns regarding GenAI in education is academic dishonesty.
Some teachers worry that the growing reliance on generative AI could result in reduced human interaction for learners
The focus of this paper is on how students might utilize, and potentially abuse, ChatGPT.
Educators are particularly concerned about whether students will leverage ChatGPT to contravene the academic integrity policies set forth by their institutions.
In the following slides we provide examples of how GenAI can be used to generate Java and VB.NET code modules.
We are also going to demonstrate how AI can assist a programmer in converting COBOL code to a more modern language.
First, just to test ChatGPT we asked the system “can you write a 20-page paper with at least 10 references on project management.”
The response from ChatGPT was “I’m sorry but generating a 20-page paper with references on project management is beyond the scope of what I can provide in a single response.”
But it also came back with “I can give you a structured outline for such a paper, which you can use as a basis to develop your own paper.”
Now with that outline we were able to ask for details on each item in the outline and were able to get multiple paragraphs with references to build a paper. So yes, you can cheat.
Let’s now talk about using ChatGPT to assist in writing code.
We found that if the user engaging with ChatGPT lacks the necessary programming skills, it cannot be assumed that ChatGPT will generate valid code.
Users must possess the ability to pose appropriate questions because GenAI lacks the critical thinking and problem-solving capabilities required by users.
We decided to put this theory to the test.
We took one of our homework assignments from an intro to Java class and asked ChatGPT
“Create a java program that asks for user input and writes it to a new file”.
In less than a second, we had a perfect program.
Next, we decided to make it much harder, using an even more difficult
assignment from our Java class,
“Create a POJO with states and behaviors.
Make sure that the class is well defined with at least 4 class variables.
At least one behavior and at least one class variable that is an Array.
Then create the main class and create a new instance of your class.
Populate the object then print all the populated fields of the object.
Use any values, Trucks, People, Stocks, really anything that you can think of.”
We thought this would throw ChatGPT off
However, again in less than one-two seconds it came back with a full program with everything we asked for!
If handed in by a student, this would certainly have received an “A”..
OK, we determined that ChatGPT could write some Java code, but how about a little harder example of VB.NET?
“I need a vb.net program that will find the month using a case statement”, ChatGPT came back with a perfect module.
Typically, we would be looking for something more sophisticated
Perhaps a module that we would pass a variable to and have it return the results to us.
Surely this will throw ChatGPT off!
We then asked: “I need a vb.net function that will accept a number
(1-12) as a parameter and use that with a case statement to determine the month.”
Again, ChatGPT produced the following module including some comments, within just a few seconds
So here we are, teaching students how to write object-oriented programming using ChatGPT.
They just need to know how to tie all these modules they create together, to end up with the one, large program they need.
Thus, we propose a new way of teaching CS students how to program, with the help of ChatGPT.
Bucaioni et al., (2024) found that ChatGPT demonstrates proficiency in solving programming problems at lower and medium difficulty levels.
However, its accuracy in generating correct code decreases when faced with more challenging problems.
These challenging problems are typically very large programs
that do many things.
In other words, it is akin to our initial task of asking ChatGPT to write us a 20-page paper
it simply could not do it, yet it could provide pieces to us that we could put together, much like a jig-saw puzzle.
Next, we turned our attention to COBOL programming.
There is still a lot of COBOL code that eventually will need to be converted.
85% of all ATM transactions
SSA is still running over 60 million lines
Why?
It is estimated that 180-200
billion lines of code are still in use
Numerous attempts have been made to rewrite the tried-and-true code
However, many endeavors have end in failure
Why not rewrite COBOL code using a newer language?
We theorized that with the help of ChatGPT, a VB programmer for example could convert COBOL to VB, even with little knowledge of the COBOL language.
In less than 2 seconds it was completed perfectly!
We asked ChatGPT “re-write this COBOL code into VB”.
Regardless of whether the use of GenAI tools is permitted in a class
Like it or not, students will try it, and as they try it and like it, they will use it more and share it with their peers.
And so, as educators we surmise that we need to give assignments that are building blocks that students must put together and that ChatGPT (at this writing) can’t figure out on its own.
The initial suggestion involves adjusting the written assignment prompt to be less specific. Like it or not, students will try it, and as they try it and like it, they will use it more and share it with their peers.
This approach complicates the task for students lacking programming knowledge, preventing them from obtaining a passing score by merely copying and pasting the assignment instructions into ChatGPT
It is suggested; mandating students to include comprehensive comments throughout their program
If a student lack’s understanding of the techniques employed in their program, they will be unable to provide accurate comments
If a student can effectively apply a prescribed method of commenting, it indicates the
student has likely grasped the techniques required by the assignment
Will AI Automation Replace Programmers?
At present, the answer to whether ChatGPT or IBM watsonx Code Assistant and similar AI tools will replace developers is a resounding ’no’.
Software development encompasses more than just coding. Undoubtedly, ChatGPT can aid in code writing, compilation, and debugging.
Yet, like IDEs, ChatGPT cannot supplant human involvement in end-to-end
Development.
Throughout the years developers have utilized
various tools—from text editors in the 80s to IDEs in the 90s.
They have sourced code snippets from Google search results and solutions from platforms
like StackOverflow, all in pursuit of heightened productivity.
However, none of these tools have truly replaced the developer.
The same trajectory is expected with ChatGPT.
While it serves as a disruptive and productive tool for programmers, it neither confers programming expertise nor eliminates the need for human programmers—at least not at this juncture.