一句话:提出 LitterBox,一个检测 Scratch 程序已知缺陷与代码坏味,并向学习者解释原因和可能误解的 Linter。
基于积木的 Scratch 编程易学有趣,但学习者常因编程误解写出含缺陷的程序,代码也常质量低、存在代码坏味,影响理解、复用与体验。本文提出 LitterBox:给定 Scratch 程序或其公开项目 ID,它会将程序与已知缺陷和代码坏味模式进行匹配检查。对每个识别的问题,LitterBox 不仅给出代码位置,还解释底层原因和可能的学习者误解。学习者可通过易用的 Web 界面查看积木代码中的错误可视化信息;研究者则可将其作为通用、开源、可扩展的 Scratch 程序静态分析框架。
Creating programs with block-based programming languages like Scratch is easy and fun. Block-based programs can nevertheless contain bugs, in particular when learners have misconceptions about programming. Even when they do not, Scratch code is often of low quality and contains code smells, further inhibiting understanding, reuse, and fun. To address this problem, in this paper we introduce LitterBox, a linter for Scratch programs. Given a program or its public project ID, LitterBox checks the program against patterns of known bugs and code smells. For each issue identified, LitterBox provides not only the location in the code, but also a helpful explanation of the underlying reason and possible misconceptions. Learners can access LitterBox through an easy to use web interface with visual information about the errors in the block-code, while for researchers LitterBox provides a general, open source, and extensible framework for static analysis of Scratch programs.