一句话:报告基于正则表达式答案模板与字符串补全提示的 CS1 形成性测验,单行代码判定精度/召回率超 99%,并显著减少教师答疑。
学习编程时,学生需要在写复杂程序前通过即时反馈练习编写一行代码,但代码答案高度多变。本文采用模板匹配方法,在 CS1 课程中使用基于 Perl 兼容正则表达式的答案模板与字符串补全提示进行测验。作者报告了连续 4 年、497 名学生的使用与评估结果:对要求写单行代码的问题,正则表达式判定取得超过 99% 的精确率和召回率,并能无论学生初始答案多错都给出字符串补全反馈。引入带补全提示的形成性测验后,教师与助教收到的相关答疑显著减少,大多数练习尝试无需教学人员帮助即可找到正确答案;但也有部分学生只利用测验获取正确答案而不实际作答。
One of the important tasks in learning programming is writing a line of code performing the necessary action. This allows students to practice skills in a playground with instant feedback before writing more complex programs and increases their proficiency when solving programming problems. However, answers in the form of program code have high variability. Among the possible approaches to grading and providing feedback, we chose template matching. This paper reports the results of using regular-expression-based questions with string completion hints in a CS1 course for 4 years with 497 students. The evaluation results show that Perl-compatible regular expressions provide good precision and recall (more than 99%) when used for questions requiring writing a single line of code while being able to provide string-completion feedback regardless of how wrong the initial student’s answer is. After introducing formative quizzes with string-completion hints to the course, the number of questions that teachers and teaching assistants received about questions in the formative quizzes dropped considerably: most of the training question attempts resulted in finding the correct answer without help from the teaching staff. However, some of the students use formative quizzes just to learn correct answers without actually trying to answer the questions.