一句话:提出 Segments 问题作为研究函数式程序员解题策略的替代性挑战,并归纳出七种高层解法策略。
Elliot Soloway 的 Rainfall 问题是研究程序员解题策略的经典题目,Kathi Fisler 曾从函数式程序员视角研究该题,发现五种高层解法策略,其中三种占主导并覆盖 80% 以上的解答。本文提出 Segments 问题作为替代性挑战,用于考察函数式程序员的解题能力。作者分析了学生解答、其高层解法策略以及相应的原型解法,结果表明 Segments 问题能引出七种不同的高层解法策略,并可进一步细分为 17 个子类。该问题特别适合考察涉及列表处理与高阶函数的解题能力。
Abstract Elliot Soloway’s Rainfall problem is a well-known and well-studied problem to investigate the problem-solving strategies of programmers. Kathi Fisler investigated this programming challenge from the point of view of functional programmers. She showed that this particular challenge gives rise to five different high-level solution strategies, of which three are predominant and cover over 80% of all chosen solutions. In this study, we put forward the Segments problem as an alternative challenge to investigate the problem-solving skills of functional programmers. Analysis of the student solutions, their high-level solution strategies, and corresponding archetype solutions shows that the Segments problem gives rise to seven different high-level solution strategies that can be further divided into 17 subclasses. The Segments problem is particularly suited to investigate problem-solving skills that involve list processing and higher-order functions.