Write a Line: Tests with Answer Templates and String Completion Hints for Self-Learning in a CS1 Course

Oleg Sychev
DOI: https://doi.org/10.1109/ICSE-SEET55299.2022.9794157
2022-04-20
Abstract:One of the important scaffolding tasks in programming learning 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.
Computers and Society
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the challenges that students face when writing single - line code in an introductory computer science course (CS1). Specifically, the paper focuses on how to provide an effective automatic evaluation and feedback mechanism through the use of regular - expression - based questions and string - completion prompts. Traditional methods have limitations when dealing with programming - language answers, especially when students' answers are diverse, and simple short - answer - question software has difficulty in accurate evaluation. In addition, without an effective feedback mechanism, students are likely to get stuck when they encounter difficulties and need teacher intervention to continue learning. To solve these problems, the author proposes an evaluation method based on regular expressions and string - completion prompts and applies it to the CS1 course at Volgograd State Technical University. This method can not only accurately match the answers submitted by students but also provide specific feedback when students make mistakes, helping them gradually correct the errors until they find the correct answer. In this way, the author aims to improve students' programming skills, reduce the workload of teachers, and improve the overall teaching effect.