Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

The Neuroscience of Computer Programming

timothy posted about 6 months ago | from the traveling-salesmen-running-through-your-head dept.

Math 161

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).""

cancel ×

161 comments

Sorry! There are no comments related to the filter you selected.

Reading vs writing (5, Insightful)

Anonymous Coward | about 6 months ago | (#46315547)

In my experience, coding and reading other's code are two completely different tasks.

Re:Reading vs writing (4, Insightful)

SunTzuWarmaster (930093) | about 6 months ago | (#46315745)

In this case, reading, writing, listening, and speaking a foreign language should all be different tasks. The neuroscience doesn't lie: the region of the language processing center lights up; portions of programming are similar to foreign languages.

Re: Reading vs writing (0)

Anonymous Coward | about 6 months ago | (#46315963)

The article claimed that programming activated regions of the brain associated with language, not foreign language. Most programming languages they I've seen are in English. If you are a native English speaker, I don't see how this would count as a foreign language. If you are not a native English speaker, I suppose it could count as a really basic English credit.

Re: Reading vs writing (1)

Hognoxious (631665) | about 6 months ago | (#46316085)

Most programming languages they I've seen are in English.

I doubt you'd recognise it.

Re: Reading vs writing (4, Insightful)

aristotle-dude (626586) | about 6 months ago | (#46316511)

The article claimed that programming activated regions of the brain associated with language, not foreign language. Most programming languages they I've seen are in English. If you are a native English speaker, I don't see how this would count as a foreign language. If you are not a native English speaker, I suppose it could count as a really basic English credit.

I think you are confused. Since I assume that you are a native english speaker and a monolingual one at that, I can understand how you have trouble with this concept. While most programming languages might have "keywords" written in english, they have a distinct syntax that is not exactly the same as natural english syntax which is why it is like thinking/reading in a different language than you are used to.

Re: Reading vs writing (4, Interesting)

Immerman (2627577) | about 6 months ago | (#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.

I found they were for me (4, Interesting)

NotSoHeavyD3 (1400425) | about 6 months ago | (#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.)

Re:I found they were for me (2)

BlackHawk-666 (560896) | about 6 months ago | (#46316193)

I'm similar. While I can read French to a reasonable degree my ability to understand it while listening is poor, and my ability to speak it is laughable. OTOH I can read pretty much any computer language and am fluent in...um...a lot...I can't really recall.

same brain region != equivalent cognition (4, Interesting)

Immerman (2627577) | about 6 months ago | (#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

Re:Reading vs writing (1)

X10 (186866) | about 6 months ago | (#46316617)

In this case, reading, writing, listening, and speaking a foreign language should all be different tasks.

Not true. Reading a foreign language and speaking it has a lot in common. Otoh, reading code and creating code is very different. But I'm not a neuroscientist, I'm just a person who's capable of writing code, reading code, writing/speaking three foreign languages, and reading five foreign languages.

Neuroscience doesn't lie? (2)

abies (607076) | about 6 months ago | (#46317405)

http://www.wired.com/wiredscie... [wired.com]

I suppose that dead salmon should get credits for social science classes in such case...

Re:Reading vs writing (0)

Anonymous Coward | about 6 months ago | (#46317711)

You missed the point by an enormous margin. Writing code is absolutely nothing like writing words because the act of writing has relatively little to do with the act of constructing the things to be written (and the former takes up much less time than the latter in most cases).

Re:Reading vs writing (0)

Anonymous Coward | about 6 months ago | (#46316067)

In my experience, coding and reading other's code are two completely different tasks.

As, it would seem, is using punctuation.

And reading code isn't "coding" (2)

raftpeople (844215) | about 6 months ago | (#46316549)

For me, coding/design/problem solving seems to be mostly 3d abstract visual with objects being represented by some abstract entity and interactions that I can "see" (in quotes because I'm not sure that's what's really going on) and manipulate.

Reading or writing code is a translation to/from the imagery which is the real "code". The imagery is the abstract representation of the solution and where the problem solving happens.

Re:Reading vs writing (2, Insightful)

Anonymous Coward | about 6 months ago | (#46316641)

Stupid study.

Hey guys! Reading written statements (code) uses language centres of the brain - well fuck-de-doo.

Re:Reading vs writing (3, Insightful)

Hognoxious (631665) | about 6 months ago | (#46317611)

The good part is where the programmers just know that it can't be so.

MRI? No idea what it is. But if it contradicts my preconceptions that:

a) mathematicians are smarter than literature types
and
b) I'm really really smart
so
c) what I do must be more like the former
. . .
then it's phrenology by a different name.

spiritual void being filled by spiritual vortex (1)

Anonymous Coward | about 6 months ago | (#46315563)

what comes around.... metaphysical disunabstraction week

Balderdash (1)

jamesl (106902) | about 6 months ago | (#46315567)

Of all the fully employed programmers you know, how many of them have degrees in English, French, Japanese, Chinese, Literature, Journalism or creative writing? How many in mathematics or physics?

Re:Balderdash (0)

Anonymous Coward | about 6 months ago | (#46315613)

Here, we have a lot of people having degrees in Agronomy, Gardening, Veterinary medicine, ... These are all related to manipulating a bunch of shit. I don't think this to be mere coincidence.

Language degrees seems right in there place here. Language graduates are all saying a load crap. And most sane people think "BULLSHIT" when they open there mouth.

None and none (1)

Sand_Man (81150) | about 6 months ago | (#46315623)

All CS or Engineering here.

Re:Balderdash (2, Interesting)

Anonymous Coward | about 6 months ago | (#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.

Re:Balderdash (1)

RabidReindeer (2625839) | about 6 months ago | (#46316183)

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.

There are, I believe, a number of people responsible for the development of programming languages whose formal credentials are in linguistics.

Nor does a connection with mathematics make computer languages unique - I would say that any communication system - including human languages - can be described at least in part in mathematical terms. Or perhaps even the reverse. Mathematics is as much about symbolic manipulation as it is about numbers, and symbolic manipulation is at the core of language.

That doesn't mean that I'm personally in favor of granting skill in Ruby as an equivalent of Urdu (although perhaps Perl). Human linguistics requires a few extra skills, such as mastering idiom, pronunciation in its many forms, including accent and tonality, and the nuance and ambiguity that is essential to diplomatic communication but the bane of software.

Re:Balderdash (1)

oldhack (1037484) | about 6 months ago | (#46315901)

I came across couple with philosophy degrees, but they lean toward math/analytic - i.e., Russell, Wittgenstein rather than Kant, etc.

Re:Balderdash (2)

BlackHawk-666 (560896) | about 6 months ago | (#46316211)

Languages take time and effort to learn. Try to remember, C++, although complex by the standards of most computer languages is ridiculously easy compared to learning French. If the programmers spent a proportional amount of time on the foreign language, I think they would have the same level of mastery.

Re:Balderdash (2)

aristotle-dude (626586) | about 6 months ago | (#46316589)

One of my colleagues in the past had a degree in divinity, and the one who hired my had a psychological degree. You appear to assume that a background in physics or mathematics would give a distinct advantage over others in programming in all fields. While I'm sure those skills are a basic necessity in developing new physics engines and possibly a new sorting, compression or encryption algorithm, many fields do not require a developer to "reinvent" the wheel and they can simply use existing proven technologies. This is often called building on the "shoulders of giants".

I think that the fact that I am multilingual and have a firm grasp of "logic" is far more useful than any mathematics that I might have learned in school. I view programming as more of an "art" than a science. It is a form of expression and the programming languages are analogous to human languages used in writing stories and prose. One could say that methods of a class are very much like prose on a conceptual level and the class is analogous to a chapter in a book.

understanding code != programming (0)

Anonymous Coward | about 6 months ago | (#46315573)

This study shows that understanding/reading code is related to reading : " What a surprise ! . Reading code, reading text book is more about pattern matching, memory (associative) than anything. Compare reading a math book and reading code probably results will probably be similar but this is not doing mathematics or programming, this is about reading/learning. Compare creating algorithms and demonstrating a theorem results will probably be similar.

Three possibilities about the study :
- Bad summary of the study
- Propaganda
- Wrong science

Re:understanding code != programming (1)

Anonymous Coward | about 6 months ago | (#46317159)

PFC regions are involved in many different types f tasks. Claiming that PFC activation = language is ummm silly. PFC regions are involved in cognitive control type operations, from which language, LTM, STM, and working memory benefits...etc.

It's not about comparing programming to speaking a (1)

Anonymous Coward | about 6 months ago | (#46315581)

The whole point is just an incentive to get more students to study programming.

Like tax credits for charitable donations, nobody is claiming that the Salvation Army is akin to the government.

I don't agree that coding is more like math (5, Insightful)

IgnorantMotherFucker (3394481) | about 6 months ago | (#46315583)

For quite a long time now, I've been explaining to everyone who will sit still long enough to listen that the term "computer" is a bad name for what these boxen do.

While strictly speaking they do carry out mathematical operations, that's not what most people use them for. They got the name "computer" because one of the earliest uses of computers was the numerical solution of differential equations. For example the Von Neumann architecture was developed by Dr. Von Neumann for use in designing hydrogen bombs. The Difference Engine was Charles Babbage's fat defense contract for the purpose of calculating firing tables, that is, how to aim a cannon, taking into account the wind and so on.

Really these boxen are instruction following machines. I was able to finally explain to my mother what I really do, and what a programming language really is, by asking her to compare her applications that I might have written, to her writing down the recipe for chocolate chip cookies. That recipe could be written in English, or in German or what have you. English and German could then be taken to be recipe languages, much as Java and C++ can be considered programming languages.

Why just the other day, I told a good friend that I wanted to return to graduate school to complete my Physics Doctorate, but had forgotten all my math. This because it is exceedingly uncommon for programmers to need to know much more than very basic arithmetic on the job. It is actually uncommon for me to use floating point on the job, or fractions. I cannot recall the last time I used a trigonometric function on the job.

However coders do need very strong verbal reasoning skills. If you could win on the debating team, or you studied philosophy in college, I assert you could be a good coder.

Ha. Your description IS a branch of mathematics. (0)

Anonymous Coward | about 6 months ago | (#46315611)

The difference you are overlooking is the translation of a problem description into mathematics.

Otherwise, no computer to process the information...

It is called a computer because that is all it can do - compute. It carries out mathematical procedures. Nothing more.

If you can't translate a procedure into mathematics, then the computer cannot perform the procedure.

Re:Ha. Your description IS a branch of mathematics (1)

am 2k (217885) | about 6 months ago | (#46315923)

It is called a computer because that is all it can do - compute. It carries out mathematical procedures. Nothing more.

Then explain the mathematical equivalency to a jump instruction, a variable assignment or an I/O operation.

Re:Ha. Your description IS a branch of mathematics (2)

Uecker (1842596) | about 6 months ago | (#46317991)

The Curry-Howard isomorphism is a way to relate programs to proofs and types to propositions. Control flow can be expressed in terms of call/cc and relates to Peirce's law in logic.

Re:I don't agree that coding is more like math (2)

ebno-10db (1459097) | about 6 months ago | (#46315625)

Just because the skills and brain activity of reading and writing code is more akin to math, doesn't mean the required knowledge is identical to math.

Re:I don't agree that coding is more like math (2)

NapalmV (1934294) | about 6 months ago | (#46315851)

Why just the other day, I told a good friend that I wanted to return to graduate school to complete my Physics Doctorate, but had forgotten all my math. This because it is exceedingly uncommon for programmers to need to know much more than very basic arithmetic on the job. It is actually uncommon for me to use floating point on the job, or fractions. I cannot recall the last time I used a trigonometric function on the job.

Oh well. You must have been in "enterprise computing". Where about any "application" is nothing but some sort of front end to one or more databases.

But I have some good news for you. There are a few jobs in "scientific computing" where you would need all your math. Unfortunately they are rather scarce and don't pay that well either. But if you're after "intellectual challenge" they're pretty entertaining - they're definitely not "code monkey" style.

Re:I don't agree that coding is more like math (1)

Hognoxious (631665) | about 6 months ago | (#46316127)

For all your shitty sarcasm, all you're saying is that programming about highly mathematical subjects involves a lot of maths.

Don't confuse programming per se with the problem domain, kid.

Re:I don't agree that coding is more like math (3, Informative)

ranton (36917) | about 6 months ago | (#46316287)

As another poster already mentioned, you are confusing your problem domain with programming. Your argument is little different than someone saying programming requires a significant amount of accounting knowledge just because they work for Intuit.

Programming itself rarely includes more math than simple algebra. There are of course very specialized fields of software engineering that need quite a bit of math, such as data science or other research oriented fields. But at the risk of making up statistics, I doubt more than 5% of programmers use more than a 10th grade level of math in their entire career.

And regardless of your young and naive view of the software development industry, writing line of business software is rarely just a front end to a database. That may be true for many SMB projects, but things are much different at the enterprise level. I have done research in academia and have helped design global software systems used by millions of users in almost a dozen countries, and I can say the level of complexity can be just as high in either specialty. One field does require a lot more math though.

Re:I don't agree that coding is more like math (2)

NapalmV (1934294) | about 6 months ago | (#46316625)

As another poster already mentioned, you are confusing your problem domain with programming. Your argument is little different than someone saying programming requires a significant amount of accounting knowledge just because they work for Intuit.

You got it right, that's exactly what I was saying: if you want to use your advanced maths then find a domain that uses them in addition to using a programming language. Coming back to the actually unnecessary complexity of "enterprise" software, here's how we got there:

- people with no knowledge of maths, programming and systems theory were put in charge to draft the specs (yes, I'm talking business analysts and managers of all sorts) from platform selection to the minute details of the UI
- developers were treated by said management like disposable cattle, with a "my way or the highway" attitude, to make sure that no real feedback could ever occur

In the end, we got the most extraordinary kludges on workarounds of hacks improvised late nights between coke cans and pizza boxes. At the limits of what mankind could ever do.

Re:I don't agree that coding is more like math (0)

Anonymous Coward | about 6 months ago | (#46315871)

Some developers consider the effort laudable but misguided and proclaim programming is not at all like human language and is much closer to mathematics.

No!!!!

Programmers are the same either you get it and can write your own code, or you fall into the -clean up aisle-, maybe you assist, maybe you can roughly translate another programmers code. I see another comment [the top one], "coding and reading other's code are two completely different tasks".

Math is pretty universal, and you have very few [very few] that can come up with anything ground breaking. It is pretty easy to break it down and automatically understand it for a majority. You show those same people the one program from about 30 different programmers and its like trying to read a 20 foreign languages, even to someone that's considered a top programmer.

Re:I don't agree that coding is more like math (3, Interesting)

Ateocinico (32734) | about 6 months ago | (#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.

Re:I don't agree that coding is more like math (0)

Anonymous Coward | about 6 months ago | (#46316083)

You misunderstand. What you are saying is that programming doesn't involve a lot of math. This is a widely acknowledged fact. Programming only involves math if the problem domain involves math. What people generally say is that programming is like math; it's about figuring out what data you have/state you are in, what data/state you need to get to, and how to go from this data/state to that data/state using a selection of possible operations.

Re:I don't agree that coding is more like math (3, Insightful)

Capt.Albatross (1301561) | about 6 months ago | (#46316119)

While strictly speaking [computers] do carry out mathematical operations, that's not what most people use them for.

But calculation is not mathematics, either - or, more precisely, it is not mathematics as practiced by mathematicians doing mathematics. Calculation is what scientists, engineers, econometricians and so forth do when they apply the results of mathematics to issues in their own fields.

I agree that the current practice of programming is not much like either of these things. Where mathematics (in the applied sense) plays an important part in the development of software (e.g. cryptography, signal processing), the mathematics is generally applied to the problem before coding starts.

Re:I don't agree that coding is more like math (2)

w_dragon (1802458) | about 6 months ago | (#46316191)

There aren't many fields that use more than 2-3 branches of math. Programming tends to use formal logic, lambda calculus, and graph theory. I never understood why people here think math ends at calculus and statistics.

Re:I don't agree that coding is more like math (0)

Anonymous Coward | about 6 months ago | (#46316263)

because that's all they learned in high grad. you are lucky if they consider calculus, as usually mathematics == algebra for the unwashed masses.

Do the test using Ladder Logic (1)

evanh (627108) | about 6 months ago | (#46315585)

That will be a good test of language vs math.

Doesn't make much sense it you look a bit harder (1)

bazmail (764941) | about 6 months ago | (#46315597)

1. How many programmers out there speak more than 2 languages?
2. How many can program in more than 2 languages?

Its likely the answers are 1. not many and 2. most.

I think equating spoken languages to programming languages like this is misguided and makes sens only to tech-ignorant policy makers and scientists looking for juicy grants based on half-baked non-peer-reviewed research.

Makes sense to me... (4, Insightful)

Anonymous Coward | about 6 months ago | (#46315665)

Make sense to me... Language processing areas of the brain are a component of programming.

Try this experiment: Count backward from 100 by 3s. As in 100, 97, 94, 91, 88, etc.

At around 85 have another person -- yes an actual living breathing person -- start calling out random numbers between 1 and 100. See how long you can keep counting.

It's all pure math. But very few people have the ability to keep going amid distractions, even when the numbers are being called out in a foreign language they do not speak or understand.

Programming is like counting backward from 100 by 3s, only thousands of times more complex. Coding while someone is talking nearby can be downright impossible. Clearly there is some overlap between language processing and writing/reading/understanding code.

Re:Makes sense to me... (1)

Carewolf (581105) | about 6 months ago | (#46316879)

Language and logic shares the same part of the brain, the one dealing with deep structural analysis. Language is partially duplicated elsewhere but those are no exact and mostly deal with picking out general mood and your name.

abc (0)

Anonymous Coward | about 6 months ago | (#46316989)

> Coding while someone is talking nearby can be downright impossible.

Could you tell that to the asshole who made open workspaces popular? kthxbye

Re:Makes sense to me... (1)

dinfinity (2300094) | about 6 months ago | (#46317837)

Coding while someone is talking nearby can be downright impossible

Only if you are interested in what they are saying.

I can happily program away with somebody sitting right next to me and addressing me directly. Also, listening to music with intelligible lyrics is no problem at all. Having the a video playing while programming is also no problem whatsoever.

The key here is that I can only focus on one stream at the same time and will not process the words of the other stream at all. If I focus on my programming, you could say to me that a beautiful and sexually skilled nymfomaniac is waiting for me in the next room and I would have no recollection of that a minute later. I might have a subconsciously induced boner, but I would probably attribute that to looking at my sexy, sexy code.

Re:Doesn't make much sense it you look a bit harde (1)

BlackHawk-666 (560896) | about 6 months ago | (#46316229)

You're forgetting the complexity of learning each language and how repetition aids retention. Languages like LUA and Go have as few as 25 keywords and can be learnt in an afternoon. Try and do that with Japanese.

READ BETWEEN THE LINES !! (0)

Anonymous Coward | about 6 months ago | (#46315601)

That's where all the work is done !!

Why? (1)

jamesl (106902) | about 6 months ago | (#46315607)

First, somebody needs to explain why some schools have a foreign-language requirement. The job of high school is to prepare students for jobs upon graduation (not so much any more) and/or prepare students for college. How does one or two years of mandatory foreign language study do either?

Re:Why? (2)

Ardyvee (2447206) | about 6 months ago | (#46315649)

It prepares you for jobs because it's not uncommon you will have to deal with people who don't speak your native language. It's also not uncommon for people to move somewhere else because of a job. In non-english countries, it's in your best interest to teach your students english because a lot of information is available in that language.

Re:Why? (1)

EzInKy (115248) | about 6 months ago | (#46315683)

How does one or two years of mandatory foreign language study do either?

It enables you to understand the orders your future bosses are barking. Really, Chinese should be a mandated prerequiste at every high school today because why should the Chinese waste precious time teaching their kids to understand just what it is you are saying? Chinese kids have important things to learn and such silliness as to how to communicate non-Chinese speaker wastes so much time and energy that better be spent learning how to program hardware.

Re:Why? (1)

ebno-10db (1459097) | about 6 months ago | (#46316467)

Chinese should be a mandated prerequiste at every high school today

They said the same thing about Japanese in the 80's.

Re:Why? (4, Interesting)

ledow (319597) | about 6 months ago | (#46315725)

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.

Zero points (1)

Hognoxious (631665) | about 6 months ago | (#46316203)

English is universally derided among them for being the easiest to learn.

A lot of people think that. A lot of people think they speak (and write) it better than they do. There's quite a degree of overlap.

And they're wrong. If it was the case, then English kids would be speaking in full sentences at 6 months whereas those who speak your idealised perfect un-pathetic language[1] wouldn't be able to ask for milk before they're hitting puberty.

The grammar is pathetic.

I don't even know what that's supposed to mean. Should it add noun declensions? Adjectival agreement? Pray tell, O great guru of linguistics.

[1] are you one of those Esperanto twats? You're certainly smug enough.

Re:Why? (1)

ebno-10db (1459097) | about 6 months ago | (#46316493)

English is universally derided among them for being the easiest to learn.

It's odd to deride a virtue.

Re:Why? (1)

phantomfive (622387) | about 6 months ago | (#46317083)

Well that's a pretty conception of half-truths and misconceptions. You should actually learn a language so you have an understanding for yourself instead of relying on the poorly described ideas of your friends

Re:Why? (1)

DNS-and-BIND (461968) | about 6 months ago | (#46317767)

English is "derided" for being "easy to learn"? What the fuck kind of world do you live in where that's a problem?

The world's common language should be easy. I'm learning an Asian language and it's difficult as hell for no good reason. I and everyone else learning it certainly wouldn't criticize it if it were easy.

Inferiority (-1)

Anonymous Coward | about 6 months ago | (#46315637)

Humbling, isn't it? You arrogant voluble fools.
By the way, consult fig. 2a for you edification, heathen porn-sucking trash.
--
Sheshbazzar

Re:Inferiority (0)

Anonymous Coward | about 6 months ago | (#46315651)

The link: http://www.gnxp.com/blog/2007/04/intercourse-and-intelligence.php
Have a nice day!
--
Sheshbazzar

Perl, Larry Wall, and Linguistics (4, Interesting)

theodp (442580) | about 6 months ago | (#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:Perl, Larry Wall, and Linguistics (5, Funny)

Anonymous Coward | about 6 months ago | (#46315681)

May I ask you to stick to the subject. We are talking about reading code. Everybody knows perl is a write only language.

Re:Perl, Larry Wall, and Linguistics (1)

theodp (442580) | about 6 months ago | (#46315703)

Nice (deserves better than a 0). I was unfamiliar with the terms write-only and reald-only languages [wikipedia.org] .

Re:Perl, Larry Wall, and Linguistics (1)

Hognoxious (631665) | about 6 months ago | (#46316227)

I was unfamiliar with the terms write-only and reald-only languages.

That's rather a surprise.

Moliere's Bourgeois gentilhomme springs to mind...

Re:Perl, Larry Wall, and Linguistics (0)

Anonymous Coward | about 6 months ago | (#46318001)

Well, "write-only" may be too general: I think of Perl as a "write-once" language, since even my own code from decades ago (I did a full MPEG validation parser, a natural for Perl) is now cryptic to me. On the other hand, I find my other code from that era (in C/C++, Bash, etc.) to still be quite readable.

I tend to prefer "simple" languages with a small number of powerful features, rather than a garbage-can language with an operator for everything (APL).

Of course, the limit of "simple" languages is reached at Lisp and FORTH, both of which I also consider to be "write-once" languages.

Re:Perl, Larry Wall, and Linguistics (1)

bill_mcgonigle (4333) | about 6 months ago | (#46316133)

and in turn, Perl is a language favored by folks who tend towards linguistic expression. Guys who spent their time in college doing a math major tend to favor languages like python, and they love to talk about the lambda calculus, etc.

From TFA:

All algorithms are written in imperative
Java code inside a single main function without recursion and with
light usage of standard API functions

Frankly, that's a decent choice for a first pass - rather explicit and "uninteresting". Further research would be interesting to see what changes by changing languages, recursion, inheritance, polymorphism, maps, events, function pointers, decorators, closures, s-expressions, etc. and then comparing against various aptitude tests on the parts of the participants. I suspect some clear trends would be found, which could help developers find their optimal language(s) more quickly than they way we do it today.

Re:Perl, Larry Wall, and Linguistics (1)

ebno-10db (1459097) | about 6 months ago | (#46316563)

Wall's training as a linguist is apparent in his books, interviews, and lectures. He often compares Perl to a natural language

And that's the downside to the language. I love Perl and use it as my scripting language of choice. However, as somebody I know who was trying to learn it said, "too much syntax". You don't need, and aside from a little syntactic sugar generally don't want an unnecessary profusion of different ways to do the same thing. It's a nice characteristic for poetry, but not programming.

give us ancient history of hysteria for 85 ediot (0)

Anonymous Coward | about 6 months ago | (#46315657)

ok. who can forget the hoopla surrounding presidential candidate ross perot's (billionaire computer programmer) 'deep voodoo & chicken feathers' speech meltdown, after which time he proclaimed he feared for his life from the gangsterious beltway feather peddlers?

for 85 then;; what was ross referring to?

Math is a language. (1)

JThaddeus (531998) | about 6 months ago | (#46315659)

Thank you, Professor Kugler [wikipedia.org] .

Re:Math is a language. (0)

Anonymous Coward | about 6 months ago | (#46316105)

Ha ha ha...
Imbecile! Math is, demonstrably, not even syntax of language. Heathendom, please, hang yourself.
--
Sheshbazzar

I have always felt coding was a language skill (1)

localroger (258128) | about 6 months ago | (#46315723)

Even though computer languages are different from human languages in major and universal ways we do use the same mental muscles to comprehend computer languages as we do human ones. This is also why it is much easier for children who are exposed to programming early to pick up the knack than it is if they aren't introduced to coding until they are adults.

While computer languages are about math a lot more than human languages, coding isn't really like doing math. It's more like telling the machine how to do math, which the machine then does for you.

Programming is about goals and organisation (2)

Alain Williams (2972) | about 6 months ago | (#46315729)

A lot of programming is about understanding a problem, seeing what the real needs are - not the ones that the users think they need. You then need strategic planning on how to meet those needs, a lot of that will be about understanding how the new program will fit into the existing ecosystem. Next comes the translation of that strategy into a programming language (or more: you may also need some SQL, HTML, shell, ...) and the completely different skills of debugging. Finally: documentation for the users and also the programmers [actually: I find that doing the first draft of the documentation before writing the code is a really good idea].

So: programming is much more than just language skills.

Some here have asserted that programming is a branch of maths. This may be true for some sorts of programs (or some subroutines), but it is not true for most of what I do -- although an understanding of maths does help some parts.

Summary: please don't be simplistic, programming is a complex skill that requires many different brain subsystems, language is just one of them.

Re:Programming is about goals and organisation (0)

Anonymous Coward | about 6 months ago | (#46315979)

No, it's been proven programming is a language skill.

Just relax, sit back and watch the show! Hillarity ensues when people abuse science and logic ;)

It's even funnier when coming from self-proclaimed "sceptics", who are somehow unable to be productive with anything else than deriding others.

Re:Programming is about goals and organisation (0)

Anonymous Coward | about 6 months ago | (#46318103)

I have to disagree with the distribution of emphasis.

The notion of "fluency" clearly bridges both the Computer and Natural language world. Yet it has a somewhat different connotation in mathematics (probably due to the size of the field).

I also think of programming more as a set of conversations than "pure" problem solving. The conversation between the programmer and the IDE is just one of them. Being able to determine clear requirements and specifications are additional conversations (especially when conversation with other humans is necessary). Developing high- and low-level testing are others (especially when you must interface with a test or QC/QA organization). Each requires different technical and non-technical skills. Even the task of programming itself gains other conversational dimensions when working in a team or with vendors, contractors, consultants and other outside entities.

Programming isn't "just" or even "primarily" about coding skills. It's about integrating the computer into the real world, as a useful tool.

The very best programmers I've known seem more like artists, more like great authors, poets or novelists, rather than "primarily" excellent engineers.

Fluency is a very powerful word. To me, it means that I no longer have to think at the low-level of nouns and verbs, but instead begin to intuitively work at much higher levels.

Sounds like my typical experience... (1)

JoeMerchant (803320) | about 6 months ago | (#46315735)

"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.

Usually, when I'm reviewing legacy source code, I find that the author's mathematical and logical reasoning centers were not strongly activated while writing the code, either.

Re:Sounds like my typical experience... (1)

mikael (484) | about 6 months ago | (#46315823)

It's like writing an essay. The quality of the source code really depends on a number of things; whether it was something new or familiar to the programmer, how distracting/peaceful the environment was, how much time was available to polish up and refine the code, and whether there was any framework that they could use (such as node based programming, GUI widgets, or the TCP/IP network layer models, template files for writing new modules).

Re:Sounds like my typical experience... (1)

JoeMerchant (803320) | about 6 months ago | (#46316773)

Oh, I understand completely, and an embarrassing large chunk of the legacy source code I have left behind falls into the "I could have done that better, if..." category. Nonetheless, it's amazing how many business and even life safety critical systems are creaking along on "proven" steaming piles of "could have done better, if..."

Sounds like a solid theory (1)

InfiniteBlaze (2564509) | about 6 months ago | (#46315743)

Programming languages are very much like spoken languages. If you understand the origin language, or have an innate ability to infer meaning, it is possible to naturally understand a new programming language. I studied C++ in high school, so Java and C# are familiar and easily understood. The structures make sense, and if I don't immediately know offhand what something does, I can infer from the surrounding code. The same holds true for spoken languages. English is my first language, and I studied German in school. I never formally studied any other languages because that wasn't my passion. My passion was working with computers. However, I can generally infer the meaning of spoken Spanish in the same way I would deduce the function of unfamiliar code. I look for parts I recognize, use them to help decide what the unfamiliar portion means, and test my guess.

Re:Sounds like a solid theory (1)

NapalmV (1934294) | about 6 months ago | (#46315861)

Programming languages are very much like spoken languages.

Agreed. With C standing for Chinese.

Re:Sounds like a solid theory (1)

InfiniteBlaze (2564509) | about 6 months ago | (#46316675)

I've never heard of Chinese++...isn't Chinese hard enough without making it more complex?

Re:Sounds like a solid theory (1)

NapalmV (1934294) | about 6 months ago | (#46316775)

Currently their wages aren't falling so they didn't see a need for it yet:

http://www-users.cs.york.ac.uk... [york.ac.uk]
.

Programming is a form of writing (2)

CaroKann (795685) | about 6 months ago | (#46315763)

I've always felt that writing good code is very similar to writing a good essay or research paper. The process is about the same. The thinking is about the same. The ideal steps followed to produce a decent paper are similar to the steps followed to produce decent code.

I've always thought that a good essay writer can make a good programmer. In particular, good essay writers can make good programmer/analysts or project managers. In both worlds, you struggle with scope, organization, and fact finding. Answering the question "What is this paper/program really and truly about?" is the primary task.

Code is closer to legalese than math (1)

140Mandak262Jamuna (970587) | about 6 months ago | (#46315785)

The authors are using fMRI images and proper scientific study to show that coding and natural language processing activate different parts of the brain. Most likely to be true. I am wondering if they would compare coding ares of the brain with the parts activated by writing legal contracts or legislation. Both of code and legislation/contracts try to express.. let me switch to coding parlance... Both coding and writing legislation try to describe if () then {} else {} under some context.

Both try to make it as unambiguously as possible, both try to define the context under which the conditional will be evaluated and the consequent actions/outcome/behavior for the true and false paths.

Both work most of the time for the anticipated context. But when unusual and unanticipated conditions arise, codes trigger bugs and the legislation triggers loopholes. Bugs are sometimes confused with features. Loopholes too are sometimes intended to be there.

Both code and laws need to struggle with legacy issues and maintaining historic behavior sometimes takes precedence over fixing the bug/loophole.

Re:Code is closer to legalese than math (1)

Max Threshold (540114) | about 6 months ago | (#46316431)

I've often thought the same thing. Too bad most lawyers are the analogues of the horrible developers coming out of code mills in Bangalore.

Re:Code is closer to legalese than math (1)

140Mandak262Jamuna (970587) | about 6 months ago | (#46316703)

Bad programmers come from everywhere. But the bad ones coming from India are particularly irritating because they think their bad code is great code.

Re:Code is closer to legalese than math (1)

sydneyfong (410107) | about 6 months ago | (#46317831)

Law is fuzzy. Programming is usually not.
Law is often inconsistent. Programming (or the underlying logic) usually cannot be inconsistent.
Law is relatively simple once you get past the fuzziness and inconsistencies. A lot of software is multitudes more complex than legalese.
There's often an easy way to test your program. Not so easy to test a legal theory or opinion. (You go to court, spend thousands or millions on legal fees before you get a judge to decide on the matter -- and then you have appeals)
Lawyers are usually not very anal about making the law "efficient" and "easy to understand". Sometimes the law is more complicated than it needs to be, and the lawyers like it that way (after all, they make money by translating all that crap to plain language). Most good programmers, on the other hand, strive to make their code easy to read.

English common law is basically all about struggling with legacy issues and finding new applications for old "code". The concerns about "backwards compatibility" (i.e. not overriding previous decisions) appear often enough to warrant a mention.

Disclaimer: IANAL, have a law degree, and I'm a software engineer.

Re:Code is closer to legalese than math (1)

140Mandak262Jamuna (970587) | about 6 months ago | (#46317937)

No the goals of legislation and computer program are the same. Unambiguous description of what should happen when under what circumstances to whom.

But law is stuck in an archaic mode. It is using natural language with words having imprecise meanings and sentence structures that can not easily handle complexity. It is like the biology books before the widespread adaptation of pictures in print. Elaborate naming conventions, trying to unambiguously descrine leaves branching off the stem two at a time, or one at a time etc etc. It is as though the lawyers are deliberately ignoring the advances in mathematics and in the use of diagrams, or novel syntax to describe nested conditionals.

Yes, in practice the law becomes very fuzzy and is open to varying interpretations. But when it comes to the goal, law and code try to do the same thing, unambiguous description of outcomes for every eventuality. Wish I could get some grad students in law and computer science would collaborate to write existing laws in pseudocode and use lexical parsers to find the unhanded/undefined branches in the flow chart.

for school, either programming or foreign language (1)

raymorris (2726007) | about 6 months ago | (#46315799)

I use several programming languages, and I can read about 3 human languages. While there are some similarities, I'd say the two things are quite different. However, that doesn't settle the question of what should be taught in school.

I've gone back to school. I'm getting a degree from WGU. For my degree, I could take either American history or sociology. By giving me the choice, the school isn't implying that history and sociology are the same thing. They are saying that either one will improve my education. I see foreign language and programming the same way. Learning either creates a more well-rounded and employable student. I see it as "take either foreign language or programming, not just basket weaving and bird watching".

Re:for school, either programming or foreign langu (1)

slickwillie (34689) | about 6 months ago | (#46316951)

Backin the early 1970's the college I went to allowed FORTRAN to satisfy one of the two language requirements.

Amazing that neurons (0)

Anonymous Coward | about 6 months ago | (#46315991)

can form into rough sketches of Natalie Portman like that

Some programmers? (1)

EmperorOfCanada (1332175) | about 6 months ago | (#46316231)

Some programmers are also terrible and I don't listen to them on matters involving programming let alone linguistics. I have always thought of learning another language and learning another programming languages as similar experiences. At first you try to tie the words almost one for one from one language to another. But once you become fluent you just start doing things differently. But just like anyone going from no language to their first language, they must first learn the basic concepts. But with human languages you do know that there will be a word for car, bus, airplane etc. But a language used by a primitive culture might have one word for airplanes, while, say, English has many many words, (biplane, monoplane, fighter jet, prop plane, etc) the same is in many programming languages. R focuses on concepts while matlab focuses on others as I suspect that people from a pearl diving culture would have shockingly nuanced words for things relating to underwater.

Then you get other nuances such as not using a programming language for long enough generally results in that language becoming rustier and rustier until it is gone. Yet you generally can relearn a forgotten language fairly quickly. An interesting experience would be to see if people even activate the same brain areas relearning a forgotten programming language as those used relearning a forgotten spoken language.

But even within a single spoken language you have cultural differences. People in LA don't generally small talk about the weather, but will go on and on about the traffic during their commute. But in the North East people can talk endlessly about the weather, and in my area the joke goes, "If you don't like the weather, wait 15 minutes." The same with programming languages, using C/C++ as an example you have embedded programmers who obsess over the limitations of their environment and can pack a data-structure with bit for bit perfection; while someone working on a desktop might obsess with making their application installation friendly; and a mobile developer might obsess over screen resolution/sizes. Needless to say while the vast majority of their vocabulary is similar their use of the language can be wildly different yet mutually comprehensible.

Now there might be one tiny catch. A programming language is combination of creativity and some mathematics. Thus the best brain comparison might be to someone doing poetry, someone writing a wordy financial report, and programming.

So my question to any programmer who doubts that spoken languages and programming languages are not hugely overlapping in the brain is: "What part of the brain do you suggest we are using to program? The brain parts that control our bowels?"

Not all programming is alike (0)

Anonymous Coward | about 6 months ago | (#46316293)

What did they study a "programming"? String processing with regexes in Perl, canvas graphics in HTML5, pointers in C, and tail recursion in LISP are totally different activities requiring totally different cognitive abilities.

Programming what exactly in which language? (1)

stoneforger (1386881) | about 6 months ago | (#46316495)

Because there's a vast difference in the type of mindset associated with Python for most tasks in contrast to assembly. The more abstract the language and the model, the more linguistic skills are involved because of how the language covers the underlying mechanics. The lower you go in level (having to work with pointers and stacks in C e.g.), the closer you are to the actual graph of the code in question, the more "math" are involved. Keep in mind, math isn't just algebra - I'm talking about graphs, and sets and stuff like certain techniques (like recursion). I mean, just how does reading assembly code involve linguistic skills other than decoding the "verbs" - the reconstruction of code into a graph is purely a mathematical concept. And perhaps, the real question is just how much "math" is involved in language - which frankly, depends on the language. I'm taking two somewhat extreme cases from both ends of the spectrum - I mean if writing some SCADA stuff is done in schematics, is it now the visual cortex that is solely used? It's math because language in fact can be best described using math. It's how the damnable lexical analyzer that feeds into the computer works. It's simply highly formalized with usually little in the way of being context-sensitive. I mean, this is old stuff, basically Chomsky's work. Are we just trying to prove that the brain has specific functions or map them? Because it's fine identifying what exactly goes in the process of programming, but coding is a subset skill of programming - they're different notions. A code is a rewriting, a shortened form, programming is building a machine (quite literally actually) to solve a specific problem in a given set of inputs. I'd go on about rediscovering the wheel or just going after research funds but it's really just interdisciplinary breakage.

Of course language centers were active... (1)

RoverDaddy (869116) | about 6 months ago | (#46317505)

while studying someone else's code. All the programmers were muttering and cursing under their breath, about what an idiot the programmer was and how much better they could have written the same thing.

Sigh. Yet another fMRi study with poor controls. (1)

wherrera (235520) | about 6 months ago | (#46317511)

The control groups should have been two other reading selections designed to bracket programming code reading: for example, reading mathematics, such as algebraic proofs, versus reading in an unfamiliar non-math vocabulary like a dense legal contract. It's possible that all would have looked similar, or that two but not three would have been similar, or all different. We just don't know.

And don't let me even get started on the fact that most fMRI studies use far too few subjects and then use absurd values for N like thousands of MRI mapped vertex points in a single subject to reach "significance" (a technique which would be considered a statistical cheat in any other field).

Not so fast (0)

Anonymous Coward | about 6 months ago | (#46317971)

Having actually looked at the code snippets in the article, I have a different conclusion. I believe they are actually measuring what happens when someone tries to map a written programming command to their mental concept of it.

They are showing very simple snippets of code that basically force the programmer to translate the words into what they do, deriving semantic meaning from text. I would agree that the task is roughly analogous to language processing, but only because the code given is easy enough to understand without reasoning about it's logic. If you show me a simple for loop I don't try to figure out what it's doing in any sort of exhaustive mental exercise. I know the concept of a for loop and I map the representation without thinking about it. The same way you would map the concept of an English word to your mental construct of it upon being asked to read the word. Another comparison would be asking someone to understand a single simple clause in boolean logic. It would basically equate to a translation exercise and not a logical exercise in simple cases.

Real programs though are not like single loops or like simple clauses. They are like a complex branch of interlinking logical clauses. I think that in order to understand what parts of the brain are actually used during programming you'd have to get the fMRI results from someone actually doing a normal programming task. I suspect using similar tests for any given field you could translate each one to learning a language.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>