Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Evidence suggesting that young computer programmers have “bilingual brains” (thecodingbrain.wordpress.com)
67 points by btian on Dec 17, 2012 | hide | past | favorite | 39 comments


Reading this reminds me of something that others must have experienced: dreaming in my current work programming language. Code will be scrolling by and I'll be trying and usually failing to express some emotion or day to day topic in code. Sort of frustrating, especially when the language is C++ for some reason.


A few months back I was sleeping with a stomach ache. I remember that I was attempting to remove any references to my pain so it would be garbage collected. It made a lot of sense at the time, and it actually worked!

I think there is a zen lesson in here somewhere about attachment...


OMG, something similar to this has happened to me twice over the last few years! I came down with a real bad case of, I don't know, something; but I had a bad fever and was just in a dazed state of half-sleep. The last time I just remember that "I" kept trying to parse some XML and was getting some parsing exceptions. It was so weird the next day remembering back, it was literally like I was in a different state, not really myself. very strange.


This has absolutely happened to me too.


Similar thing happened with me too. In that dream, code was scrolling by, fast. Then it stopped abruptly, and one line grabbed my whole mental focus. And it was a bug! Next day I checked the application I was working at that time, and indeed it was there. Probably I have noticed it before, just forget about it.


I'm should be more amazed at how I can wake up with a bugfix to make in the middle of 1500 LOC from the day or days before. It's something of a once-or-twice-the-month event, and tends to pass by without me paying much attention.


Heh ! one of my juniors (and room-mate) in college was once utterly and totally distraught in his sleep one night. On further questioning he revealed that he dreamt a murder happening outside of a block of an infinite while loop. He was stuck inside the while loop and powerless to do anything about it. He apparently was the instruction pointer.

I do have dreams about code, but no scrolling text, usually nailing details of a function down.


I've had several dreams where I've been trying to code the world around me. Sometimes this involves seeing scrolling source code, other times it seems to be an abstract relationship of programs to the environment I'm in. I usually can't remember very much of these dreams, because when I wake they don't readily make sense and so flee quickly.


I remember waking up whilst learning about animation and thinking that I couldn't move because I had set up the world, view, projection matrices but not the model matrices for my legs and arms.


Sounds like sleep paralysis. http://en.wikipedia.org/wiki/Sleep_paralysis

Interesting how your brain seemed to reason it.


I often want to Command-F various stacks of papers and things in my apartment.


I've tried to "grep" a physical book more than once.


Me too.

(And (dreaming (in Lisp)) is (really weird).)


Given this statement/hypothesis:

  ...it might be that people with better executive control are more
  likely to persist with computer programming. If the latter is 
  true, one way to help people learn computer programming might 
  be to teach them a foreign language first.
It might be possible or more straightforward to study the connection between learning/using a non-native language and expressing a solution to some problem programmatically by measuring brainwaves and active areas the cerebral cortex while performing these activities. It seems like this would be step 1, which would then be backed up with behavioral studies such the on in the OP.

Can someone with a neuro background comment on this?

[Edit: formatting]


I don't really know what you're talking about, but the mental effort of expressing an algorithm in English seems similar to the effort of expressing some thought in Spanish. (I learned Spanish as a second language.)

Part of the effort is translating vocab, but the trickier part is changing paradigms to express an idea. Code has functions and for loops and control statements. English takes lots of connecting words and loops are trickier to explain. English to Spanish requires switching word order but even tricker is changing to different idioms for common ideas.


fMRI is better suited for long-ish tasks.

EEG-based techniques are better for responses to sudden events.

It would be interesting to analyse the brain activity while devising algorithms to solve problems, for example.

The algorithm design doesn't have to be explicit. Just ask people to solve a problem with different solutions, some of which are algorithmically more elegant than others.

You could also ask programmers to write programs in the MRI, and check what brain regions are activated.

I wouldn't be surprised if functional and imperative programming activated different brain areas.


Not really much different than sight reading music I would assume. I can still sight read on the instrument I played in HS and it's been quite a while since I last played.


I wonder if learning languages also helps your coding skills. I was recently hitting a wall on a big project I'm coding, feeling a bit down, and decided to take a break and watch some Japanese movies and TV shows with subtitles. I studied Japanese in college, and have some basic language skills, but I hadn't been exposed to the language in quite a while. After a couple days, I was often thinking about Japanese vocab and expressions, and then I went back to my coding project, and made several big breakthroughs. Likely the most significant change was the way I phrased my Google queries when looking for solutions. Could be a coincidence, or maybe flexing your language muscles a bit helps inspire your coding as well.


It is scientifically proven that REM sleep helps solve problems. I'm not saying the other things don't play a part, but if you are giving a problem and you get REM sleep you do statistically better on it afterwards then people who had the same amount of time to think about it but did not get REM sleep.


In my social circle I don't see the correlation. A friend from MIT speaks fluently more than 7 different languages and he is not an above the average developer. On the other side I know many excellent developers who are popular on their sector (e.g. games, security) and they only speak one language fluently.


I have been programming since I was a child, and have little difficulty picking up up new programming languages when required. I have also taught myself to read and play music. However, every attempt of mine to learn a non-formal human language has been a non starter.

Admittedly I have never been immersed in a non-English speaking culture, but even so, I hit a mental wall that I cannot seem to get past. They never 'click' into place the way formal languages do for me.


But I think (and what do I think; I know a little here and there but certainly not conversational in another language) that we can immerse ourselves easily in a programming language, so if we're drawing equivalences, it should be easier to learn a programming language than a spoken one in the same levels of culture immersion -- and most of us are here, aren't we?


