Live data from Hacker News

To the brain, reading computer code is not the same as reading language

news.mit.edu

51–60 of 232 posts

Re: To the brain, reading computer code is not the same as reading language

#51

Earlier quoted context omitted.

The one thing I think is different about reading music is sight-reading, where you're reading it at speed while playing it. I can do that with music and text, but not computer code, even in a language that I'm super familiar with.

Yep. My hypothesis is that this is largely because code is non-linear whereas most written music is usually read in a linear fashion. Agree/disagree?

That seems plausible. Music is written to be read in that way. Writing and sight-reading are a sort of symbiosis. There are no subroutines or abstractions. And a good reader recognizes a lot of patterns by familiarity. There's stuff that goes straight from my eyes to my fingers while I'm thinking about something else. But if you write some completely random note pattern or rhythm (or both at the same time), I might be in trouble.

Re: To the brain, reading computer code is not the same as reading language

#52

It's only briefly mentioned, but learning to read music is quite similar in terms of brain function to learning programming. It's symbolic, logical and structured. My university went so far as to allow students with a bachelor's degree in music to directly enter the computer science master's program.

The one thing I think is different about reading music is sight-reading, where you're reading it at speed while playing it. I can do that with music and text, but not computer code, even in a language that I'm super familiar with.

I think the programming analog of sight reading might be following along with assembly language or other low-level or simple imperative code while mentally tracking basic stuff like register/variable usage and control flow. Sight reading music doesn't involve real-time analysis of the broader abstract structure of the piece. That's not really applicable to high-level code making heavy use of nested abstractions or non-imperative paradigms.

Re: To the brain, reading computer code is not the same as reading language

#53
post #28

As someone who is fluently bilingual and speaks a third language and is also proficient or better in a half dozen programming languages along with having written code in many more, this is completely obvious to me. Learning a programming language is much closer to learning a complex board game than it is a natural language.

I agree, this is probably because we never 'speak' (although write) in programming languages trying to convey something. This goes same for 'hearing' (although we read and understand, hopefully). We always use human languages for those purposes, well, except for those times we speak in pseudo-code.

Re: To the brain, reading computer code is not the same as reading language

#54
post #28

As someone who is fluently bilingual and speaks a third language and is also proficient or better in a half dozen programming languages along with having written code in many more, this is completely obvious to me. Learning a programming language is much closer to learning a complex board game than it is a natural language.

I like that example of "learning a board game." When I read text I "hear" conversations, and when I read code I "see" structures. Definitely different parts of the brain being activated.

I find this mirrors my experience. Although written language does eventually call upon highly visual parts of the mind, the structures and mechanisms I visualize when reading code are more highly dimensional than the initial mentally vocal interpretation of text. A program small enough to hold entirely in my mind that I know well, such as a piece of demo-scene code I'm golfing, is a sort of multifaceted non-visual abstract sculpture with features and values that interconnect in a seamless manner that I can interact with and predict the effect of my modifications on. I highly enjoy being utterly engulfed in the flow of this simultaneously logical and artistic activity.

Re: To the brain, reading computer code is not the same as reading language

#55
post #47

And yet natural language aptitude highly predicts programming ability[0] [0] https://cacm.acm.org/careers/243179-forget-math-language-ski...

I'm not intending to make some grandiose point here, only that I suspect natural language aptitude is highly correlated with success in various different domains, not just programming.

Re: To the brain, reading computer code is not the same as reading language

#56
post #28

As someone who is fluently bilingual and speaks a third language and is also proficient or better in a half dozen programming languages along with having written code in many more, this is completely obvious to me. Learning a programming language is much closer to learning a complex board game than it is a natural language.

I am autistic.. I read code and "interpolate" across lines quite well. On the other hand, finishing one basic written sentence can sometimes be a surprising struggle.

Human language tends to be pretty fuzzy. Code seems to be quite precise and very pedantic about details.

In human language, you can play with idioms, metaphors, double entendre, etc.

In writing code, you miss one symbol and it breaks.

Re: To the brain, reading computer code is not the same as reading language

#57
post #52

Earlier quoted context omitted.

The one thing I think is different about reading music is sight-reading, where you're reading it at speed while playing it. I can do that with music and text, but not computer code, even in a language that I'm super familiar with.

I think the programming analog of sight reading might be following along with assembly language or other low-level or simple imperative code while mentally tracking basic stuff like register/variable usage and control flow. Sight reading music doesn't involve real-time analysis of the broader abstract structure of the piece. That's not really applicable to high-level code making heavy use of nested abstractions or no…

That's right. The level of analysis during sight-reading is along the lines of: "I hope I don't screw up in the next 500 milliseconds, and who's that person who just came in the front door?"

Re: To the brain, reading computer code is not the same as reading language

#58

Earlier quoted context omitted.

Yep. My hypothesis is that this is largely because code is non-linear whereas most written music is usually read in a linear fashion. Agree/disagree?

That seems plausible. Music is written to be read in that way. Writing and sight-reading are a sort of symbiosis. There are no subroutines or abstractions. And a good reader recognizes a lot of patterns by familiarity. There's stuff that goes straight from my eyes to my fingers while I'm thinking about something else. But if you write some completely random note pattern or rhythm (or both at the same time), I might b…

There are loops which could be considered subroutines. Also if else.

Re: To the brain, reading computer code is not the same as reading language

#60
post #28

As someone who is fluently bilingual and speaks a third language and is also proficient or better in a half dozen programming languages along with having written code in many more, this is completely obvious to me. Learning a programming language is much closer to learning a complex board game than it is a natural language.

> this is completely obvious to me

This was my reaction as well: what, they needed to do a study to figure this out?

Post reply on HN