After much procrastination, I am finally posting the results of my research into how the frequent use of computer programming languages affect the brain.

As followers of the blog will remember, after reading theories about how learning languages affect the brain, I wanted to know whether computer programming languages also affected the brain. With a few notable exceptions (e.g. Murnane, 1993) most research about the cognitive effects of computer programming seemed to have focused on programming as a problem solving rather than a linguistic activity. If computer languages were indeed languages, I thought that it would make sense for them to affect the brain in a similar way to other languages.

This is quite a big subject, so I honed in on bilingualism. If computer programming languages are languages, then people who spoke one language and could programme to a high standard should be bilingual. Research has suggested that bilingual people perform faster than monolingual people at tasks requiring executive control – that is, tasks involving the ability to pay attention to important information and ignore irrelevant information (for a review of the “robust” evidence for this, see Hilchey & Klein, 2011). So, I set out to find out whether computer programmers were better at these tasks too. It is thought that the bilingual advantage is the result of the effort involved in keeping two languages separate in the brain and deciding which one to use. I noticed that novice computer programmers have difficulty in controlling “transfer” from English to programming languages (e.g. expecting the command “while” to imply continuous checking; see Soloway and Spohrer, 1989), so it seemed plausible that something similar might occur through the learning of programming languages.

Obviously, lots of bilingual people learn two languages from birth, and – young as some of them might be – this is clearly not the case for computer programmers. However, the effect has also been found in bilingual people who gained a second language in adolescence (Tao et al., 2011). Therefore, I compared 10 adolescent programmers (aged 14-17) and 10 professional programmers who had been programming since adolescence (aged 21-25) to age matched controls. All participants were monolingual English speakers.

I used two computer-based tests – Stroop and attention networks task – which required participants to pay attention to one thing and ignore others. Unfortunately, I made an error in setting up the Stroop test, so I can’t be sure that data is reliable. However, 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 (note that “significant” means that we are more than 95% sure that the results didn’t happen by chance – it doesn’t mean there was a big difference in reaction times). Error rates did not differ significantly.

This was only a very small study and I’d be reluctant to make any grand claims based on it; the results would need to be replicated by other studies. Even if other studies did support these findings, it doesn’t necessarily mean that computer programming experience causes better executive control; 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. I did notice that a lot of programmers seemed to be bilingual – I think it would be interesting to do a survey to see if that is supported by hard facts.

Anyway, if you’re interested in picking apart the detail, you can download the full report here. If you do manage to struggle through, let me know what you think – random theories welcome! I’d love it if it gave people ideas for bigger studies. Huge thanks to everyone who took part and to all those who helped, especially the team at Young Rewired State. I couldn’t have done it without you all.

In response to feedback from lots of you, I have now extended my experiment on computer programming and the brain to include 12 and 17 year olds. I’m still recruiting, so if you can code and fit into one of these categories, please sign up to get involved.

  • 8-12 year olds who have been coding regularly for at least 6 months
  • 14-17 year olds who have been coding for at least 3 years
  • 21-25 year old professionals who have been coding for 5 years or more

Taking part will take around half an hour, and I’ll do my best to find times and places that suit you.

I need a total of at least 10 people in each age group, but the more the merrier, so if you know people who’d be interested, please send them my way. Thanks :)

Hannah

My project to find out whether computer programming languages affect the brain is slowly coming together. The best news is that I’ve got my hands on a very quick version of an IQ test, which can be administered in 15 minutes, which means that I can cut the whole experiment down from 50 to 30 minutes in total. Hopefully that will make it even easier for people to take part.

As a reminder, I’m looking for young coders in these age groups:

  • 8-11 year olds who have been coding regularly for at least 6 months
  • 14-16 year olds who have been coding for at least 3 years
  • 21-25 year old professionals who have been coding for 8 years or more

Any programming language is OK, but it’s important that you are not bilingual (read the information sheet for details).  Here’s what taking part will involve:

Taking part in the experiment

  • We can do this at your home, or meet you at one of 2 locations in central London (either my university or my place of work, which is a children’s charity)
  • Taking part will take 30 minutes. I’ll schedule a time to suit you.
  • First we’ll do a short IQ test – this is only so that I can make sure that the people I compare you to (who are not coders) have roughly the same IQ
  • Then we’ll run the experiment on a laptop. It’s pretty simple, you just have to respond to what you see on the screen, as quickly and accurately as possible.

