Haindl, P.; Weinberger, G. Does ChatGPT Help Novice Programmers Write Better Code? Results from Static Code Analysis. IEEE Access 2024, 1–1, doi:10.1109/access.2024.3445432.
Haindl, P.; Weinberger, G. Does ChatGPT Help Novice Programmers Write Better Code? Results from Static Code Analysis. IEEE Access 2024, 1–1, doi:10.1109/access.2024.3445432.
Haindl, P.; Weinberger, G. Does ChatGPT Help Novice Programmers Write Better Code? Results from Static Code Analysis. IEEE Access 2024, 1–1, doi:10.1109/access.2024.3445432.
Haindl, P.; Weinberger, G. Does ChatGPT Help Novice Programmers Write Better Code? Results from Static Code Analysis. IEEE Access 2024, 1–1, doi:10.1109/access.2024.3445432.
Abstract
In the rapidly evolving landscape of AI-supported programming education, there's a growing interest in leveraging such tools to support students helping about what good code makes out. This study investigates the impact of ChatGPT on code quality among part-time undergraduate students enrolled in introductory Java programming courses. With no prior Java experience, students from two separate groups completed identical programming exercises emphasizing coding conventions and code quality. Utilizing static code analysis tools, we assessed adherence to a common coding convention ruleset and calculated cyclomatic and cognitive complexity metrics for submitted code. Our comparative analysis highlights significant improvements in code quality for the ChatGPT-assisted group (treatment group), with marked reductions in rule violations and both cyclomatic and cognitive complexities. Specifically, the treatment group demonstrated greater adherence to coding standards, with fewer violations across several rules, and produced code with lower complexity. These results suggest that ChatGPT can be a valuable tool in programming education, aiding students in writing cleaner, less complex code and better adhering to coding conventions. However, the study's limitations, including the small sample size and the novice status of the participants, necessitate further research with larger, more diverse populations and in different educational contexts.
Keywords
Programming Education; ChatGPT Large Language Models; Static Code Analysis
Subject
Computer Science and Mathematics, Software
Copyright:
This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.