Live data from Hacker News

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

news.mit.edu

81–90 of 232 posts

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

#81
post #36
post #18

Earlier quoted context omitted.

That sounds reasonable, I've helped edit a few things and need to decide on each pass whether I'm reading for content or structure. Totally different mindset. I've also found when I'm deep in a problem solving mode like coding I tend to be far less empathetic. So it seems to mess with my people skills too until I come up for air.

I think many programmers often lose empathy from too many long hours of deep problem solving and never really get it back. A therapist for instance once said that John Carmack had little to no empathy for other human beings.

Apparently this is from a psychiatric evaluation when he was caught perpetrating a burglary at age 14. That's definitely an unusual and disturbing thing for an adolescent to do. But do you have reason to think Carmack got that way at that age specifically because of his interest in programming, or that his interest in programming kept him that way thereafter?

I'm skeptical of this because he went on to be a successful, respected computer scientist and business leader, as well as starting a family. While of course many people who've done each of these things may be bad at empathy (or worse!), I'm not aware that Carmack has somehow continued along the course he was on at 14.

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

#82
post #42

Earlier quoted context omitted.

Not at all. Legalese is human language and it's the opposite of programming: the shorter the text the more fuzzy and unclear it is.

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 programmers, of course. But it's a different modality of the code.

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

#83
post #14

This would explain why I can listen to music or TV while coding, but not while reading a book.

I'm reading this while listening to music.

I constantly read and program with music including lyrics. Music tracks I don't know would probably be harder.

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

#86
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 speak like a computer program in the sense of structure of exposition.

So, I guess I agree with this study in general, and actually would love to know what's going on in my brain.

For what it's worth, I am fluent in 4 natural languages from two different families and I'm learning a fifth language. Also, I'm fluent in multiple programming languages.

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

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

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 on coding language, more idiomatic.

Now, you could say surely I could've seen these by reading the docs and learning about certain library features or patterns specific to the language. But in my experience, I tend to learn faster by first exercising my brain and trying it out on my own take before having someone (be it a mentor or a tutorial/book) correct me so that I have a bit more context about why an alternative approach is better.

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

#88

Having fumed for years about the too-often poor state of software documentation and program comments, I was not surprised by the result, although it was nice to see it proved. What did surprise me, though, was the lack of similarity to mathematical thinking. Was, this, though, because they used fairly simple snippets of Python, a programming language which is not very mathematical in its notation? Would a different r…

> What did surprise me, though, was the lack of similarity to mathematical thinking

I've noticed that many programmers hit a wall when dealing with Haskell or mathematics because notation that I parse effortlessly they have to puzzle over symbol by symbol, so I suspect it is a different system.

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

#89

Having fumed for years about the too-often poor state of software documentation and program comments, I was not surprised by the result, although it was nice to see it proved. What did surprise me, though, was the lack of similarity to mathematical thinking. Was, this, though, because they used fairly simple snippets of Python, a programming language which is not very mathematical in its notation? Would a different r…

> a multithreaded C++ program which copiously used autoincrementing pointers and polymorphism

I'd hazard a guess that the results would be the same. It all boils down to (multiple) sequential processes, which can be analyzed by spatio-temporal reasoning.

Functional programming, on the other hand, may be different. When "execution" of your program is driven by beta-reductions and control flow can be abstracted away, it becomes less certain that spatio-temporal reasoning is the right tool for the task.

And, yes, I hit the wall madhadron mentioned in the sibling comment.

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

#90
post #81
post #36

Earlier quoted context omitted.

I think many programmers often lose empathy from too many long hours of deep problem solving and never really get it back. A therapist for instance once said that John Carmack had little to no empathy for other human beings.

Apparently this is from a psychiatric evaluation when he was caught perpetrating a burglary at age 14. That's definitely an unusual and disturbing thing for an adolescent to do. But do you have reason to think Carmack got that way at that age specifically because of his interest in programming, or that his interest in programming kept him that way thereafter? I'm skeptical of this because he went on to be a successfu…

He apparently put his desk in the hallway so he could see when everyone left, and fired a guy for not staying late enough (even though that guy was coming in early).
Post reply on HN