Live data from Hacker News

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

news.mit.edu

121–130 of 232 posts

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

#121

This is hardly surprising. The only reason "programming languages" are called that is because early computer scientists borrowed from linguistics research at the time which defined language as a set of strings. Programming is general purpose problem solving, the fact that it is expressed in mostly English words is arbitrary e.g. Brainf*ck.

It's irrelevant how a language is implemented. Math notation is also a language and it barely uses any English words.

I don't see meaningful differences between languages whether they are computer languages, human languages, math notation, except how the human brain processes them.

>linguistics research at the time which defined language as a set of strings.

Fundamentally there is nothing wrong with that. You can have trivial languages that follow simple rules. In practice humans tend to use more complicated languages but that is just their personal and cultural preference.

People here are too hung up the message that is being communicated rather than the general idea of language as a communication method. Programming languages usually express algorithms and trigger logical sections of the brain but nothing prevents you from using a human language to express the same algorithm and trigger the same sections of the brain. The reason why people associate programming languages with logical thinking is that they were exclusively designed to communicate logic and nothing else.

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

#122
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 was originally surprised by the study and your comment, since I generally find no difference between natural languages , math and programming languages. (I am a math major). However, most of the people I interact with find my exposition methods curious in sense of structure. So, I shared this study with some of my friends, and they agreed with the study too. When I pointed out my surprise to them, they told me that…

Wow, that's crazy.

Others here, and presumably your friends, have talked about how they think of programming "visually", but they don't think visually about conversing in natural language.

I thought of a concrete way to describe it: it "feels obvious" to me that any programming language could be "easily" replaced by a systematic diagramming method, with programs translated systematically into equivalent diagrams. If anything, a diagram would be clearer and more readable to me than the same program in plaintext. (Of course, it would be much more cumbersome to input such a diagram into a computer than plaintext.)

Whereas the idea of systematically translating arbitrary natural language sentences into diagrams is...nonsensical to me. I mean I wouldn't even know where to begin.

I'm curious if for you, do you feel like you could easily systematically translate a natural language sentence into a diagram? Or, because you don't think as visually as people like me, translating a program into a diagram is not "obvious" to you at all? Or maybe this distinction just doesn't feel significant to you, one language being diagram-translatable and another being diagram-untranslatable doesn't cause them to feel different, they feel equally language-y to you?

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

#123
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 was originally surprised by the study and your comment, since I generally find no difference between natural languages , math and programming languages. (I am a math major). However, most of the people I interact with find my exposition methods curious in sense of structure. So, I shared this study with some of my friends, and they agreed with the study too. When I pointed out my surprise to them, they told me that…

I have the exact opposite experience. For me, part of the problem is that in math, you have options. If you forget the quadratic formula, you can:

- Re-derive it by completing the square on the general quadratic

- Solve a specific quadratic you're interested in by factoring or graphing

- Try to find zeros with numerical methods

The point is, everything's connected to everything else, so it doesn't matter if you forget any part of it as long as you remember some critical mass.

To be fully fluent in a programming language, you have to memorize two or three dozen keywords and a handful of operators (mostly the same as standard math). To be fluent in a natural language, you have to memorize two or three dozen words a week for years. Not to mention understanding all the insane grammatical stuff.

With human languages, sure it's easy enough to remember that "nec-" means "dead" (especially if you consume fantasy novels / games where necromancy is a school of magic), but you're still totally screwed if you can't remember whether the word you need is "necare" or "necire," "necobitis" or "necabitis" or "necibetas". There's no rhyme or reason to any of it, your knowledge won't help you figure out whether that letter's supposed to be an "o" or an "i", or the difference between past tense and future tense and perfect tense and imperfect tense and tensile strength and gaaah why is this all so complicated!?

