Pagebreaks: Multi-Cell Scopes in Computational Notebooks
Abstract
Global variables lie at the root of many programmer complaints about computational notebooks. While programmers in other environments often address these barriers with function scopes, notebook programmers use functions less often. Analyzing the interaction between user behaviors, the programming language, and the notebook environment, we propose one possible explanation: that functions interfere with using notebooks in the exploratory ways users value. For example, because partial functions are not parseable, they cannot be run in isolation, so programmers cannot split function bodies across cells to iteratively tweak and rerun the last few lines. To explore how to offer non-global scopes without hampering exploratory notebook interactions, we built Pagebreaks, a small language construct for adding scopes around multiple Jupyter Notebook cells. In an in-situ study, we explored how programmers used Pagebreaks to manage variables with non-global scopes but also to visually and conceptually organize programs in a way akin to functions.
- Venue
- CHI 2025
- Volume
- Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems
- DOI
- 10.1145/3706598.3713620
- https://dl.acm.org/doi/pdf/10.1145/3706598.3713620
- Anthology ID
2025.chi.535
Cite
@inproceedings{rawn-chasins-2025-pagebreaks,
title = {{Pagebreaks: Multi-Cell Scopes in Computational Notebooks}},
author = {Eric Rawn and Sarah E. Chasins},
booktitle = {Proceedings of the 2025 CHI Conference on Human Factors in Computing Systems},
isbn = {9798400713941},
year = {2025},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
doi = {10.1145/3706598.3713620},
url = {https://doi.org/10.1145/3706598.3713620},
abstract = {Global variables lie at the root of many programmer complaints about computational notebooks. While programmers in other environments often address these barriers with function scopes, notebook programmers use functions less often. Analyzing the interaction between user behaviors, the programming language, and the notebook environment, we propose one possible explanation: that functions interfere with using notebooks in the exploratory ways users value. For example, because partial functions are not parseable, they cannot be run in isolation, so programmers cannot split function bodies across cells to iteratively tweak and rerun the last few lines. To explore how to offer non-global scopes without hampering exploratory notebook interactions, we built Pagebreaks, a small language construct for adding scopes around multiple Jupyter Notebook cells. In an in-situ study, we explored how programmers used Pagebreaks to manage variables with non-global scopes but also to visually and conceptually organize programs in a way akin to functions.}
}