Live data from Hacker News

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

news.mit.edu

181–190 of 232 posts

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

#181
post #87

Earlier quoted context omitted.

Interesting. I feel like coding is not that dissimilar. In the early phases of learning a new coding language, I learn how to write lines of code. Sometimes it compiles, most of the time it would cause errors. At some point it works, but a more seasoned engineer could easily find places to refactor it in order to make it more extensible/flexible, easier to read, less brittle, and most importantly to this discussion o…

I don't understand this. If your code has wrong syntax it doesn't compile. If wrong grammar you can get very wrong results. But in english you can say "I go store" and it's understandable (which btw, can be a direct translation from several languages)

Wrong syntax is more like using the wrong words in human languages than it is like what we normally call bad grammar.

If you write in C 'foo(a;', that's equivalent to saying 'ball foo with a' - the compiler really can't understand what you mean.

The equivalent of 'I go store' is something more like writing 'int p; printf("%d", p);' - the compiler understands what you mean, but it's bad style, and possibly wrong (you're supposed to initialize a variable before you read it).

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

#182

Earlier quoted context omitted.

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.

You can play in a similar way with code. It's just that other developers will hate you for it.

It was pretty popular when Ruby and JS came on the scene. I think it’s receded now but there are still tools like Homebrew that are worse than what came before, but people switched to them because they were written in Ruby instead of Perl, and somehow that made it cool.

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

#183
post #156

Earlier quoted context omitted.

Actually when I write blogs I listen to music. So I dont think it matters a lot whether we are writing code or English. The songs and music just sort of goes in the background.

Interesting, it's the opposite for me. I can write or code while listening to music without lyrics (especially electronic or classical), but whenever there are words in the music, it's like 100% of the language-processing part of my brain focuses on that, and I can't really focus on anything I try to read (or even worse, write).

For me I can handle it if the lyrics are in another language, even if it’s one I speak. It’s not activating the same words so it’s easier to tune it out, maybe.

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

#184

Niklaus Wirth wrote that the term "language" is not too fitting to computer languages and that a more precise term would be "notation".

I prefer language to notation because language means to me syntax and semantics, both are important to differentiate say Go and Java

And I myself prefer "notation" because with notation we tend to look at the underlying thing, not the notation :) E.g. there are different notations for chess parties, but their peculiarities are not that important, it's the party that matters.

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

#186

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…

Makes total sense. If your grammar is wrong, the compiler will catch you. If your English grammar is wrong, I will catch you. Make progress.

The only time I'm going to correct your grammar if you haven't explicitly asked me to is if there's some ambiguity and you're saying something important for me to know e.g. making a specific request. Otherwise, if I think I get what you're going for, imo you're doing fine. Talking good is mainly useful as a class indicator.

One thing I think I've noticed among a lot of people who have lived in English-speaking countries for a very long time is that, after their accent reaches general intelligibility and their grammar reaches a point where they're always quickly understood, they stop progressing and leave it at that. I knew an Iranian-American guy in his 50s who had been in the US since his 20s who would drop every article except when it was important.

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

#187
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…

> Which is obviously the complete opposite of using a programming language.

I think learning programming by learning all the rules upfront and then trying to do sth isn't the best way to do it. Much easier to try to do something and iterate quickly learning what's needed to do the job. That's how people learnt programming on 8-bit computers - type a sample program and change stuff to see what it does. Then find something you want to achieve and try to change the sample program to do that. Eventually you understand how basics work and can learn everything else.

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

#188

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'm curious what's your first language. I'm learning Mandarin and find that it feels much closer to a computer language than English or Latin based. Though I don't think I'd say learning Mandarin (or any language) is anywhere near what it's been like learning computer languages. I find mathematical language different from both as well. They do feel like 3 different parts of my brain. Though math I'm highly visual (no…

That could be because Mandarin grammar is actually relatively simple, the difficulty is in “naturally” expanding your vocabulary (since characters take an order of magnitude longer to learn).

It wouldn’t surprise me if a lot of it feels like brute forcing syntax and keywords - there’s no way of reasoning through it, you just have to knuckle down and learn it.

It’s also part of the driving force behind my app (link in bio) - it can take a long time (i.e. years) to get comfortable carrying on a conversation, so I want to help people practise in a less intimidating environment.

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

#189
post #160
post #154

This may be the reason why you can still learn programming even when you are 40 years old, but its very hard for you to learn a new language the older you get as you language acquisition skills fade away. Also the experiment was "The researchers showed them snippets of code and asked them to predict what action the code would produce.". This may not be the best way to prove the thesis conclusively. Because when I rea…

First: that language acquisition at a later age is so much harder is not true. It takes a child 6 to 10 years to get fluent in their first language, and they don't spend 3 hours per week studying it, but 80. For adults, there are language schools with an immersive program. They are expensive, but successful. You probably won't get as good as when you'd have been immersed from day 1 in your life, but you can get quite…

Do you have a source for that? It’s something I’ve always believed, but have never seen actually rigorously researched. I’ve long suspected the “adult language learning difficulty” is simply due to having less time as you get older (not to mention an often ossified/obstinate attitude towards learning something new from scratch and feeling clueless).

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

#190

Earlier quoted context omitted.

That attitude is actually how I program—with scripted languages I write code and see what happens, if it didn’t work I write it again. I’m relearning C++ now and am doing it a similar way (albeit I have to be a little more careful because compilation makes it a lot slower). At one point, I wondered if this same strategy would make for a good (human) language learning app. Kind of like you described... rather than som…

> That attitude is actually how I program—with scripted languages I write code and see what happens, if it didn’t work I write it again. This is an incredibly harmful attitude towards learning, but it feels nice because it's a lot less effort than actually trying to read or listen to something to learn. It's just laziness. Learning C++ this way is how someone would end up with a buffer overflow every 30 lines of code…

It isn't only guesswork -- there is a lot of reading and researching involved too. I figured that was obvious but perhaps it was not. The point is that it is learning by doing rather than rote memorization and recall. It is easier for me to do something, see the result, and figure out what went wrong if it didn't work. It allows me to understand the function behind something, versus just being told "this is how to do something and you should always do it this way" without an explanation as to why.

What works for you isn't what works for everybody. And I'm absolutely not denying the importance of learning theory.

Post reply on HN