Using Examples as Guideposts for Programming Exercises: Providing Support while Preserving the Challenge

Professional programmers often use examples when writing code. Programming students are less skilled at understanding and modifying code that they did not write by themselves. We offered our students a large example that resembled their assignment and then analyzed their submissions. We argue that this practice is beneficial for students as it helps them in preparing their assignment, trains them in refactoring code, while keeping the task challenging enough to allow teachers to assess the quality of individual students’ work.