一句话:提出 GRADESTYLE,一个集成 GitHub 的 Java 代码风格自动评估工具,并在课程中验证其能持续改善学生代码风格。
问题:代码风格是专业软件工程师必备技能,但人工评估学生代码并及时给出详细反馈往往不可行,专业静态分析工具也不适合教育场景。方法:提出 GRADESTYLE,自动检查 Java 作业中重要 Google Java Style 规范和最佳实践的违规,生成包含风格分数、违规列表和源码位置的报告;集成 GitHub 与 GitHub Classroom,可配置为每次学生推送代码时提供持续反馈。结果:在 327 名学生的二年级软件工程课程中采用,观察到学生作业代码风格持续改善。
Every programming language has its own style conventions and best practices, which help developers to write readable and maintainable code. Learning code style is an essential skill that every professional software engineer should master. As such, students should develop good habits for code style early on, when they start learning how to program. Unfortunately, manually assessing students’ code with timely and detailed feedback is often infeasible, and professional static analysis tools are unsuitable for educational contexts. This paper presents GRADESTYLE, a tool for automatically assessing the code style of Java assignments. GRADESTYLE automatically checks for violations of some of the most important Google Java Style conventions, and Java best practices. Students receive a report with a code style mark, a list of violations, and their source code locations. GRADESTYLE nicely integrates with GitHub and GitHub Classroom, and can be configured to provide continuous feedback every time a student pushes new code. We adopted our tool in a second-year software engineering programming course with 327 students and observed consistent improvements in the code style of their assignments.