Live data from Hacker News

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

news.mit.edu

131–140 of 212 posts

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

#131
I would think intuitively it is a different brain process.

I wonder if brain-wise reading code is similar to a judge reading through various laws to make a judgement?

Is it also similar to reading a math proof? Are all these things different?

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

#132
> It’s not the same as language, and it’s not the same as math and logic

Not the same as logic? What?? Code is literally logic itself. Code that works with all supported parameters is logically correct code by definition. It's often impossible to prove exhaustively but it can be inferred with very high confidence in many cases.

Producing correct code is the goal of all good developers. Just like producing correct equations is the goal of all good mathematicians.

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

#133

Alright, since I did a quick skim over the article liked by @JonChesterfield and didn't find any discussion of how they calibrated their fMRI machine or if they did any Multiple Comparison Corrections, time to post the obvious: http://prefrontal.org/files/posters/Bennett-Salmon-2009.pdf fMRI is not a silver bullet, do your due diligence everyone. I'll wait for this to be replicated before I read anything into it.

I have a stupid question, does anything ever actually get replicated?

I mean; I have a graduate degree, and I’m proud of the work and I think it could very practically be replicated… but will it? Probably not.

If you claim to invent cold fusion probably, but for a study about coding brain I can’t see it being even useful to replicate.

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

#134
post #101

Earlier quoted context omitted.

“Story” mode is why I like to organize my code top-down, often with definitions appearing after their usages. It makes the code read more like a story from top to bottom. Some like to organize their code such that any term always appears before it is used. Like a math proof or something. I find this somewhat pleasing but unhelpful for understanding the “story” you mention.

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 :-)

If you forward declare things there are. The compiler really just cares about the shape and the symbol it has to call.

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

#136
post #116

Earlier quoted context omitted.

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

Note taking is great not just for recovering from distractions but also preventing them in the first place. Just jot down branching tasks that would've been a distraction and come back to them later instead of being the Hal fixing a lightbulb meme.

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

#137

Earlier quoted context omitted.

That’s an excellent point. I’ve realized that I sometimes read code in more of a “story” mode, where I’m just looking for the gist of what’s happening and what it is “about” rather than the nuts and bolts of how it actually works.

“Story” mode is why I like to organize my code top-down, often with definitions appearing after their usages. It makes the code read more like a story from top to bottom. Some like to organize their code such that any term always appears before it is used. Like a math proof or something. I find this somewhat pleasing but unhelpful for understanding the “story” you mention.

> “Story” mode is why I like to organize my code top-down, often with definitions appearing after their usages.

Yes, it drives me nuts that e.g. Python makes you put the definitions before their use!

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

#138

The paper wasn't linked as far as I can tell but is probably https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7738192/pdf/eli... > While the programmers lay in a functional magnetic resonance (fMRI) scanner, the researchers showed them snippets of code and asked them to predict what action the code would produce I have a suspicion that writing code and understanding that written by someone else are different skill sets.

Perhaps reading code activates the same arras as reading prose in English, but running code in your head activates other areas

If you read code and don't think about what it's doing, are you really "reading" it?

Reading code without running it in your head feels like reading prose without actually comprehending it.

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

#139

Earlier quoted context omitted.

“Story” mode is why I like to organize my code top-down, often with definitions appearing after their usages. It makes the code read more like a story from top to bottom. Some like to organize their code such that any term always appears before it is used. Like a math proof or something. I find this somewhat pleasing but unhelpful for understanding the “story” you mention.

> “Story” mode is why I like to organize my code top-down, often with definitions appearing after their usages. Yes, it drives me nuts that e.g. Python makes you put the definitions before their use!

well, it is like introducing the characters before they play a role

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

#140

Earlier quoted context omitted.

Perhaps reading code activates the same arras as reading prose in English, but running code in your head activates other areas

If you read code and don't think about what it's doing, are you really "reading" it? Reading code without running it in your head feels like reading prose without actually comprehending it.

Maybe? I don’t need to read and calculate every iteration of some loop to understand that it’s mapping. While if I need to determine the actual output value of a function, I might.
Post reply on HN