Live data from Hacker News

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

news.mit.edu

111–120 of 212 posts

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

#111
post #107
post #70

Lex Fridman recently interviewed Edward Gibson, a linguist, and they talked a lot about how the brain processes language, including how someone reading code lights up a completely different part of the brain than language. #426 https://lexfridman.com/podcast/ ETA: I believe Evelina Fedorenko, from this paper, is Edward's wife.

I believe it. My worst grade in primary school was french and I'm having such a hard time learning Chinese compared to my peers (taking evening online classes in community college) but programming has always come naturally to me. Completely different skillsets as far as I'm concerned.

> Completely different skillsets as far as I'm concerned.

My experience differs:

I find the way how programming is typically (also self-)taught much more fitting to my brain than how natural languages are (also self-)taught.

From my experience I do believe that if natural languages were taught in a different style, it would be much easier for a programmer brain to get good in them (I also consider it to be plausible that there might exist a way on how to teach programming languages that is more natural to "language-minded brains").

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

#112
post #31

Earlier quoted context omitted.

And this is why getting interrupted is so annoying It takes a while to “load up” all of those things in our minds, and it’s a bit like a balancing act, you need to keep balancing them to prevent the whole thing from crashing down Then if you get interrupted, it is like loosing balance and things falling into a mess. Afterwards you need to sort of pick everything up again, which takes time and effort More than a coupl…

I had this a lot in my 20s, but I notice in my 30s that an interrupt won't derail me as much. It's not that my brain is better at caching states, I think it's to do with being a better coder: meaningful comments, better proficiency in using the IDE, knowing when to not implement something from scratch,

If you're lucky enough to be working on your own code, that can work.

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

#113

Not to dismiss the study - I agree that hypotheses require proofs - but, based on my personal experience coding *feels* much more like math, and almost not at all a spoken language, except for the fact that we give identifiable "names" to things (keywords, variables, functions, etc.). Well, not unlike in math in fact. I wonder if the authors (neuroscientists) discussed the premise with programmers and linguists to fo…

> based on my personal experience coding feels much more like math, and almost not at all a spoken language

To me, both spoken/written natural languages and programming languages feel a little bit like math. :-) (no joke!)

I thus often tend to analyze subtle aspects of words just like one does code audits for hidden backdoors (admittedly - native speakers of English agreed - this is easier and more yielding to do in German, my native language, than in English).

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

#114
post #11
post #8

From the linked article, they found that it activates the region of the brain that carefully reasons through unfamiliar problems. They also speculate that this might not generalize to people with 30 years of programming experience. Well, fine, a lot of academic research is done with students. But doesn’t that invalidate any comparisons with natural language processing, something that the test subjects do have decades…

What I understand from this is that it could be that with 30 years of programming experience, the region of the brain that carefully reasons through unfamiliar problems activates less. That would make sense: if you are unfamiliar with programming, it makes sense that the unfamiliar problems zone activates. It would be interesting to study this, to know if this zone activates because of the unfamiliarity or if it stil…

Anecdotally, looking at code written by someone else always goes to 'unfamiliar' territory. I can only read code I'm very familiar with like a book.

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

#115

Programming is more spatial than linguistic. It requires temporal understanding in order to formulate, and usually data 'structures' are based around physically laying data out.

This claim does hold or imperative programming languages, but does it also hold for strongly declarative ones?

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

#116
post #31

Earlier quoted context omitted.

And this is why getting interrupted is so annoying It takes a while to “load up” all of those things in our minds, and it’s a bit like a balancing act, you need to keep balancing them to prevent the whole thing from crashing down Then if you get interrupted, it is like loosing balance and things falling into a mess. Afterwards you need to sort of pick everything up again, which takes time and effort More than a coupl…

I had this a lot in my 20s, but I notice in my 30s that an interrupt won't derail me as much. It's not that my brain is better at caching states, I think it's to do with being a better coder: meaningful comments, better proficiency in using the IDE, knowing when to not implement something from scratch,

Taking notes, taking notes, taking notes. Notepad as an external memory is just an amazing game changer for this. Doesn't even need to be deep, just a running tally of what you're thinking to get it to somewhere that you can reference it instead of running it on a loop in your short term memory. Makes fading in and out of it so much easier. I treat it like a conversation with myself half the time and the other half the time like I'm writing a reference book for someone else. Its worked well for fresh code, code to be, and analyzing existing code made by someone else. Cannot recommend it enough.

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

#117
post #95
post #75

Earlier quoted context omitted.

Occasionally you come across languages that do and, at least to me, those languages feel extremely difficult to deal with. For instance, I found AppleScript and HyperTalk to be awful to work with. I also notice that some junior programmers I've worked with tend to argue for coding styles in mainstream languages that read almost like sentences. Not sure if this is a generational thing or an experience thing.

I’ve seen the same thing, it might be generational. Someone arguing that we need an isNotEqual(a, b) helper in addition to isEqual(a, b), because that’s supposedly “cleaner” and more readable than !isEqual(a, b). They were very vehement about it, but I don’t get that at any level. It’s more lines of code to write and maintain, more unit tests, more characters to type at the usage site and to me, reads exactly the sam…

My personal opinion is that 'not' (Python-style) should be the operator instead, simply because it's easier to miss a ! than a 'not'. With that said, I'm with you in the 'not isEqual(a, b)' camp.

The exception, imo, is functions that take boolean arguments. Languages should make it easy to show what they mean, and devs should take care to explain them.

sort(reverse=true, numeric=false) is much easier to read than sort(true, false).

(Silly example, it's meant to illustrate the general point, not to say anything about the signature of a sort() function.)

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

#118
post #11

Earlier quoted context omitted.

What I understand from this is that it could be that with 30 years of programming experience, the region of the brain that carefully reasons through unfamiliar problems activates less. That would make sense: if you are unfamiliar with programming, it makes sense that the unfamiliar problems zone activates. It would be interesting to study this, to know if this zone activates because of the unfamiliarity or if it stil…

Anecdotally, looking at code written by someone else always goes to 'unfamiliar' territory. I can only read code I'm very familiar with like a book.

Equally anecdotally, I mostly agree but have a friend who writes code much like I do. Reading his code is like reading my own.

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

#119
post #101

Earlier quoted context omitted.

Both programs and math proofs are allowed to be written in story mode where definitions can come after their usages. Unless you write in C. There's no story mode in C :-)

There is CWEB. Literate programming is the ultimate story mode.

wtf is CWEB? I presume you're referring to something other than "China Internet Index Bull 2X ETF"?

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

#120
post #119

Earlier quoted context omitted.

There is CWEB. Literate programming is the ultimate story mode.

wtf is CWEB? I presume you're referring to something other than "China Internet Index Bull 2X ETF"?

See: http://literateprogramming.com/cweb_download.html
Post reply on HN