2025.12.23
Programming Learning Using Generative AI
- Atsushi Ito
- Professor, Faculty of Economics, Chuo University
Area of Specialization: Information and Communications Technology
1. Computers becoming a bigger part of daily life
Software is used in a variety of things which we use in daily life, including computers, smartphones, cars, televisions, air conditioners, rice cookers, microwaves, coffee makers, and refrigerators.
Furthermore, in recent years, programming skills (for example, the use of Python) are becoming required in many occupations.
Thinking back to about 25 years ago, around the year 2000, computers were becoming widespread. Everyone in an office had their own computer, and being able to use Word, Excel, and PowerPoint was a highly valued ICT skill. Since then, Word, Excel, and PowerPoint have come into widespread use, and proficiency in these programs has become commonplace.
Alongside the rapid widespread of AI in the past few years, Python has also become more widely used. In addition to being used for AI, Python is also useful for processing large amounts of data that cannot be handled by Excel. Therefore, learning Python is useful.
However, programming languages can certainly be a bit intimidating to many people.
When students are asked about the difference between natural languages and programming languages, they often answer that programming languages do not allow ambiguity or mistakes and are prone to grammatical errors, whereas natural languages allow some mistakes but also have many exceptions to grammatical rules. Indeed, many cases have been reported in which a single missing comma or period in a program has led to a major accident. However, in reality, there is no significant difference between natural languages and programming languages as "languages." In terms of mathematical models, both natural and programming languages use the same context-free grammar. Therefore, the different impressions that people have of natural languages and programming languages can be attributed to the flexibility of the party receiving information. Computers execute rigorous processing to generate the most efficient code, while humans choose the most plausible interpretation from among several possibilities. Technological innovations that bridge this difference are now attracting attention.
2. The rise of AI
In the past few years, generative AI has become popular, with ChatGPT being a representative example. The effectiveness of neural networks was first recognized in 2012 with AlexNet, which was announced by a team led by Geoffery Hinton (Nobel Prize winner in Physics in 2024). Later, in 2015, Google Deepmind developed AlphaGo, thereby successfully creating AI that can defeat humans at the game of Go, something which had previously been deemed as impossible. In 2018, Google developed BERT, a language model incorporating the attention mechanism that is the basis of current generative AI. Since then, various generative AIs have come into use, including ChatGPT, Llama, and Gemini. The most recent generative AI to gain popularity is Deepseek.
The current situation is also impacting university classes. When examining reports written by students, there are now many unnatural sentences that seem unlikely to have been written by a human. It is true that students are now leaving their homework entirely to generative AI. Although generative AI has these types of negative effects, it can also have overwhelmingly positive effects if used properly.
3. Attempting to use ChatGPT to learn programming
ChatGPT stores a massive amount of information; indeed, it has access to nearly all of the digitized data in the world. Some of that information is related to programs. In other words, ChatGPT can create programs. By skillfully using ChatGPT, people can create and run programs without writing a program by themselves. In other words, students can bypass the difficulty and intolerance to mistakes that are inherent to programming languages, and can immediately generate a program which works to a certain extent.
However, to skillfully use ChatGPT, you need to fully understand what kind of program you seek to generate and how to verify the proper functionality of the program suggested by ChatGPT. A lack of such understanding will result in nonsensical reports which seem correct at first glance but ultimately prove to be incorrect.
In computer science terminology, this means that if the so-called "upstream process" of specification description (requirements analysis, requirements definition) is done properly, generative AI can handle the design and coding, thereby significantly reducing the amount of work. In other words, this indicates a paradigm shift from Figure 1 to Figure 2.
Of course, there are still many items requiring verification before this item can be fully implemented in commercial software. However, this approach is expected to work in learning a program. In other words, students receive a task and work on that task while consulting with ChatGPT (Figure 3).
4. Future prospects
The Faculty of Economics at Chuo University is experimenting by incorporating Python programming learning using ChatGPT into the "Introduction of ICT" course for freshmen students in the 2024 academic year. The course revolves around creating a simple game using ChatGPT. It also incorporates lectures on basic computer science knowledge such as Python grammar, how apps work, how to operate UNIX, and file structures in computer system.
In the course, students spend a brief period of time learning the basics of ICT. Next, they apply their learning while creating a program. Although this is similar to the flow of previous programming learning, there is one major difference--students run the code generated by ChatGPT, confirm that the game starts, and then make modifications. Throughout this process, students acquire knowledge by applying what they have learned.
The following is an example of content from the class.
● First prompt to use: "Please display Python code of a catching game."
● Once the program runs, I asked them to customize elements such as changing the color, adding an image,
changing the speed, changing the number of falling objects, rotating, displaying the score, etc.
In many cases, the program will generate a screen like the one shown in Figure 4. I created this screen as a sample. However, this screen only displays red squares and white squares, with the red squares falling from the top of the screen. The screen cannot be operated in any way which resembles playing a game. For example, when looking at the screen shown in Figure 4, you can see that the white square and the red square are overlapping. In a real game, the overlapping of squares would need to result in something such as scoring a point or losing. Therefore, students need to design their own game specifications such as the following.
● Move the white square left and right (avoid or hit)
● Make the red square disappear when colliding with the white square
● Make the white square into a basket and the red squares into apples
By designating such specifications and then having ChatGPT generate a new code, the program will gradually begin to resemble a game.
Of course, since this was the first time that students attempted to create a program, they encountered many difficulties due to a lack of understanding. In response, I identified items which many students do not understand, reviewed those items at the beginning of the next class, and then had them create their next game by incorporating the new knowledge. In the past, many students would have dropped the course, but this time many more students remained enrolled until the end while maintaining their motivation. Based on this experience, I believe that generative AI will significantly change the way that "information" is taught going forward.
A book detailing this process was written by Ami Otsuka, who worked with us in the 2023 academic year to research the use of ChatGPT in learning a program. If you are interested, I highly recommend reading her book.
#100-Day Challenge: How Creating an App Every Day for 100 Days Changed My Life (tentative translation) (by Ami Otsuka)
https://bookplus.nikkei.com/atcl/catalog/24/12/05/01757/ * Only in Japanese
Also, for further reference, the following link contains my impressions of Ami's learning from my own perspective.
https://bookplus.nikkei.com/atcl/column/041500053/012700377/ * Only in Japanese
Atsushi Ito/Professor, Faculty of Economics, Chuo University
Area of Specialization: Information and Communications Technology
Atsushi Ito was born in Nagoya City in 1959. In 1981, he graduated from the Department of Electronic Engineering, School of Engineering, Nagoya University. In 1983, he completed the Master’s Program in the Department of Information Engineering, Graduate School of Engineering, Nagoya University. He obtained a Ph.D. in information engineering from Hiroshima City University in 2007.
He entered Kokusai Denshin Denwa Co., Ltd. (currently KDDI) in 1983. From 1985, he engaged in research at a research institute on items such as specification and description language (SDL), IN, the Internet, ad-hoc networks, and Android applications. From 1991 to 1992, he served as a Visiting Researcher in the Center for the Study of Language and Information (CSLI) at Stanford University. In 2014, he assumed the position of Professor in the Graduate School of Engineering, Utsunomiya University. In 2020, he became Associate Professor in the Faculty of Economics, Chuo University. He has held his current position since 2021.
His recent research themes include using wearable EEG sensors to measure the effects of forest bathing and to estimate driver emotions, using generative AI for software learning support and narrative generation, applying AI to agricultural support and tap test, etc.
His area of specialization is information and communications technology.
He is a member of the Information Processing Society of Japan, the Institute of Electronics, Information and Communication Engineers, the Japanese Cognitive Science Society, ACM, IEEE, and the Japanese Alpine Club.