Causal Relationships and Programming Outcomes: A Transcranial Magnetic Stimulation Experiment
Hammad Ahmad, Madeline Endres, Kaia Newman, Priscila Santiesteban, Emma Shedden, Westley Weimer
Abstract
Understanding the relationship between cognition and programming outcomes is important: it can inform interventions that help novices become experts faster. Neuroimaging techniques can measure brain activity, but prior studies of programming report only correlations. We present the first causal neurological investigation of the cognition of programming by using Transcranial Magnetic Stimulation (TMS). TMS permits temporary and noninvasive disruption of specific brain regions. By disrupting brain regions and then measuring programming outcomes, we discover whether a true causal relationship exists. To the best of our knowledge, this is the first use of TMS to study software engineering. Where multiple previous studies reported correlations, we find no direct causal relationships between implicated brain regions and programming. Using a protocol that follows TMS best practices and mitigates for biases, we replicate psychology findings that TMS affects spatial tasks. We then find that neurostimulation can affect programming outcomes. Multi-level regression analysis shows that TMS stimulation of different regions significantly accounts for 2.2% of the variance in task completion time. Our results have implications for interventions in education and training as well as research into causal cognitive relationships.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 9caed836-7bb9-4d5c-9ec2-93cdf5ee9ca6Builds on9
- Large Language Models are Few-shot Testers: Exploring LLM-based General Bug ReproductionSungmin Kang, Juyeon Yoon, Shin YooICSE 2023 · 163 citations
- Program Comprehension and Code Complexity Metrics: An fMRI StudyNorman Peitek, Sven Apel, Chris Parnin, André Brechmann et al.ICSE 2021 · 59 citations
- Neurological divide: an fMRI study of prose and code writingRyan Krueger, Yu Huang, Xinyu Liu, Tyler Santander et al.ICSE 2020 · 38 citations
- Mental Wellbeing at Work: Perspectives of Software EngineersNovia Wong, Victoria Jackson, André van der Hoek, Iftekhar Ahmed et al.CHI 2023 · 35 citations
- To read or to rotate? comparing the effects of technical reading training and spatial skills training on novice programming abilityMadeline Endres, Madison Fansher, Priti Shah, Westley WeimerFSE 2021 · 18 citations
Related papers
- Relating Reading, Visualization, and Coding for New Programmers: A Neuroimaging StudyMadeline Endres, Zachary Karas, Xiaosu Hu, Ioulia Kovelman et al.ICSE 2021 · 1 citation
- Connecting the dots: rethinking the relationship between code and prose writing with functional connectivityZachary Karas, Andrew Jahn, Westley Weimer, Yu HuangFSE 2021 · 10 citations
- Studying Programmers Without Programming: Investigating Expertise Using Resting State fMRIZachary Karas, Benjamin Gold, Violet Zhou, Noah Reardon et al.ICSE 2025
- Haptic Source-Effector: Full-Body Haptics via Non-Invasive Brain StimulationYudai Tanaka, Jacob Serfaty, Pedro LopesCHI 2024 · 27 citations
- Primed Action: Preserving Agency while Accelerating Reaction Time via Subthreshold Brain StimulationYudai Tanaka, Hunter G. Mathews, Pedro LopesUIST 2025 · 3 citations
