关于利用静态分析提升学生软件质量改进参与度:基于PMD的实践经验
On the Use of Static Analysis to Engage Students with Software Quality Improvement: An Experience with PMD
AI总结:
本文通过3个学期、65份提交作业的课堂实验,评估使用PMD静态分析工具开展教学对提升学生软件质量意识的效果,发现其能助力学生认知编码问题,为教育者优化代码评审教学提供参考。
摘要:
静态分析工具常被用于扫描源代码,检测代码与项目编码规范的偏差。鉴于其重要性,代码检查工具(linter)常被引入课堂,教授学生如何发现并尽可能避免这些代码反模式。但由于这类工具往往会产生大量误报,目前人们对其在提升学生意识方面的实际效果知之甚少。为增强学生对违反编码标准的潜在编码问题的认知,本文旨在总结我们教授静态分析使用方法的实践经验,评估其在帮助学生提升软件质量方面的有效性。本文讨论了一项持续3个学术学期的课堂实验结果,该实验涉及65份提交作业,学生使用PMD对690条规则开展了代码评审活动。定量与定性分析结果显示:PMD质量问题的集合会影响学生对问题的接受或拒绝;与设计、最佳实践相关的类别问题需要更长时间才能解决;学生认可在代码评审过程中使用静态分析工具的潜力。通过该实验,代码评审可成为计算机教育计划中的重要组成部分。我们期望本研究结果能帮助教育工作者为学生提供代码评审策略支持,提升学生对静态分析工具的认知,逐步培养其编码技能。
英文摘要:
Static analysis tools are frequently used to scan the source code and detect deviations from the project coding guidelines. Given their importance, linters are often introduced to classrooms to educate students on how to detect and potentially avoid these code anti-patterns. However, little is known about their effectiveness in raising students awareness, given that these linters tend to generate a large number of false positives. To increase the awareness of potential coding issues that violate coding standards, in this paper, we aim to reflect on our experience with teaching the use of static analysis for the purpose of evaluating its effectiveness in helping students with respect to improving software quality. This paper discusses the results of an experiment in the classroom over a period of 3 academic semesters, involving 65 submissions that carried out code review activity of 690 rules using PMD. The results of the quantitative and qualitative analysis shows that the presence of a set of PMD quality issues influence the acceptance or rejection of the issues, design, and best practices-related categories that take a longer time to be resolved, and students acknowledge the potential of using static analysis tools during code review. Through this experiment, code review can turn into a vital part of the educational computing plan. We envision our findings enabling educators to support students with code review strategies to raise students awareness about static analysis tools and scaffolding their coding skills.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。