I know it's not the same, but I've always felt something like this about math. I've been a math nerd since I was 4 or less, so there are a lot of concepts that come pretty natural to me, despite being difficult for a lot of people; I think that's caused because I started so early that the knowledge is ingrained into my brain almost as deeply as my mother language (Spanish, by the way).

However, math is a lot unlike language, because, with math, knowledge grows infinitely; but a language is finite, especially with regard to the grammar. That's why I avoid using the term "bilingual" when I speak to another people, even if inside my head it makes a lot of sense.


Likely. But, I think that coding goes beyond language at some point. More of a visual and positional experience, like playing chess, rather than just language.


I am occasionally aware of using my spatial memory to pin down parts of code - it might help that I am quite used to computer games, where you switch maps (The example that comes to mind is Deus Ex)


try "trillingual plus"

People speak English/Spanish, Russian/Ukrainian/English, English/Italian/Spanish etc. Some of them also speak Java/C/PHP and they curse :) Seems legit


Some languages are the same just with different vocabulary and syntax (different key words, library function names, differing ways of indicating statements and function calls) but have the same set of concepts for programming. It seems to me that knowing sets of related programming languages does not give the same stretch as knowing completely different languages. So knowing English + Java/C/PHP might not make you quadrilingual, whereas knowing English + Java + Haskel might make you trilingual.


By that logic knowing Spanish, Portuguese and Italian wouldn't make you trilingual since they're all related with different "key words, library function names", etc. I mean vocabularies and small grammar rules.


I would argue that, yes, someone who speaks Russian, Chinese and Amhari is more trilingual than someone who speaks Spanish, Portugese and Italian.

Taking myself as an example, I learned French in junior high (between the ages of 12-14), never lived in a French speaking country, and never learned a word of Spanish - and yet, I can read and understand simple Spanish. If I upgraded that to full-spanish, I wouldn't count it as a "whole new language".

(p.s. my mother tongue is neither English, nor is it Latin, Germanic or anything else that might have any remote connection to English, French or Spanish)


Then what the bleeding hell am I?

English/Hebrew/Scala/C/Python/Object Pascal/Haskell


"data from the attention networks task showed that computer programmers performed this task faster than controls and the difference between the two groups was significant"

Both groups were computer programmers, so what is he/she talking about? Can someone please clarify the conclusion of the study?


There were two groups: programmers and non-programmers. Each group was subdivided in two age groups (look for age matched controls in the article).


Thank you! Makes perfect sense now.


I have no concrete evidence; here be anecdotes:

When I'm speaking a foreign language, I conceptualise what I want to say - language invariant, then find the correct words, and arrange them so what I say or write is grammatically correct. Sufficiently proficient (fluent or close to) speakers of a foreign language don't try convert their native tongue to a foreign one. I can personally attest that this doesn't work - idiomatic expressions and cultural markers do not correspond (for example, 'yellow' connotes drunkenness in some languages; not English). The point is that multilingual people have developed the ability to take what they want to say, as a set of concepts, and convert them to words in the language of their choosing at that moment. Try to think of it as analogous to how a compiler takes an AST (concepts in natural language) and traverses it to produce machine code (foreign language) specific to a processor architecture.

Learning a third language is easier than learning a second because your brain adjusts to become less tightly coupled to the words and phrases you already know. Having studied Hebrew, I have learned to communicate without the verb 'to be', 'have' (the equivalent is literally 'there is to me'), and indefinite articles (a, an). There is also a preposition (את) that I don't know an equivalent of in any other language.

It is my opinion that multilingual people have developed the ability to express their necessarily-not-yet-explicated thoughts (concepts and ideas) in the language of their choosing. Correspondingly, programming languages are a medium for expressing the programmer's ideas about computation. When I'm programming, I'm thinking about concepts, not language specifics, for example "abstract this segment of code to a function" can become

def removeVowels(target):

    ...
string removeVowels(String target) {

...

}

removeVowels :: string -> string

removeVowels target = ...

I don't think of language specific syntax. I have an idea about computation and express it using the idioms and syntactic features at my disposal. Further examples:

In English, when asking for permission, one would say, "May I.../Can I...", whereas in Hebrew one will often say אפשר - which translates to 'possible to [infinitive] ...'. Similarly, in the above example, the python approach might be:

for ch in target: non indexed iterator

Curly brace type language:

for (int i = 0; i < target.length(); i++) { }

Haskell:

map consonantOrNothingFunction target

but all of these approaches yield the same computational result even though fundamentally different in structure and nature. A good polyglot has detached their language facility from their conceptualisation faculties. I certainly think I have. Multilingualism fosters this detachment, making programming easier.

edit: code sample formatting


Yet another anecdote from yet another polyglot. This came up today in a review:

> Java statement sequences are a monad, with a weird fold notation, for (blah : blahs) { ... }. I can live with weird notations ;)


I think this is a natural progression for many programmers. First learn one language. Then in switching between different ones they learn there are patterns in common. Eventually they can read any language and consciously or unconsciously ignore the "noise" and focus on the ideas. Finally they can become proficient with a new language very quickly.


Uhm. They are called Programming Languages. And you can be fluent, or not, at programming.


Wow, I actually took part in this study, and it's on the first page of HN?


I can say that I've been programming since I was in 6th grade and I've never understood the posts, like today, "Why is learning to code so hard?" etc. Similarly, it's fascinating how I can construct a formal grammar for German in my head as I've learnt it in the last couple of years. I completely believe that those skills are related.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: