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?
131–140 of 212 posts
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?
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.
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 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.
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 :-)
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…
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.
Yes, it drives me nuts that e.g. Python makes you put the definitions before their use!
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
Reading code without running it in your head feels like reading prose without actually comprehending it.
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!
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.