Forgot your password?
typodupeerror
Math Programming

The Neuroscience of Computer Programming 161

Posted by timothy
from the traveling-salesmen-running-through-your-head dept.
Hugh Pickens DOT Com writes "Chris Parnin has an interesting read about an international team of scientists lead by Dr. Janet Siegmund using brain imaging with fMRI to understand the programmer's mind and to compare and contrast different cognitive tasks used in programming by analyzing differences in brain locations that are activated by different tasks. One recent debate illuminated by their studies is recent legislation that considers offering foreign-language credits for students learning programming languages. There have been many strong reactions across the software-developer community. Some developers consider the effort laudable but misguided and proclaim programming is not at all like human language and is much closer to mathematics. Siegmund observed 17 participants inside an fMRI scanner while they were comprehending short source-code snippets and found a clear, distinct activation pattern of five brain regions, which are related to language processing, working memory, and attention. The programmers in the study recruited parts of the brain typically associated with language processing and verbal oriented processing (ventral lateral prefrontal cortex). At least for the simple code snippets presented, programmers could use existing language regions of the brain to understand code without requiring more complex mental models to be constructed and manipulated." (Read on for more.)
"Interestingly, even though there was code that involve mathematical operations, conditionals, and loop iteration, for these particular tasks, programming had less in common with mathematics and more in common with language (PDF)," writes Parnin. "Mathematical calculations typically take place in the intraparietal sulcus, mathematical reasoning in the right frontal pole, and logical reasoning in the left frontal pole. These areas were not strongly activated in comprehending source code." The new research results are a much needed, but only a first step in revealing the neuroscience of programming. Other questions remain including: Can we finally provide a neurological basis for a programmer's flow? How relevant is the mastery of language skills for programming? Are there certain programming activities that should never be mixed, due to higher chance of cognitive failure (and resulting bugs)? Do code visualizations or live programming environments really reduce mental load? "Programming involves a rich set of cognitive processes," concludes Parnin. "Although the study found a particular pathway that was strongly associated with language processing, there may be other pathways associated with other common activities related to programming (debugging, editing, refactoring, etc).""
This discussion has been archived. No new comments can be posted.

The Neuroscience of Computer Programming

