An Exploration of Cognitive Shifting in Writing Code

Ilenia Fronza, Arto Hellas, Petri Ihantola, Tommi Mikkonen

Research output: Chapter in Book/Report/Conference proceedingConference contributionScientificpeer-review


Programming is considered a demanding task that requires focusing on detail at code level. Students learning to program need to learn to think like a programmer, which involves coming up with plans needed to solve problems, and they need to learn to write the code that corresponds to the plans that they have thought of. The use of multiple files creates additional overhead to the process, as part of the code is not visible to the student. If a student does not remember the contents of a particular file, she needs to consciously move from writing code in one file to reading code in another file. This conscious transition of attention from one location to another is known as cognitive shifting. Using key-level data collected from a programming exam, we analyze students' movements within files and between files, and relate these movements with students' performance in the course. Our results indicate that frequently moving from one file to another may lead to worse performance than more focused actions, but no such effect exists when analyzing movements within an individual file.
Original languageEnglish
Title of host publicationProceedings of the ACM Conference on Global Computing Education (CompEd '19)
Number of pages7
Place of PublicationNew York, NY, USA
Publication date2019
ISBN (Electronic)978-1-4503-6259-7
Publication statusPublished - 2019
MoE publication typeA4 Article in conference proceedings
EventACM Global Computing Education Conference: CompEd '19 - Chengdu, China
Duration: 17 May 201919 May 2019
Conference number: 1

Fields of Science

  • 516 Educational sciences
  • 113 Computer and information sciences

Cite this