Live data from Hacker News

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

news.mit.edu

201–210 of 232 posts

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

#201
post #63
post #47

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

>And yet natural language aptitude highly predicts programming ability Its all correlated with g. >[0] They contrast "language learning ability", ie intrinsic intelligence, with "math knowledge", ie amount of schooling. For reference, you can take (a version of) the math knowledge test used here: https://www.idrlabs.com/numeracy/test.php If the article wanted to give a more honest interpretation of the paper, they wo…

What is "g" in this context? My first association is the gravitational constant, but somehow I highly doubt you're referring to that

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

#202
post #123

Earlier quoted context omitted.

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 an…

Have you studied syntax? They diagram sentences all the time

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

#203
post #140

Earlier quoted context omitted.

> If your code has wrong syntax it doesn't compile. If wrong grammar you can get very wrong results. In both cases, when you get it that wrong that your meaning doesn’t come across correctly, it’ll usually get pointed out to you, either by the compiler or the person you’re talking to, so you can go back and try again. Eventually, you’ve potentially gotten it right when the compiler stops throwing errors or the person…

In my experience, when you're an adult, people are too polite/reserved/caring/uncaring to correct spoken language errors for you. They'll be much more likely to infer what you meant silently, and react as if you'd spoken the sentence perfectly. In that sense, people are much more like a web browser in how they process your language than a compiler.

Apologies, I realise the way I wrote this wasn’t clear enough:

> Eventually, you’ve potentially gotten it right when ... the person you’re speaking to understands

I can see that I wrote poorly here myself, and here you (and child) are correctly correcting me, while simultaneously arguing against that happening, which is kinda ironic!

What I failed to adequately express was that human languages are a lot more forgiving of errors, and as long as the message is understood, you’ve gotten it “right”

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

#204
post #140

Earlier quoted context omitted.

> If your code has wrong syntax it doesn't compile. If wrong grammar you can get very wrong results. In both cases, when you get it that wrong that your meaning doesn’t come across correctly, it’ll usually get pointed out to you, either by the compiler or the person you’re talking to, so you can go back and try again. Eventually, you’ve potentially gotten it right when the compiler stops throwing errors or the person…

In my experience, when you're an adult, people are too polite/reserved/caring/uncaring to correct spoken language errors for you. They'll be much more likely to infer what you meant silently, and react as if you'd spoken the sentence perfectly. In that sense, people are much more like a web browser in how they process your language than a compiler.

Which is fine, you can learn a lot by immersion when you hear other native speakers talk. I only ask a person to repeat when I don't understand or if it's unclear and I need to be sure about something. Not breaking the flow of conversation is much more important to me

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

#205

Earlier quoted context omitted.

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…

I’ve found that reapproaching language when things don’t make sense to be very valuable. Gender in German, for instance. It seems to be completely arbitrary save for one detail: whichever “sounds” best. I compare this to using “a/an” in English (albeit the rules in English are somewhat more “strict” in this regard.)

There a re a few heuristics for German that are very useful. I had this problem myself and researched it deeply in this article (full disclosure: own website) https://mejuto.co/statistical-grammar-guessing-a-german-noun...

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

#206

Earlier quoted context omitted.

Tough one. Maybe script . That will make everyone groan. It's still a language metaphor (Latin script, Korean script). Or programming system in analogue of writing system . Becomes progsys for short. I know - why not just call it code ? That's what we already do. We can just make it the preferred term.

I think code would be ambiguous. For example in "I'm working on the code" do you mean what we now call the actual code, or the language?

We could use a longer for thing like coding system (codesys)? And then you could say I'm working on the Rust coding system, or the Rust codesys, or the Rust code itself (lazy version).

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

#207
post #96
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.

Your comment is insightful and suggests that perhaps we should try to design a programming language that feels more like a natural language.

This was attempted using COBOL with a varying degree of success depending on who you ask. I myself have not used it but it seems to me the verbosity would be a major drawback for most tasks. Perhaps one can learn to read it quickly but I believe having shorter yet self documenting names for variables, functions, objects, etc leads to being able to store more in our limited human working memory, which is vital for more complex operations. Code structured more like natural language takes longer to compile, and takes up more disk space. Perhaps these are not such drastic drawbacks for the use cases it was developed.

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

#208
In programming the variables are saved in RAM and RAM is limited and has scopes (e.g. global scope, local scope). You also have linked lists, arrays etc. I imagine spatial navigation is very useful to handle all of these. In math you don't care, your variables are defined globally and if you have multiple with the same name the context decides which one is used.

Math is not concerned with implementation details.

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

#209
post #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.

They are similar because they are both logographic languages. The MIT team should of added logographic languages in their experiment for the same reasons in this blog post:

https://blog.fluent-forever.com/logograms/

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

#210
post #42

Earlier quoted context omitted.

I can't tell if you're talking about legalese or programming. Oh well. Time to go code golfing!

Short code may seem unclear, but it does do exactly the same thing as longer code (if written correctly). It's exact opposite of natural language, where short sentences heavily rely on context and supposedly shared knowledge to beget correct understanding. And as such short sentences are prone to misinterpretation. A program can also be seen as an awkward natural language, conveying programmer's intention to other pr…

> short sentences are prone to misinterpretation

Exactly. That's why laws or contracts written by lawyers are so verbose. Think of a rent contract or a software license like GPL.

Contrast with WTFPL and similar...

Post reply on HN