It's like if a programming language had 20 different versions of each keyword, and they were all spelled with one or two letters different, usually only the vowels are different. And they all compile, getting the wrong one just creates subtle semantic bugs at runtime. And there's a maze of rules telling you which version of the keyword you use if you're inside a loop body or a function body or a conditional statement body. Oh, and there are six different versions of the "if" keyword, and they're all two letters long, good luck getting the right one of those. And if your code's going to be executing two or more times, all the names of your variables will suddenly be different. And when you refer to a struct outside of the function that created it, all the field names are transformed. And whoever was writing the compiler put ten different special cases in the code for transforming your variable names, just because they could.

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

#126
post #123

Earlier quoted context omitted.

I was originally surprised by the study and your comment, since I generally find no difference between natural languages , math and programming languages. (I am a math major). However, most of the people I interact with find my exposition methods curious in sense of structure. So, I shared this study with some of my friends, and they agreed with the study too. When I pointed out my surprise to them, they told me that…

I have the exact opposite experience. For me, part of the problem is that in math, you have options. If you forget the quadratic formula, you can: - Re-derive it by completing the square on the general quadratic - Solve a specific quadratic you're interested in by factoring or graphing - Try to find zeros with numerical methods The point is, everything's connected to everything else, so it doesn't matter if you forge…

That is such an interesting and...low-level way to think of it.

To me it feels a little deeper than just there being a "maze of rules". Your earlier mention of "everything's connected to everything else" resonated with me more.

In a sense, the expressive power of programming languages, and mathematical notation, feels very small. I liked the board game metaphor brought up in the top comment: programming languages and mathematical notation merely feel like arrangements of board game pieces (from an infinite box, and the rules of how they can be arranged are "context-free"). They don't have meaning except what we impose (ideally, assisted by comments).

A metaphor I brought up in another comment is that it feels "easy" to systematically translate an arbitrary program into an equivalent diagram, such that the diagram would contain 100% of the operational information in the program, and could be runnable as-is. (Would be cumbersome to input into the computer, ofc.) Whereas the idea of systematically translating an arbitrary natural sentence into a diagram just seems...nonsensical to me. I wouldn't even know where to begin.

Does that resonate with you?

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

#127

>The subjects in the study were all young adults proficient in the language they were being tested on. They name Python and ScratchJr, but no hints on what spoken languages were examined. I've been told Chinese and Japanese are much closer than Romance languages to code.

That's a very strange statement, since Chinese and Japanese are not at all similar languages. There are some loanwords, the shared writing system and a lot of historical and cultural, err, interchange, but they have no shared linguistic ancestor and grammatically are just about as different as languages can be. Linguistically, Japanese and Chinese have about as much in common as English and Navajo.

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

#128
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 feel exactly the same, I've been learning a second language and it's nothing like learning programming, in fact arguably the opposite, I've found that obsessing over grammar is almost detrimental to making progress with a new language. The confident students who aren't concerned with getting all the specifics of grammar exactly perfect are the ones that are making the most progress toward being conversational, they…

> obsessing over grammar is almost detrimental to making progress with a new language

If you skip over the hard parts, then you're not exactly learning a language. You might as well just learn from one of those "Hello, my name is Bob, where's the toilet ? " cartoon books.

Its a bit like those people who learn programming informally. Most of them end up writing spaghetti code for the rest of their lives.

Its the same with languages. Skip the hard bits and your attempt fluency will hit a wall at some point relatively early on. Grammar is tough, but stick at it, it will eventually become second nature. Don't be lazy.

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

#129
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.

This is unsurprising given that abstract algebra/type theory/category theory are often viewed through the philosophical lens of Srtucturalism.

https://en.wikipedia.org/wiki/Structuralism_(philosophy_of_m...

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

#130
post #110

Earlier quoted context omitted.

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.

This is also why visual low-code programming might actually succeed: it's closer to how you think about code than the actual code. It has the opportunity to visualize the structures you want to see, so you don't have to make that translation yourself.

Visual low-code programming sounds good until you try to express actually non-trivial stuff in it, and you start appreciating text-based flow control again.
Post reply on HN