Your Brain + Coding

I’ve always been a huge fan of psychology and the brain — trying to understand how and why people are wired they way they are, how two beings who come from the same womb can turn out so drastically different from one another. I once took a course on the psychology of dreams, during which my mind was repeatedly blown by my professor’s accurate dissection and interpretation of my peers’ dreams. But I digress.

I started digging around for anything that straddled the two worlds and fell into a rabbit hole reading papers written by researcher at University of Passau (Germany) Janet Siegmund, and emerged on the other side after several “ah-ha” moments. Siegmund works in the field of empirical software engineering, program comprehension, and fMRI.

The Study: 17 people (15 male, one female) participated in the study. They all read a short 20-line snippet of code in Java and attempted to comprehend what they’d seen; no live-coding was performed.

Programming: Math, Science, or Language?

It’s like learning a new language. You’ll do better if you’re good at math. It’s likely you’ve heard those things a time or two before on your road to coding. So which is it really? Programming is undoubtedly making its way into school curriculums, but given its relative newness as a subject, its niche has yet to be determined. As of late 2016, 20 states have passed legislation for students to receive credit for computer science classes to fulfill either math, science, or foreign language credits. While most consider computer science a part of former two groups, Texas allows students to receive credits towards the latter group. (Kentucky and New Mexico had considered similar circumstances, but didn’t end up following through.)

Screen Shot 2017-09-25 at 10.03.40 PM.png

Programming requires sound logic and problem-solving skills, which align with skills that are required in math. However, interestingly enough, Siegmund’s research from 2014, in which she and a team of researchers (a psychologist, a neurobiologist, a linguist, as well as computer scientists and software engineers) peered into brains of programmers (using fMRIs), shows that the parts of the brain that do light up have a strong relationship with language-processing regions in the brain.

 

Screen Shot 2017-09-28 at 11.50.19 AM.png

Screen Shot 2017-09-28 at 11.50.28 AM.png



Learning to Code

One of the questions that emerged as a result of the study: how do we create excellent programmers? We’ve beared witness to coders who seem–for lack of another descriptor–gifted at the art of coding. If coding bears resemblance to language, then wouldn’t it make sense to have coding languages that write most like natural languages? SQL and Ruby come close.

According to Siegmund’s research, the fact that the brain uses portions specific to language processing suggests those great at and enjoy learning new languages may find it easier to learn programming languages, too. On the other hand, it’s still a mystery how excellent programmers, considered those who are 10 times more productive than their peers, got, well… So excellent… After having had comparable years of experience and teaching. What is known is that experts typically have much lower brain activation than newbies — for example, pro-golfers and musicians versus their novice counterparts. Siegmund suggests that these excellent programmers likely approach problems differently, and this very fact may help researchers abstract insights into how best to teach future generations of developers.

Siegmund’s study tested how well the participants’ understood the program. Results would likely be different if participants were challenged with implementing source code.

Fun Facts:

  • Researchers Sharif and Maletic used eye tracking to investigate the effect of under_score vs. camelCase style on recognition time. They found that identifiers in under_score style are recognized faster than identifiers in camelCase.
  • Did you know that the Chinese, along with other Asian groups, program in English? This obviously makes the learning curve for non-English speakers much higher, as they’re tasked with both learning English and a programming language simultaneously.

Link to full publication: http://www.infosun.fim.uni-passau.de/cl/publications/docs/SKA+14.pdf

Leave a comment

Design a site like this with WordPress.com
Get started