Referring to solution programs written by other users is helpful for learners in programming education. However, current online judge systems just list all solution programs submitted by users for references, and the programs are sorted based on the submission date and time, execution time, or user rating, ignoring to what extent the programs can be helpful to be referenced. In addition, users struggle to refer to a variety of solution approaches since there are too many duplicated and near-duplicated programs. To motivate learners to refer to various solutions to learn better solution approaches, in this paper, we propose an approach to deduplicate and rank common solution programs in each programming problem. Inspired by the nature that the many-duplicated program adopts a more common approach and can be a general reference, we remove the near-duplicated solution programs and rank the unique programs based on the duplicate count. The experiments on the solution programs submitted to a real-world online judge system demonstrate that the number of programs is reduced by 60.20%, whereas the baseline only reduces by 29.59% after the deduplication, meaning that users only need to refer to 39.80% of programs on average. Furthermore, our analysis shows that top-10 ranked programs cover 29.95% of programs on average, indicating that users can grasp 29.95% of solution approaches by referring to only 10 programs. The proposed approach shows the potential of reducing the learners' burden of referring to too many solutions and motivating them to learn a variety of solution approaches.
翻译:在编程教育中,参考其他用户编写的解决方案程序对学习者颇有助益。然而,现行在线判题系统仅按提交时间、执行时间或用户评分罗列所有解决方案程序供参考,却忽视了程序本身的可参考价值。此外,大量重复或近似重复的程序使得用户难以获取多样化的解题思路。为激励学习者参考多种解决方案、习得更优的解题方法,本文提出一种针对编程问题中常见解决方案程序进行去重与排序的方法。基于"重复次数越多的程序越体现通用解法、越值得参考"的特性,我们剔除近似重复的解决方案程序,并根据重复次数对唯一程序进行排序。在真实在线判题系统的解决方案程序数据集上的实验表明:经去重后,程序数量减少60.20%,而基线方法仅减少29.59%,意味着用户平均只需参考39.80%的程序。进一步分析显示,排名前10的程序平均覆盖29.95%的解决方案,表明用户仅需参考10个程序即可掌握29.95%的解题思路。该方法展现出减轻学习者参考过多程序负担,并激励其学习多样化解题思路的潜力。