Subgoal-labeled code examples help learners understand code patterns and apply them to different problem contexts. Subgoal labels are multi-level in nature and based on goal structures that define the hierarchical functional units in code. Data-driven methods and experts can supply the goal structures, but they do not work in environments with scarce data and limited availability of experts. Previous research has shown that learnersourcing is effective for sourcing high-quality subgoal labels of given goal structures. We extend this research by learnersourcing goal structures themselves, thereby making the generation of subgoal-labeled materials fully learner-driven. We introduce CodeTree, a system that generates multi-level goal structures by aggregating learner-generated subgoals from two subgoal learning activities---Generation and Selection. In a between-subjects study, 45 novices studied three code examples with either CodeTree or code explanations alone. The results showed that CodeTree could learnersource high-quality goal structures and subgoal labels for all three examples with just five learners. Learners reported a significantly higher learning gain and satisfaction compared to the baseline.
PAPER PRESENTATION
LEARNERSOURCING PIPELINE
CodeTree consists of two subgoal learning activities: Generation and Selection. In the Generation activity, learners self-explain subgoals of code examples by grouping code lines into functionally meaningful units and describing each unit. In the Selection activity, learners solve multiple choice questions (MCQs) that ask for selecting the best label for each subgoal. After populating enough subgoals from learners, CodeTree algorithmically aggregates the subgoals into comprehensive subgoal hierarchies. Learner-generated subgoals from the Generation activity are the seed for our algorithm to generate initial subgoal hierarchies. The generated hierarchies are fed to the Selection activity to use learners' votes to verify and filter subgoal labels.
LEARNERSOURCED SUBGOAL HIERARCHIES
Through a user study with 45 Python learners, we collected subgoal hierarchies for the following three code examples. Hover over the colored bars to see the subgoal label and expert-assessed quality for each code group. Note that the subgoal labels are machine-translated from Korean to English.
Subgoal Label:
Declare variables
Quality:
Code Group: Core & Meaningful
Subgoal Label: Problem-independent
BIBTEX
@inproceedings{jin2024codetree,
author = {Jin, Hyoungwook and Kim, Juho},
title = {CodeTree: A System for Learnersourcing Subgoal Hierarchies in Code Examples},
year = {2024},
issue_date = {April 2024},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {8},
number = {CSCW1},
url = {https://doi.org/10.1145/3637308},
doi = {10.1145/3637308},
journal = {Proc. ACM Hum.-Comput. Interact.},
month = apr,
articleno = {31},
numpages = {37},
keywords = {artifact or system, crowdsourcing, education/learning, quantitative methods}
}