Authoring feedback for novice programmers in a block-based language

We present a block-based language for specifying feedback to novice learners about the programs they are constructing in a block-based programming language. In addition to feedback based on run-time and output checking, we are particularly interested in immediate feedback: corrective guidance given as the program is being constructed. Immediate feedback is a natural extension of the block-based language philosophy. Block-based languages prevent by design certain types of mistakes in all cases. Immediate feedback guides against, without fully preventing, problem-specific mistakes (i.e., constructions that are erroneous in only some cases). A feedback specification contains a block pattern and a set of actions that can be taken whenever the corresponding pattern is present or absent in the student's block program for a given problem. The paper illustrates the language through several examples derived from misconceptions found in the block-based programs of students taking a university-level Computational Thinking class. The feasibility of the proposed approach is shown by the translation of a specification using an evolving programmatic interface in BlockPy, a dual block/text programming environment for a subset of Python.