3 ms·
I run a YouTube channel that's mostly devoted to reading code: https://www.youtube.com/@ants_are_everywhere https://www.youtube.com/@ants_are_everywhere I (try
by ants_everywhere 2y ago
I run a YouTube channel that's mostly devoted to reading code: https://www.youtube.com/@ants_are_everywhere https://www.youtube.com/@ants_are_everywhere
I (try to) read code from popular open source projects. It's a bit like sight reading in music because the idea is that I go in blind and try to make sense of it.
This rings true to me:
> The researchers saw little to no response to code in the language regions of the brain. Instead, they found that the coding task mainly activated the so-called multiple demand network. This network, whose activity is spread throughout the frontal and parietal lobes of the brain, is typically recruited for tasks that require holding many pieces of information in mind at once, and is responsible for our ability to perform a wide variety of mental tasks.
There is language of course, but I'm not working hard to process the language so it wouldn't show up as an fMRI signal. I am often holding several things in mind at once, including things like what the code does, what the authors are trying to do, what the author's background might be, how similar software works etc.
I did study math, and it also doesn't really feel like reading or doing math.
- inciampati 2y agoTo me reading code is reading math. It feels exactly the same. Same pattern about holding lots of things in mind at once.
- nkozyra 2y agoMost code is interpreted as declarative regardless of how it's written. I've always interpreted a chunk of functionality as a block of logic. Which is why syntax structures like if/else feel do natural. But we don't really follow natural language the same way.
- jack_riminton 2y agoWhat coding language/s do you normally use and what things are you most often coding?
- cgriswald 2y agoLikewise. Both code and math are almost physical objects in my mind. I hold these objects and relationships between them in my mind. I find it interesting that for language I find reading easier than writing but for code or math it is the opposite. When reading code or math it almost feels the same as when I’m learning a foreign language and trying to read it. I have to “translate” it into the my internal “objects”.
- nico 2y agoAnd 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 couple of those in a row are incredibly frustrating Pg talks about this in his essay of the maker schedule vs the manager schedule: (2009) https://paulgraham.com/makersschedule.html https://paulgraham.com/makersschedule.html
- tetris11 2y agoI 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,
- recursive 2y agoIf you're lucky enough to be working on your own code, that can work.
- kinos 2y agoTaking 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.
- gsuuon 2y agoNote 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.
- spacetimeuser5 2y ago>>This network, whose activity is spread throughout the frontal and parietal lobes of the brain, A (rare enough) person in chronic coma, regaining consciousness on a sedative-hypnotic drug zolpidem, which lasts for a couple of hours as long as the drug is active, can also show parietal lobes (and a bit of dorsal frontal lobes) activation (as showcased probably in Hamilton's Pharmacopoeia in a series on zolpidem). Thus, according to modern neuroscience and brain imaging, reading code is basically the same as regaining consciousness on zolpidem while in coma.
- ants_everywhere 2y agoThis is pretty fascinating, thanks!
- SoftTalker 2y ago> It's a bit like sight reading in music I was wondering if there was any correlation in the ability to sight read music and to quickly understand code. I played a few musical instruments as a child and teen but never got good at sight-reading. I've heard that musical ability and programming ability are often correlated but I could never have made it as a working musician. I did make a good career out of programming though.
- ants_everywhere 2y agoI've been curious about this too. I do play music. I've played maybe about 6 different instruments live in bands. But I was never any good at sight reading. My guess is if I were to try it now I'd be a lot better at it than I used to be. I do, however, rather consciously think of it as a form of improvisation. And I am much better at improvisation than I was at sight reading.