Event Abstract

Understanding Programmers' Brains with fMRI

  • 1 University of Passau, Germany
  • 2 Carnegie Mellon University, United States
  • 3 Georgia Institute of Technology, United States
  • 4 Leibniz Institute for Neurobiology, Germany

The human factor plays an important role in software engineering, because humans design, implement, and maintain software. One of the most important cognitive processes is program comprehension, because programmers spend most of their time with understanding source code [3,4,5]. However, despite of more than 30 years of research, we still have no clear understanding of the relevant processes during comprehending source code. To gain a deeper understanding of program comprehension, we measured it by using functional magnetic resonance imaging (fMRI) [2] since fMRI has proved successful to study comparatively complex cognitive processes in detail. Our hope is that in the process of understanding developer's cognition, we can create a platform for sharing how these complex processes map onto other studies of cognition, and even incorporate ideas for organizing software into models of cognitive processes.

In our study, we designed several short source-code snippets and asked computer-science students to determine the output if the source code would be executed (see Fig. 2 or project's website (tinyurl.com/ProgramComprehensionAndfMRI/) for examples). As control condition, we let participants locate syntax errors that did not require understanding the source code (Fig. 3).

After testing and refining the source-code snippets in behavioral pilot studies [1], we carried out the measurements with 17 participants on a 3~Tesla scanner. For fMRI, we acquired 985 functional volumes in 32 minutes and 50 seconds using standard echo planar imaging (EPI) sequence with whole brain coverage at an isotropic resolution of 3 mm. Functional data were analyzed in BrainVoyager employing a random effects GLM contrasting the program comprehension condition against the syntax condition.

We found Brodmann areas 6, 21, 40, 44, and 47 are activated during program comprehension (Fig. 1). These areas are related to language processing, working memory, and problem solving, which is in line with the current understanding of program comprehension. The results of our study suggest that fMRI is promising to give us a more detailed understanding of program comprehension. Over the next years, we hope that more researchers will adopt our idea. By raising the awareness of how fMRI can be applied to software-engineering research, we also hope that more software engineers will contribute to develop more powerful fMRI paradigms. In the long run, we will gain a better understanding of the neural basis of designing, implementing, and maintaining software, which may in turn help to optimize tools or programming languages.

Additionally, our research will have a broad impact on education, so that training beginning programmers can be improved considerably. Despite intensive research (e.g., Technical Symposium on Computer Science Education, Innovation and Technology in Computer Science Education), it is still rather unclear how and why students struggle with learning programming. With a detailed understanding of the cognitive processes that underlie a developers' every-day task, we might find the right recipe to teach any student to become an excellent software developer (e.g., by including training language skills, since our study showed a close relationship to language processing).

As next steps, we will conduct more such experiments. To support replication and help other software-engineering researchers adopt fMRI for their research, we will make all data publicly available. Eventually, we hope to find answers to heatedly discussed questions, such as ``How should we teach programming?'' or ``What makes a programmer excellent?''.

Figure 1
Figure 2
Figure 3

Acknowledgements

Thanks to Thomas Leich and Gunter Saake for fruitful discussions.

References

[1] J. Siegmund, A. Brechmann, S. Apel, C. Kästner, J. Liebig, T. Leich, and G. Saake. Toward Measuring Program Comprehension with Functional Magnetic Resonance Imaging. In Proc. Int'l Symposium Foundations of Software Engineering{New Ideas Track (FSE-NIER), pages 24:1-24:4. ACM, 2012.
[2] J. Siegmund, C. Kastner, S. Apel, C. Parnin, A. Bethmann, T. Leich, G. Saake, and A. Brechmann. Understanding Understanding Source Code with Functional Magnetic Resonance Imaging. In Proc. Int'l Conf. Software Engineering (ICSE), 2014. To appear.
[3] T. Standish. An Essay on Software Reuse. IEEE Trans. Softw. Eng., SE{10(5):494-497, 1984.
[4] R. Tiarks. What Programmers Really Do: An Observational Study. Softwaretechnik-Trends, 31(2):36-37, 2011.
[5] A. von Mayrhauser, M. Vans, and A. Howe. Program Understanding Behaviour during Enhancement of Large-scale Software. Journal of Software Maintenance: Research and Practice, 9(5):299-327, 1997.

Keywords: Program Comprehension, Software Development, fMRI, Educational Status, software engineering

Conference: Neuroinformatics 2014, Leiden, Netherlands, 25 Aug - 27 Aug, 2014.

Presentation Type: Poster, to be considered for oral presentation

Topic: Neuroimaging

Citation: Siegmund J, Kästner C, Apel S, Parnin C, Bethmann A and Brechmann A (2014). Understanding Programmers' Brains with fMRI. Front. Neuroinform. Conference Abstract: Neuroinformatics 2014. doi: 10.3389/conf.fninf.2014.18.00040

Received: 04 Apr 2014; Published Online: 04 Jun 2014.

* Correspondence: Dr. Janet Siegmund, University of Passau, Passau, Germany, siegmunj@fim.uni-passau.de

© 2007 - 2017 Frontiers Media S.A. All Rights Reserved