I’m hoping to complete all of the experiments by the end of April, so that I can then recruit and test a control group. If you’ve already signed up, I’ll be in touch with suggested times very soon.

If you run computer clubs for kids or just know young people who fit the bill, please point ‘em my way or get in touch.

As I’ve written before, I’m interested to find out whether regularly using computer programming languages change the brain in the same way that being bilingual does. The good news is that I’ve now had ethics approval to run a small experiment to find out – and I’m looking for children, teenagers and adults to take part.

First up, I’m looking for three small groups of developers, ideally London-ish-based (because I don’t have any funding and I’m a student so massive train fares aren’t really an option):

  • 8 – 11 year olds who have been programming regularly for at least 6 months
  • 14 – 16 year olds who have been programming regularly for 3 – 6 years
  • 21 – 25 year old professional programmers who have been programming for at least 8 years and programme at least 5 days a week

Unfortunately, if you are bilingual – in that you speak two or more languages most days, for example, a different language at home than at school or work – you can’t take part in the study. This is because we already know that the effect we are looking for is found in bilinguals – so if we found it in you, we wouldn’t know whether this was because you programme computers or because you are bilingual (or both!).

To sign up as a developer, please read this information sheet about the project and sign up here (or if you are under 18, please get a parent or guardian to do so on your behalf). Massive thanks to Josh and Emma at Young Rewired State for helping me to contact young coders (they’re fundraising at the moment, you should help if you can!).

Secondly, I am looking for control group participants who are not computer programmers and am not bilingual. If you are an education professional or someone else who can help me to access a group of children aged 8-11 and or 14-16 in London, I’d love to hear from you – you could leave a comment or mail me here: hwright04 AT ioe.ac.uk.

I’m pretty excited that this is actually happening, thank you to everyone who has helped so far (especially Paul, Duncan and Alex for letting me pick their rather substantial brains). As always if anyone has any suggestions about papers I should read or people I should talk to, I’m all ears.

Are computer languages really languages? Apparently, in the 70s and 80s, various universities appeared to think so, as they allowed computer programming to count for the foreign language entry requirement.

According to Hulit and Howard (1993), languages must 1) convey meaning, through the words and the relationships between the words; 2) include concepts of different times and space, like yesterday or somewhere else; and 3) be “productive”, in that they allow us to say things that have never been said before. Kent L Norman’s book Cyberpsychology points out that these things are technically present in programming languages, which involve similar concepts of grammar and meaning. However, the structure of these languages are highly structured, and the communication is, essentially, one-way.

Of course, another difference is that talking to a computer doesn’t usually involve much actually talking or listening – it’s a reading and writing kind of conversation. But this recent neuroimaging study suggests that reading and writing ability is embedded in the language system, and processed in brain regions that were previously thought to specialise in spoken language only, so perhaps that’s not such a big deal.

So why does it matter whether or not the brain treats code as language? Well, Dr Ellen Bialystok and her colleagues have been conducting some very interesting research into the cognitive benefits of bilingualism which suggests that regularly switching between two different languages changes the structure and function of the brain. Bilingualism seems to improve executive function in the brain, delay age-related cognitive decline and may even protect against the onset of dementia.

What’s more, the Education Secretary recently promised to “pull every lever” to get young kids learning languages (warning: link contains large picture of Michael Gove). Why? He said:

“It is literally the case that learning languages makes you smarter. The neural networks in the brain strengthen as a result of language learning.”

So it seems to me that if learning to code has the same cognitive benefits as learning languages, the implications could be pretty interesting for primary education and the Coding for Kids campaign.

And that’s what I’m hoping to find out.

As so many people seem to have an opinion on the subject, and any combination of the words children and computers seems to spark ever more doom-laden Daily Mail headlines, I’m interested in what neuroscience has to say about when children should start learning about technology. So I jumped at the chance to hear the latest research on the brain’s readiness to learn at different ages at last night’s When to learn what? policy seminar.

Are there key moments in childhood after which the opportunity to learn is gone? For Prof. Michael Thomas (director of the Centre for Educational Neuroscience), the answer for skills such as literacy, numeracy, and science is: “It’s never too late to learn but all things being equal, earlier is better.” Broadly speaking, getting older doesn’t mean I can’t learn new skills, but may mean that I won’t be as good at that skill as if I’d learnt when I was younger.

