Scientists Looking at Programmers’ Brains see more Language than Mathematics: The Neuroscience of Programming

January 23, 2017 at 7:00 am 12 comments

I’m not convinced that our ability to image brains is actually telling us much about cognition yet.  I did find this result surprising, that our understanding of programming languages seems more linguistic than mathematical

Scientists are finding that there may be a deeper connection between programming languages and other languages then previously thought. Brain-imaging techniques, such as fMRI allow scientists to compare and contrast different cognitive tasks by analyzing differences in brain locations that are activated by the tasks. For people that are fluent in a second language, studies have shown distinct developmental differences in language processing regions of the brain. A new study provides new evidence that programmers are using language regions of the brain when understanding code and found little activation in other regions of the brain devoted to mathematical thinking.

Source: Scientists Begin Looking at Programmers’ Brains: The Neuroscience of Programming | Huffington Post

Entry filed under: Uncategorized. Tags: , .

A review of one of my favorite papers: Cognitive Apprenticeship (Collins, Brown, Newman) How the tech sector could move in One Direction to get more women in computing

12 Comments Add your own

  • 1. rademi  |  January 23, 2017 at 9:57 am

    Given the incredible breadth of Mathematics, I wonder what specific kinds of Mathematical reasoning are associated with those brain scans.

    (I also am wondering about sample size issues – are we out in the weeds here, with non-reproducible results?)

    Reply
  • 2. gasstationwithoutpumps  |  January 23, 2017 at 12:02 pm

    This sounds like the usual brain scan just-so story. They take a small sample of high-dimensional data, then look for a correlation with their experimental condition—there is always a correlation somewhere—then they make up a story to explain the result. The results are rarely duplicable. Someone needs to teach the brain-scan journal reviewers some statistics.

    I suspect that a lot of mathematical reasoning involves the linguistic areas of the brain. The researchers may be confusing mathematics with arithmetic (given the lack of adequate statistics in most brain-scan research, one suspects them of mathematical naivete).

    Reply
  • 3. dbrewczynski  |  January 23, 2017 at 2:12 pm

    I wonder if reading and understanding code activates language processing areas of the brain, while writing code activates some other area of the brain entirely.

    Reply
    • 4. alanone1  |  January 24, 2017 at 12:57 am

      I think that is the main one of the two key questions here (the other is “how much do they actually know about what regions do what?” etc).

      It makes some sense for reading code to create a kind of a story of what is going on (more than an initial generalization). And, a lot of “mathematical thinking” is essentially “meta-thinking”, and I don’t think there is much evidence from much meta-thinking by most programmers — that just isn’t the way most of them program.

      Reply
  • 5. Guy Haas  |  January 24, 2017 at 11:05 am

    I noticed that the author’s description of the activity observed included “locating syntax errors” and so thought to myself, yea, that could be a language thing, not mathematical.

    I also noticed the date of the article was 2014 so I followed the link provided to Dr. Siegmund, to see if there was updated information. I found a reference to a 2016 paper by her – Program Comprehension: Past, Present, Future (http://www.infosun.fim.uni-passau.de/publications/docs/FoSE16.pdf) There is a section on page 5 where she expands on her work with other studies. One of them is:

    >> Other researchers have also started to use neuro-imaging
    >> techniques. For example, Nakagawa and others used nearinfrared
    >> spectroscopy to measure changes in blood flow while
    >> programmers mentally executed source code. They found
    >> activation in the prefrontal cortex (a brain area that is necessary
    >> for higher-order cognitive processes), which correlated with the
    >> difficulty of a task [18].

    So it seems to me that depending upon what a programmer is doing, the task at hand, different areas of the brain get involved. It would be interesting to see what an fMRI experiment would reveal when reading/understanding a blocks-based program (no syntax).

    Reply
    • 6. gasstationwithoutpumps  |  January 24, 2017 at 11:39 am

      Block-based programs do have syntax—just in a 2D form rather than a 1D form, and more frequently supported by the editing software.

      Reply
      • 7. Guy Haas  |  January 24, 2017 at 11:56 am

        I’ve only played with Scratch and Snap! a little bit and have read a few papers. Would you please post an example or examples of syntax errors

        Reply
        • 8. gasstationwithoutpumps  |  January 25, 2017 at 12:35 am

          Putting two blocks side by side (interpreted as separate scripts) rather than sequentially. Putting up a conditional block without filling all slots.

          Reply
  • 9. chronologicaldot  |  February 2, 2017 at 2:11 pm

    If you think about it, programming is primarily about manipulating a language to complete some logical process. You don’t actually have to DO math – the computer does it for you. Now and then, I do math when I program, but it’s mainly just bounds checking to make sure the outcome will be what I expect – it’s not like I’m crunching numbers. So these results are not surprising, and I didn’t need expensive equipment to come to that conclusion.

    Reply
    • 10. rademi  |  February 2, 2017 at 3:57 pm

      I suppose there is some validity to the idea that all math is addition (repeated, inverted, etc. etc.)

      That said, in my experience an essential aspect of writing good (clean, functional, straightforward) computer programs is the ability to work through example cases manually. You of course can get the computer to assist here, but if you are unable to perform the operations yourself you’ll be severely handicapped (you wind up doing lots of unnecessary work and writing a lot of unnecessary and useless code).

      Not that that’s necessarily always a bad thing.

      But deadcode and unnecessary processing has been building up to the point it’s often times a detriment.

      Reply
      • 11. chronologicaldot  |  February 2, 2017 at 6:51 pm

        That is true. I suppose for the lazy, it’s easy enough to queue up Python and check the result of some inputs. Usually, though, the difficulty lies in correctly setting up an equation (which is NOT the same as punching out the calculations), which in turn relies on writing things out with the correct syntax. There are some other programming quirks that have to be checked that you don’t have in math (such as integer overflow). But in avoiding doing raw math, sometimes it’s easier (at least conceptually) to think about things in terms of vectors (rather than specific quantities) and that helps you combine them correctly, rather than getting a “right” answer that turned out to be correct by fluke just because you picked the right numbers.

        Reply
  • […] in the brain activates more the language centers than the mathematical ones (for example here : https://computinged.wordpress.com/2017/01/23/scientists-looking-at-programmers-brains-see-more-langu… but I have not looked exhaustively into it).  So different programming languages matter because […]

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

January 2017
M T W T F S S
« Dec   Feb »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Feeds

Blog Stats

  • 1,452,735 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 5,181 other followers

CS Teaching Tips


%d bloggers like this: