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.
翻译:经常使用固定分析工具来扫描源代码,并发现偏离项目编码准则的情况。鉴于它们的重要性,经常在教室中引入静态分析工具,教育学生如何探测和可能避免这些反模式代码。然而,由于这些隔热器往往产生大量虚假的正面效果,所以对它们在提高学生认识方面的效力知之甚少,因为这些隔热器往往会产生大量虚假的正面效果。为了提高对违反编码标准的潜在编码问题的认识,我们在本文件中力求反思我们教人如何使用静态分析来评价其在帮助学生提高软件质量方面的有效性的经验。本文讨论了在3个学期期间在课堂进行的一项实验的结果,涉及65个提交材料,利用PMD对690条规则进行代码审查活动。定量和定性分析的结果表明,一套多频点标准的质量问题的存在会影响对问题、设计以及最佳做法的接受或拒绝,需要较长时间才能解决的类别,学生承认在代码审查期间使用静态分析工具的潜力。通过这一实验,代码审查可以将课堂实验结果转变为一个关键部分,使学生能够对教学工具进行分析。