5 ms·
I don't have a strong opinion about learning styles. However, and I think this is related, I have strong negative reaction when names in code are not easily pr
by rectang 8y ago
I don't have a strong opinion about learning styles. However, and I think this is related, I have strong negative reaction when names in code are not easily pronounceable.
Good: "regex", "func". Bad: "regexp", "fn".
This is because I hear code aloud in my head when I read it, and if I don't know how to pronounce something it interrupts my reading momentum until I figure out some way to say it.
Naturally I suppress my reaction because it's just a coding style thing and not worth arguing about with colleagues and collaborators.
But it is definitely a strong enough effect that if other people had my tendency we would never get a keyword like 'fn', at least from other native English speakers. The explanation I've tended to believe is that other people perceive code more visually and less audially than I do.
- stordoff 8y agoI'm largely of the opposite group. Having names that aren't pronounceable helps me read code faster, as I don't try to pronounce it, and can just treat the entire word as a unit rather trying to "read" it. I do the same in English when reading fast. I distinctly remember reading "Hermione" in Harry Potter as a child, and, because it was a name I hadn't encountered before, just "reading over" it and not thinking about the actual pronunciation. I didn't think about the actual pronunciation until some years later (probably when it was brought up in the books). Even now, if I try to pay attention to my internal monologue whilst reading, it's often words running into each other or being skipped, unless I deliberately slow down, because I'm not actively subvocalising and I'm reading faster than I would pronounce them.
- rectang 8y agoThat makes sense. Then the question in the context of "learning styles" is, if these differences are real, are they actionable -- can we produce measurable differences in outcomes?
- itronitron 8y agothat reminds me of reading Huckleberry Finn and having no idea what Jim was referring to when he used the word 'chile' until I actually sounded it out and then everything Jim was saying made sense
- Kluny 8y agoHermy-own. I stumbled on it every single time.
- jabgrabdthrow 8y agoFWIW I follow your argument but my perception is not visual at all but “grammatical”. Do you read punctuation out loud in your head? If not then whatever you do is how I chunk “fn”, which if it has to be verbalized gets pronounced by inserting schwas wherever convenient so like “fun”
- rectang 8y agoOften, but not always? I might read `(a, b, c)` as "a b c" rather than "a comma b comma c" and unless I was dictating I would not say "left paren", etc. On the other hand, I would read "foo.bar()" as "foo dot bar". The specifics of this subvocalization habit, I don't think are salient. What's interesting (to me at least) is that I have to have some verbalization and when something doesn't fit into the model it is disturbing. I imagine that other people with this habit have different specific pronunciations, but the way they experience code is similar. For what it's worth, I pronounce `fn` as "effin". Which may or may not be an editorial comment on the spelling, depending on my mood. :)
- Someone 8y agoDo you go all the way to Good: “begin”, “end”. Bad: “{“, “}”, “:” ? I’m asking because one can also see keywords as punctuation, adm punctuation tends to be short. That would make “fn” better than “func” (λ wold be even better, if it were easier to type on common keyboard layouts)
- Sylos 8y agoNot the same guy, but similar feelings, and well, I actually dislike it when programming languages actively declare "function", "begin", "end" or even "X references" (Visual Studio). Because when I read words, I try to assign logical meaning to them. Whereas symbols and whitespace naturally group these logical meanings into contexts. So, having words group the words results in me trying to assign logical meaning to these separator words, and I also just don't find them as clear in separating contexts. Having nothing in a line or just a "{" is much more distinct from actual code than "begin".
- rectang 8y agoI prefer brackets over 'begin' and 'end' for scope, though scope also needs to be reinforced by indentation. However, I'm fine with function/func/def/proc/sub/method (while averse to fn because of pronunciation) -- because those are all types, not punctuation.
- custos 8y agoI think this has more to do with how our brain processes words written in a phonetic alphabet. When reading words we are familiar with, our brain treats the word as a single symbol linked to meaning (or pronunciation). When we encounter words that we aren't familiar with, the brain has to revert back to "manual mode", sounding it out to see if there is a link to any known meaning. If you use one of the spellings you currently consider bad regularly, it will eventually be recognized as a symbol and treated as such. For instance, reading "knife" shouldn't provoke a negative reaction unless you're not familiar with the word; despite it having a silent K which is just silly.
- st1ck 8y agoWhat's hard in pronouncing "fn"? It's "ef-en". You don't pronounce "PC" as "p'k" or "PR" as "prr", do you?
- uryga 8y agoNoooo, it's "fnn"!