  Introductory programming courses aim to teach students to write code
independently. However, transitioning from studying worked examples to
generating their own code is often difficult and frustrating for students,
especially those with lower CS self-efficacy in general. Therefore, we
investigated the impact of using Parsons problems as a code-writing scaffold
for students with varying levels of CS self-efficacy. Parsons problems are
programming tasks where students arrange mixed-up code blocks in the correct
order. We conducted a between-subjects study with undergraduate students (N=89)
on a topic where students have limited code-writing expertise. Students were
randomly assigned to one of two conditions. Students in one condition practiced
writing code without any scaffolding, while students in the other condition
were provided with scaffolding in the form of an equivalent Parsons problem. We
found that, for students with low CS self-efficacy levels, those who received
scaffolding achieved significantly higher practice performance and in-practice
problem-solving efficiency compared to those without any scaffolding.
Furthermore, when given Parsons problems as scaffolding during practice,
students with lower CS self-efficacy were more likely to solve them. In
addition, students with higher pre-practice knowledge on the topic were more
likely to effectively use the Parsons scaffolding. This study provides evidence
for the benefits of using Parsons problems to scaffold students' write-code
activities. It also has implications for optimizing the Parsons scaffolding
experience for students, including providing personalized and adaptive Parsons
problems based on the student's current problem-solving status.
