You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Access to the PencilCode dataset requires manual approval from the Pencil Code team. This dataset contains anonymized interaction traces from students (including K-12 learners). By requesting access, you agree to use this data solely for non-commercial research purposes, to protect the privacy of the students whose interactions are represented, and not to attempt to re-identify any individuals. Please describe your intended research use in the field below.

Log in or Sign Up to review the conditions and access this dataset content.

PencilCode Program Traces

Paper: Modeling Student Learning with 3.8 Million Program Traces
Code: meghabyte/pencilcode-public
Contact: megha@cs.stanford.edu, alexisro@mit.edu, jjb@eng.ufl.edu, jda@mit.edu

Gated Dataset — Manual Approval Required.
Access is granted pending review by the Pencil Code team. Please submit your request above with a brief description of your intended research use. Any requests will be reviewed by Jeremiah Blanchard at jjb@eng.ufl.edu


Dataset Summary

This dataset contains 3.8 million programming reasoning traces collected from users of Pencil Code, a free open-source educational platform where students learn programming through visual block-based and text-based coding (CoffeeScript, JavaScript, HTML/CSS).

Each trace records a student's full interaction history with a single assignment — the ordered sequence of program states they wrote, from first attempt to final submission — along with associated timestamps. The dataset spans 9 years (2015–2024) and covers over 1.3 million unique anonymized users.

Unlike datasets that capture only final program submissions, PencilCode traces reveal the iterative reasoning process: exploratory behavior, debugging strategies, goal backtracking, and stylistic personalization. This makes the dataset uniquely suited for studying how people learn to code, not just what they produce.


Dataset Details

Property Value
Total traces ~3.8 million
Unique anonymized users ~1.3 million
Avg. traces per user 2.86
Total size ~248 GB
Date range 2015–2024
Programming languages CoffeeScript, JavaScript, HTML/CSS

Data Fields

Each record contains:

  • username — Hashed/anonymized student identifier
  • title — Assignment name (e.g., snowman, lighthouse, confetti)
  • programs — Temporally ordered list of program states written by the student
  • timestamps — Execution timestamps corresponding to each program state

Data Splits

The dataset is organized into four evaluation splits mirroring those used in the paper:

Split Description
seen_student_seen_title In-distribution: both student and title seen during training
unseen_student_seen_title ~259K traces; held-out students on known assignments
seen_student_unseen_title ~71K traces; known students on new assignments
unseen_student_unseen_title ~8.8K traces; fully out-of-distribution

Intended Uses

This dataset is intended for non-commercial academic research, including:

  • Training and evaluating language models for research on human code edit sequences
  • Studying student learning behavior and programming skill development
  • Building student modeling, knowledge tracing, and intelligent tutoring systems
  • Investigating personalization and few-shot adaptation in educational AI
  • Research on code generation, diversity, and style preservation

Out-of-Scope Uses

  • Commercial applications of any kind
  • Any attempt to re-identify individual students
  • Deployment in production educational systems without further ethics review

Privacy

All student identifiers are cryptographically hashed. The dataset does not contain names, emails, IP addresses, or any other directly identifying information. Data access is gated and requires approval from the Pencil Code team specifically to protect the privacy of K-12 students whose interactions are represented.


Citation

If you use this dataset, please cite:

@inproceedings{ross2026pencilcode,
  title     = {Modeling Student Learning with 3.8 Million Program Traces},
  author    = {Ross, Alexis and Srivastava, Megha and Blanchard, Jeremiah and Andreas, Jacob},
  booktitle = {Artificial Intelligence in Education (AIED 2026)},
  address   = {Seoul, South Korea},
  year      = {2026}
}

License & Access

This dataset is shared under a custom data use agreement with Pencil Code. Access is manually reviewed and granted for non-commercial research purposes only. Any requests will be reviewed by Jeremiah Blanchard at jjb@eng.ufl.edu.

Downloads last month
11

Paper for pencil-code/anonymized_data