SketchMind: Toward Executable Pen-Based Sketching for Constructing Sorting Algorithms

Yang Wu, Clément Pit-Claudel and April Yi Wang

Abstract

Pen-and-paper tracing is commonly used to think through algorithms before writing code, allowing learners to step through concrete executions and explore possible solutions. However, this process does not readily support abstraction. As traces grow, they lose structure. Steps accumulate into long sequences and are often skipped or compressed, leading to incomplete or inconsistent reasoning. As a result, learners struggle to extract reusable algorithmic patterns or generalize beyond individual instances. We present SketchMind , a proof-of-concept sketch-based programming system in which users construct executable traces of sorting algorithms through pen-based interactions. By performing operations directly on visual representations (e.g., arrays and variables) using pen strokes, users can construct and refine sorting algorithms without writing code. SketchMind supports four key capabilities: (1) executable tracing, where actions are recorded and replayed as runnable steps; (2) reusable pens, which encapsulate trace segments into user-defined procedures; (3) multi-level trace views across values, indices, and symbolic parameters; and (4) cross-instance validation, which applies learned procedures to new inputs and generates minimal counterexamples.

Venue
UIST 2026
Volume
Proceedings of the 39th Annual ACM Symposium on User Interface Software and Technology
DOI
10.1145/3830398.3830500
PDF
https://dl.acm.org/doi/pdf/10.1145/3830398.3830500
Anthology ID
2026.uist.25

Cite

@inproceedings{wu-etal-2026-sketchmind,
    title = {{SketchMind: Toward Executable Pen-Based Sketching for Constructing Sorting Algorithms}},
    author = {Yang Wu and Clément Pit-Claudel and April Yi Wang},
    booktitle = {Proceedings of the 39th Annual ACM Symposium on User Interface Software and Technology},
    isbn = {9798400728563},
    year = {2026},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    doi = {10.1145/3830398.3830500},
    url = {https://doi.org/10.1145/3830398.3830500},
    abstract = {Pen-and-paper tracing is commonly used to think through algorithms before writing code, allowing learners to step through concrete executions and explore possible solutions. However, this process does not readily support abstraction. As traces grow, they lose structure. Steps accumulate into long sequences and are often skipped or compressed, leading to incomplete or inconsistent reasoning. As a result, learners struggle to extract reusable algorithmic patterns or generalize beyond individual instances. We present SketchMind , a proof-of-concept sketch-based programming system in which users construct executable traces of sorting algorithms through pen-based interactions. By performing operations directly on visual representations (e.g., arrays and variables) using pen strokes, users can construct and refine sorting algorithms without writing code. SketchMind supports four key capabilities: (1) executable tracing, where actions are recorded and replayed as runnable steps; (2) reusable pens, which encapsulate trace segments into user-defined procedures; (3) multi-level trace views across values, indices, and symbolic parameters; and (4) cross-instance validation, which applies learned procedures to new inputs and generates minimal counterexamples.}
}