6 ms·
Well this explains why, when I first started to learn to program, it took me hours to find one missing semicolon in 15 lines of C code, but after 20 years I can
by moron4hire 7y ago
Well this explains why, when I first started to learn to program, it took me hours to find one missing semicolon in 15 lines of C code, but after 20 years I can basically glance at a screen full of code and find them almost immediately.
- oscargrouch 7y agoI am a solo in a multi-million line of code codebase, and im always amazed about how many detail are still in my memory, even when i dont see those particular chunks of code for a year. It amazes me mostly because this is not the sort of tasks our brains were specialized in doing, by estimating our development path in nature as mammals. We discover and/or create new models and yet, we are able to adapt to them with some effort. Our new environments will probably affect the DNA that have the brain design, and we will pass all of this as a legacy to our kind. The brain is such a masterpiece of nature.
- cat199 7y ago> It amazes me mostly because this is not the sort of tasks our brains were specialized in doing, by estimating our development path in nature as mammals. concievably this might be similar to spatial navigation, which would be something we'd evolve for as hunter/gatherers
- vlovich123 7y agoAnd that we build artificial structures that align to how our brain operates. I suspect the source code written & the tools built would look a bit different if they're tuned to a brain with a totally different operational principle.
- oscargrouch 7y agoThis is a great observation. Our tools would be designed according to our experience of the world. But theres another catch, the tools we use change the shape of our mindset, leading us to design other tools that now map to this new perception of reality we have with the new mindset we built by using the former tools. The hunter-gatherer example given in the first comment for instance, i bet with enough evolutionary steps, we will not be able to trace back to that mindset, because we have "patched" our own mindset so many times with new tools(over tools) that we will have very little "mindset identity" to share with our former "hunters-gatherers" primordial cousins.
- Geee 7y agoAlthough, I think programming languages could be designed to be even more friendly for our visual/spatial brain. I don't think text-files are optimal.
- thedirt0115 7y agoOoh, this seems like something we can test! Brain scan while doing spatial navigation tasks vs tasks that require reasoning about the structure of code -- hypothesis would be that it should light up some of the same areas?
- arh68 7y agoWhen you revisit old code, does it seem like a room in a house? Does it make you think of other code? (code nearby, or maybe code you write around the same time..?) Honestly just curious. It feels like rooms in houses to me. You are brave to handle that much code, imo.
- oscargrouch 7y agoI've worked with lot of different codebases in my life, but nothing ever like the one im dealing now, so thats why i had no idea how/if i could handle it. Of course theres a erosion process if you dont touch that piece of code for more than 1 year, and it happens with a codebase of that side, but the 'partial data' is is still there, and with a couple of minutes dealing with it, you recover the information. Its better when you shape the code yourself.. when you lay down the objects, methods, etc.. But this also works great with code i've happen to just use. For the architecture and where things are.. be it files, methods, or where i could find something i want.. there were no lost. I feel i need this partial recovery process mostly for codebases with 2 or more years, and the lost is minimal and can be recovered quickly. Now being more specific over your question, for me it fells more like a map, smaller maps or trees connected to top-level maps... But yes, it feels a little like rooms as in a quadtree, where you need to specialize and ignore the other parts of the tree for a bit, much like the occlusion/visibility process that algorithm gives. By the way is great that you have used this analogy, because this is also part of an observation i've had about laying down the information for a specific goal i have in mind. I cant wait to experiment with this as soon as i finish this thing im working on, to see if its really cool as my intuition is telling me..
- jhayward 7y agoYup. Visual pattern matching is very strong in programming skills.
- deepsun 7y agoYea, they underlined in red now.
- moron4hire 7y agoNot on my screen
- Wildgoose 7y agoI know what you mean. I was called over to a colleague's desk to answer a query he had with a change he was making, (in an old IDE without colour-highlighting). It just looked wrong. So I rearranged the code slightly and it was immediately obvious he'd mismatched his closing parentheses. It wasn't conscious. I just knew it was wrong.
- klyrs 7y agoIf you're older than syntax highlighters, you probably don't need them like all those pesky kids on your lawn. When I worked in a computer lab, I'd often walk past kids writing code in notepad, peer over their shoulder and spot imbalaced parentheses or a missing semicolon. I'd keep it to myself unless they asked for help, because it's a learning process... and then they'd be amazed as I immediately found the spot. And sure, they probably save you time. But for me, they add visual clutter and only spot trivial issues, and rarely save me a few seconds per day.
- Eli_P 7y agoYou might be a visual kind of person, those make a good mathematician. After a decade of experience I happily dump all the boring stuff to type checkers and linters. One day in the morning I was being in a state of half dreaming - half awake, and among other closed-eyes visuals I observed a series of white screens (sort of 80x25), filled with the same digit, like all zeroes or all threes. I don't know if those were the layers of my brain's NN responsible for recognizing texts. But I generally suck at visual navigation: I don't rely on code-minimaps, scroll-bars, I don't remember if that particular function is above or below. I use tools like quick-jump, fuzzy search, I just need to run a thread of interest through my mind and recall instantly what to search.
- gigicontra 7y agoYeah, I have a similar experience and the other day I was working on a little bit of scheme which is new to me and couldn't figure out which parasites was missing. Took a lot of visual linting to spot it. I know there are tools but i was using the repl where you have to do it by eye/hand. Hopefully it'll get better as I love the language.
- vaylian 7y agoThis. My students have been absolutely astonished how quickly I can spot any problem they had in their code. They made the same beginner mistakes that I made many years ago so it's relatively easy to find what's wrong.