Comments Filter:
  • Re:Balderdash (Score:2, Interesting)

    by Anonymous Coward on Sunday February 23, 2014 @09:05AM (#46315633)
    Well, I know myself. I believe the results in this study are obvious. Most of the time reading code involves parsing which is essentially a linguistic task. Mathematical thought might be more active in specific code sections but language will still account for 99.9% of your mental work. Writing code is probably the same or even more skewed towards language. Of course, I am assuming most people think before sitting down to write code.
  • by theodp (442580) on Sunday February 23, 2014 @09:10AM (#46315655)

    Larry Wall [wikipedia.org]: Wall developed the Perl interpreter and language while working for System Development Corporation, which later became part of Unisys.[5] He is the co-author of Programming Perl (often referred to as the Camel Book and published by O'Reilly), which is the definitive resource for Perl programmers; and edited the Perl Cookbook. He then became employed full-time by O'Reilly Media to further develop Perl and write books on the subject.[5]

    Wall's training as a linguist is apparent in his books, interviews, and lectures. He often compares Perl to a natural language and explains his decisions in Perl's design with linguistic rationale. He also often uses linguistic terms for Perl language constructs, so instead of traditional terms such as "variable", "function", and "accessor" he sometimes says "noun", "verb", and "topicalizer".

  • Re:Why? (Score:5, Interesting)

    by ledow (319597) on Sunday February 23, 2014 @09:33AM (#46315725) Homepage

    Sorry, but it's much more deep-rooted than being able to talk to someone in a foreign country.

    If you don't get that, you probably don't have many bi-lingual friends and certainly haven't asked them about it.

    Being bi-lingual allows you to find patterns, origins, etymologies and structures of words. It's not uncommon from being able to speak French and English to being able to understand Spanish, Italian and maybe a little Portuguese WITHOUT having to learn anything, just hearing a native speaker.

    It's provides much greater command of grammar and language structure than is available in English alone.

    I speak as someone who was forced to learn only "tourist" German in an English school, who now lives with an Italian fluent in English and has entire swathes of friends who speak foreign languages.

    English is universally derided among them for being the easiest to learn. The grammar is pathetic. The rules are arbitrary but easily picked up. The words all comes from Latin or Greek or Germanic originally.

    And being bi-lingual opens up the creative areas of the brain associated with language. While you're 3-7 years of age, your brain will accept another language with ease. It won't even hinder you learning other things as you learn it. And you'll be bi-lingual by the time you're an adult with no extraneous effort. However, if you don't get it into the language-processing areas of the brain by that age, you will GREATLY struggle to learn a language later.

    And by learning a language, I mean being able to live normally in the country for a year without resorting to translation tools, not asking the way to the airport in a single, broken accent.

    My girlfriend's command of multiple languages is impressive. And it comes about because she was taught English in school and it was SO MUCH easier a language to learn than her own. It's basically the baby-language of foreign languages.

    It's not about tourism.
    It's not about being able to phone up a foreign company and sell to them.
    It's literally an expansion of your whole thought processes and language interpretation that allows you a much richer method of communication, no matter what the language.

    And while you're a child, you'll just absorb it - like any child in a bi-lingual home. But when you grow up, you'll struggle and have to spend 10 years learning to get the grammar, accent, structure, phrasing and wording correct enough to blend in. And it will never be "natural". But, learning a foreign language in school, it can be "natural" to your thought processes.

    They say you know when you've actually learned a language because you dream in it. That's how natural it becomes and you get the richness of expression available from all the languages you know.

    It's not about whether you know Perl, or French. It's about being able to genericise concepts enough that even when speaking in several languages at once you get a deeper understanding of what the grammar means and how the structure should be to be common to all languages.

    Someone who programs professionally in a range of programming languages will, generally speaking, be more fluent in any particular one. The same as someone who speaks more than one language being, generally speaking, more capable with their use of language overall.

  • by Ateocinico (32734) on Sunday February 23, 2014 @10:31AM (#46315951)

    Perhaps they hold the name of their first use. In France and Spain computers are called sorters, "ordinateur" and "ordenador" respectively. In those countries they'r spread started with services like banking and accounting.

  • by NotSoHeavyD3 (1400425) on Sunday February 23, 2014 @10:44AM (#46316003)
    Since in college I was hopeless in my foreign language class when listening/speaking were stressed. (And failed those classes multiple times.) When all I had to do was read it(at the same 4th semester level) I passed it the first time and I wasn't even close to failing. (Yes, I realize this is an anecdote but I wouldn't be surprised if there were a difference between reading and listening.)
  • by Immerman (2627577) on Sunday February 23, 2014 @12:22PM (#46316603)

    While it seems logical to me that there would be heavy overlap between the brain regions used for natural language and those for reading programming languages, it's important to remember that "using the same brain region" is *not* equivalent to "thinking in the same way". For example poetry and mathematics both activate many of the same brain regions, presumably because they both involve a lot of pattern recognition and abstract thought.

    For that matter, if I recall correctly the language centers of the brain are themselves mostly a subset of the vision centers of the brain, even when dealing with purely spoken language. Probably that pattern-recognition stuff showing up again

  • by Immerman (2627577) on Sunday February 23, 2014 @12:30PM (#46316673)

    Indeed. Most Americans would probably find it straining to listen to someone speaking using English vocabulary but German grammar for extended periods. To say nothing of Latin. Even though the words are the same, the way they are organized to express concepts are quite different. I think most anyone who is both multilingual and accustomed to "watching" their own mind can attest to the fact that learning to truly think in a fundamentally different language doesn't just change the words you use, it also subtly changes the way you think about things.

This file will self-destruct in five minutes.

Working...