A quick show of hands at a Coding for Kids event showed that all of the programmers present learnt to code before the age of ten. Are they better than people who learnt to code as adults? I’m not sure I’d like to get in the middle of that debate, but what is interesting is that they probably learnt in a very different way. Child learners favour exploration, can deal with many tasks at once, learn by natural exposure and can extract trends from lots of data. Sounds like a coding brain to me! Adult learners will learn explicit rules more easily than a child, but needs intense training, few distractions and more cognitive resource.

Different for girls?

It’s clear that, while you do find excellent girl programmers, the world of coding is overwhelmingly male. Could neuroscience tell us why? Not right now, it seems, though a slide from Prof. Sarah-Jane Blakemore caught my attention. Whilst it’s common lore that girls grow up faster than boys, it seems that a neuroimaging study has shown real differences in brain development around puberty.

Here’s the thing. Learning doesn’t get you more brain cells – but what it does is build and strengthen the connections between brain cells (called synapses), increasing the volume of grey matter in your brain. Young children grow these connections at an astonishing rate and the number keeps increasing to a peak around the age of puberty. After that, the trend is reversed, as your brain starts to reorganise itself, maintaining important connections and and pruning away at the rest. It turns out that this peak happens 1-2 years earlier in girls than boys.

And that’s not all. A study by McGivern and colleagues found evidence that, at the onset of puberty (which happens earlier for girls than boys), performance in test of working memory (the ability to hold information in your head for a short time while you manipulate it) and decision-making tasks gets 10-20% worse before it gets better. (This and other interesting studies about the adolescent brain studies are summarised here). This effect lasts for a few years, until excess synapses are pruned. Now according to a great paper I found, coding:

“…comprised of a large number of abilities that interrelate with the organization of the learner’s knowledge base, memory and processing capacities, repertoire of comprehension strategies, and general problem-solving abilities such as comprehension monitoring, inferencing, and hypothesis generation.”

[p144, emphasis added]

Rewired State’s Emma Mulqueeny raised the problem in a much-commented-on blog post, and suggested that teaching programming earlier – from Year 5, before the self-consciousness of puberty kicks in – could help to attract more girls to the game. But if it turns out that the skills needed to code are better before puberty than during it, maybe both girls and boys would take to coding better if it took place at primary school? There isn’t enough evidence to say this for sure, but I reckon it’s definitely worth investigating.

I hate not understanding things. One of the things I don’t understand is what goes on in the brains of computer programmers, so I have decided to try to find out. Not in a metaphorical way. What I mean is that I want to understand how the brain learns and uses computer programming languages, and how learning and using programming languages affects the brain.

This isn’t as random as it sounds. I used to manage website developments for youth charities, but I recently threw in the towel to study developmental psychology full-time. I can’t code myself but I’ve spent a fair bit of time with people who do – and the more I learn about psychology, the more I wonder things like:

  • Does the brain learn and store programming languages in the same way as spoken languages?
  • Are certain kinds of people with certain traits drawn to programming, or does coding influence the way people think and feel?
  • Does learning to code improve children’s skills in other subjects or affect their ability to learn?
  • And is there an optimum age to start teaching kids to code?

The last question was prompted by a post from Emma Mulqueeny, of Young Rewired State. In it, she calls for coding to be part of the curriculum by Year 5, backed by a petition which argues that Year 8 is too late.

Recent criticism of computer science – or rather the lack of it – in the UK education system on the economic costs of a future, unskilled workforce. For example, Google CEO Eric Schmidt has accused the UK of “throwing away [its] great computer heritage”.

My interest is in whether there are wider cognitive benefits to teaching kids to code, and if so, whether there’s an optimal time to learn. As educational neuroscience is starting to shed light on how and when children’s most easily learn everything from language to morality, I’m interested in whether any of the existing evidence can inform the debate.

I recently attended the rather brilliant Coding for Kids barcamp, and pledged to do a piece of research on coding and cognition – which I’m just starting to plan.

In the meantime, the idea of this blog is to track down and share relevant research with a wider audience (research papers can be pretty heavy going and are often stuck behind paywalls). I hope that this will help to link people who code, and people who teach, with some interesting ideas coming from psychology and neuroscience.

I’ll be learning as I go along, so please feel free to challenge anything you read here – I don’t claim to have all of the questions, let alone the answers! Any ideas or feedback would be very welcome.

Follow

Get every new post delivered to your Inbox.

Join 62 other followers