12 ms·
Seeing a programming language in your native language after working with English ones, you discover that it looks and sounds pretty ridiculous. My belief is tha
by aasasd 7y ago
Seeing a programming language in your native language after working with English ones, you discover that it looks and sounds pretty ridiculous. My belief is that the native language is ingrained on a low level in the brain, so it's decoded ‘in the hardware’ and directly invokes meanings and associations, whereas a second language goes through at least some level of conscious processing. The very same way, I'm physically unable to shut off the brain's frantic search for meaning when I hear some inane song lyrics or advertisement in my native language—which causes suffering whenever I get near television. Meanwhile, I'm completely comfortable reading or hearing total drivel in English until I consciously try to interpret it. Similarly, I can't skim in English as fast as I do in my language.
This all brings me to the thought that native-English speakers probably have a rather different experience with programming languages, since the keywords must constantly invoke deeply ingrained associations but that's in turn modified by regularly seeing and thinking of them in the programming context.
КОНЕЦ ЕСЛИ
- Swizec 7y agoSeeing anything in computers using my native language feels wrong. I think it’s because I learned how to use computers before I learned English well. For example I learned that to print a line in Pascal you use writeln() at 12 or so. It didn’t occur to me until 10+ years later that writeln is shorthand for “write line”. To me it’s just a symbol with no meaning outside that particular context.
- olalonde 7y agoSame here. I still remember feeling pretty dumb the day I realized that "if" and "else" were also English words.
- umanwizard 7y agoI'm a native English speaker, and so the reason for names like "if", "while", etc. were clear to me when learning. On the other hand, your experience learning programming was similar to mine learning to use a Unix-like OS. Although I do know their etymology as a bit of useless trivia, for the most part "cat", "grep", "vi", "diff", "sed", "dd", "df", "tar", and so on are just arbitrary symbols to me.
- tomcam 7y agoThis is irrelevant to your point, but mad props. Your written English is superb-I would absolutely assume you’re a native speaker.
- dooglius 7y agoAs a native-English speaker, when I compare e.g. python's "x and not y" to a more formulaic "x && !y", it really doesn't seem to make much of a difference. I'm curious if you were using a syntax highlighter, that may affect your experience.
- cm2187 7y agoBut it’s easy to forget how concepts you understand so well they feel natural and are burned in your muscle memory are foreign and difficult to others, beginners in particular. A way to measure that is to teach. When you try to explain simple programming concepts, you often realise what millage you have behind you.
- klyrs 7y agoOn the other hand, python gives us 'x is not y' which is equivalent to 'not(x is y)' and not 'x is (not y)'. Which can surprise even native English speakers
- benatkin 7y agoI tend to think of "is not" as an binary operator and my assumptions based on this hold true. I prefer to think of it as entirely separate from "not". I don't know if the compiler rewrites it to not(x is y) behind the scenes.
- FpUser 7y agoCouple of times I saw programs written in Russian versions of Basic and some other, forgot which one. Never mind programming even trying to understand it blew my brains out. Russian being my native language I could never imagine writing software in it. I also have the same feelings about the songs as you just described. So all in all completely agree with you.
- malodyets 7y agoProgramming uses the same words as regular English, but it is a completely different linguistic register, so there is never any conflict. It’s like working in any field with its own jargon — you use the meaning that is relevant to the context. In linguistics this is called the Relevance theory of meaning and interpretion, which explains why we do this contextual interpretation easily and mostly without thinking about it. I am a native English speaker and former ESL teacher with a masters degree in applied linguistics, as well as veteran developer.
- tuesdayrain 7y ago> Programming uses the same words as regular English, but it is a completely different linguistic register, so there is never any conflict. That's debatable. It's impossible for me to say "if" in any context without thinking about programming now. I can't help it.
- malodyets 7y agoThat's a good point: "never any conflict" describes the final state rather than the growth process. When I was a younger programmer (as in, during the first few years), I discovered that assuming boolean / formal logic meanings for {if, or, else, and} in communication with my spouse (art + sales, and very smart, though not a programmer or trained in symbolic logic) resulted in, shall we say ... miscommunication. So I had some unintended help in building the separate registers of meaning / communication. :-) Building separate meaning registers for communication does take some time.
- mauvehaus 7y agoMany years ago, in elementary/primary school I went to a computer camp when I was living in Belgium. We used Logo in French on Macs. I don't remember much, but the keyword for random was 'hazard'. My experience was actually not bad; I didn't have any trouble associating the words with the abstract concepts involved in sending the turtle around the screen. I was doing fairly simplistic stuff though, I'll concede. I wonder if instead of decoding words when programming "in the hardware", we form new associations for the (relatively) limited set of keywords languages provide? I mean, in most code, the words provided by the language make up maybe 5%-10% of the code. The names we give things seem much more important. To your point of not being able to tune out inane heard content in my native language I agree. I'm not proficient enough in any others to have tried it, sadly.
- komali2 7y agoInteresting, I hadn't thought about"random" much, but hazard kinda makes sense even in English. Like "allow me to hazard a guess."
- umanwizard 7y agohasard is in fact the French word for random chance.
- jdminhbg 7y agoHazard in English comes from that, via the sense of gambling: https://www.etymonline.com/word/hazard https://www.etymonline.com/word/hazard
- mdup 7y agoProbably it was the false friend "hasard" which, in French, means: chance, randomness.
- mauvehaus 7y agoIt might well have been "hasard". It's been, uh, 20-something years? Thanks for the French lesson!
- pasabagi 7y agoI remember the english associations of programming words being pretty confusing, to be honest. Generic, for instance, means a standard or non-descript object. Abstract, for another, means something without concrete existence. Static means something that doesn't move, or electrostatic charge. Void is a pretty archaic/unusual word for a space. All these things are a little bit like how they are used in programming languages, but I imagined it would have been easier for me if I'd started out knowing I don't know, rather than trying to figure out how stillness, motion, concrete and abstract, relate to functions. As english, I think programming language mostly comes somewhere between willful butchery and deep elegance. Some words are like a weird riff off newspeak (grep, troff, etc), some words are obvious cultural artefacts of people trying to show how pragmatic and unpretentious they are (Factory, Object, Bash, etc), while others are trying to show some kind of inculcation, like maths terms, or stuff from electronics, but all of it has this great feeling of cultural-technical history. Some are these weird mysteries, like, why did early teletype use allcaps? Isn't lower case more legible? Did the entire early history of programming get written in shouts because the earliest users were military guys that liked shouting?
- jacobolus 7y agoThese are all somewhat sloppy versions of the definitions of these words in common use. “Generic”, “general”, “generalize” and “specific”, “special”, “specify”, etc. all come from the relation between “species” and “genus”, where genus is a larger category containing a species. The use of these in a programming context is not too far removed from the same usage in non-technical conversation or in (non-biology) technical contexts like philosophy or mathematics. Similarly for “abstract” (meaning idealized or separated from particular cases) and “concrete”, which have been used in logic/philosophy for a long time. Static means unchanging. Void means “empty”, or in a legal context invalid. > why did early teletype use allcaps Because it replaced humans listening to Morse code, which has no lower case. Also, the first primitive keyboards from the mid 19th century used something like piano keys, which take up a ton of space, and even still up through the 1960s data transmission was expensive so people wanted to save every possible bit. You can read about https://en.wikipedia.org/wiki/Teleprinter https://en.wikipedia.org/wiki/Teleprinter, https://en.wikipedia.org/wiki/Telex https://en.wikipedia.org/wiki/Telex, https://en.wikipedia.org/wiki/Teletype_Model_33 https://en.wikipedia.org/wiki/Teletype_Model_33, etc.
- jmull 7y ago> the thought that native-English speakers probably have a rather different experience with programming languages I know what you mean, but I think you get over it quickly. There's a switch in mental context as you start to code and the fact that certain keywords mean something in your native language just doesn't matter.
- dmitriid 7y agoNote: I'm not a native speaker. English doesn't have genders and cases [1] so grammatical constructs such as if/then/else, case of, unless etc. suffer much less than when you have gender and case. Oh, god, and plural forms of those. For a Russian speaker using a PL in Russian is constant pain as your brain tries to add all the missing parts to the words: if(count(letters<must have a plural ending, accusative case>) > limit<must have singular ending, genitive case>){ words.append(word<must have singular ending, accusative case>) } etc. [1] Well, it does have those, but not in the same capacity as other languages.
- pessimizer 7y agohttps://en.wikipedia.org/wiki/Analytic_language https://en.wikipedia.org/wiki/Analytic_language https://en.wikipedia.org/wiki/Isolating_language https://en.wikipedia.org/wiki/Isolating_language I buy your thought, and your prediction means that Mandarin speakers might have an easier time with a Mandarin programming language than a latin or slavic language speaker would have with a latin- or slavic-based programming language.
- latte 7y agoInterestingly, Perligata (a module that allows writing Perl programs in Latin) attempts to use case endings in variable names to denote their roles in expressions: http://users.monash.edu/~damian/papers/HTML/Perligata.html http://users.monash.edu/~damian/papers/HTML/Perligata.html
- deleted 7y ago[deleted]
- pessimizer 7y ago"That Japanese Man Yuta" on youtube mentioned on one of his videos that Japanese-y/Chinese-y roman alphabet fonts completely break his brain when he sees them, and he can't see them as English, just horrible nonsense.
- tanilama 7y agoWell can confirm. I prefer pure English than romanization pinyin ANY time. Pinyin for Chinese isn't self contained, you have to guess what really means. If I saw pinyin code, unless it is absolutely necessary, like not ambiguous and no proper English translation, it won't pass CR if I am reviewing it.
- TheGRS 7y agoI can't imagine programming with ESL and having to deal with code where some english speaker thought they were super clever and named various classes and variables after things that are super referential or punny. I see a lot of classes at my current job named after 80s TV shows or inside jokes. Maybe having ESL would make that type of thing easier to deal with actually since it drives me up the wall.
- kfrzcode 7y agoClasses named for inside jokes are an example of horrible programming practices which should never get past code review
- TheGRS 7y agoWell that would assume such practices were around when that code was created.
- thaumasiotes 7y agoProgramming as an English speaker in code mainly written by foreigners is strange too. Misspelling words doesn't matter to them. Having several classes using the same name template ("GhostFactory" / "GhoulFactory" / "ZombieFactory") is fine... and it's also fine if one of them happens to be spelled differently ("PumpkinFatcory"). They're just arbitrary letter sequences that you type via autocomplete.
- marc_abonce 7y agoI remember having to look up what foobar meant back when I started learning programming. "What do you mean it doesn't mean anything? It has to mean something, otherwise what does this code do!?"
- needle0 7y agoOh boy. Phabricator was _terrible_ with this. Native English speakers thought ridiculous button UI names like "Clowncopterize" were so funny. Fricking no.
- russellbeattie 7y agoI think you're completely right, though I see from the comments that others have different experiences. But to me, the "language" of programming can drive me crazy. Currently in JavaScript the various forms of "var" and "for" makes me cringe involuntarily when I'm mentally parsing code. "for let foo of bars"?? Gah!
- Iv 7y agoFrench here, that's my experience as well. I want to emphasize that the huge majority of the non-english native programmers I know are pretty opposed to translating programming languages. However, my experience teaching Japaneses has been that what is crucial if you want to make a programming language accessible to different nationalities is to translate error messages correctly. Learning IF, FOR, RETURN is not hard. There are 20 words max to learn. You could learn that many kanjis in one day if you needed. However, when you are not good at English, understanding "Access error: Array index is out of bounds" requires another level of understanding and vocabulary.
- Falling3 7y agoThat's a great point. And that combined with the cryptic nature of many error messages could easily make debugging a nightmare for people who don't speak English...
- qiqitori 7y agoI speak English natively and Japanese fluently, and in my experience error messages (and other messages) that were translated into Japanese are often of rather questionable quality. But you're right, people who don't speak English very well (and aren't too experienced) often don't even notice non-fatal errors. I still think that showing translated error messages isn't very good. 1) Messages are often translated poorly (I won't go into detail here) and sometimes don't even make sense 2) Googling for a translated message won't turn up (m)any results 3) Poor translations might eventually be fixed, but IMO error messages should be considered part of the API I think the best recourse it to display the original message _and_ a translated message, or _maybe_ an (international) error code and a translated message. The great thing about the Japanese language is that with kanji you can make messages extremely concise, e.g.: "Access error: Array index is out of bounds" --> "エラー: 境界外読取/書込" which would make it acceptable IMO to display messages side-by-side. (It's unfortunate that "error" became "エラー" in Japanese)
- needle0 7y agoI don't quite get the reasoning where you talk about the quality of Japanese error messages, then talk about making it even harder to decipher. Sure you can compress meaning into short strings of kanji, but readability definitely takes a hit when you do that, even to a native speaker. It's not like we're displaying this on paper; there could be better ways to show errors to non-English speakers, eg. more descriptive messages like "エラー: 配列の範囲外へアクセスしています" can be shown by default and perhaps the original error message can show up when you mouseover on it or whatever. The "searchability on Stack Overflow" argument may vary depending on language, by the way - Japanese is one of the languages where technical information written in the language is fairly abundant (considering JP natives tend to avoid writing in English themselves and rather stick to writing Japanese), but this may not be true for other languages. Another factor is how likely the speaker of the language is to be English-bilingual.
- Waterluvian 7y agoNot saying you're wrong about the hardware analogy. But I think it's no different than learning to drive or play a sport. Eventually it just becomes automatic.
- aasasd 7y agoBeen reading and writing English almost exclusively, every day, for the past ~six years, out of ~twenty years of learning it—still waiting for it to become automatic. Childhood does things to your brain. And language recognition doesn't work the same way as motor skills.
- gdy 7y ago"Seeing a programming language in your native language after working with English ones" That's probably the reason. I'd bet after working for the same time with 1C, you (or I, for that matter) would completely ignore keywords and names being in the Russian language. You'd die from the boredom much earlier though, but that's a different matter) Btw, END IF is as weird as КОНЕЦ ЕСЛИ.
- TallGuyShort 7y agoOne thing that's felt weird to me is Mockito & friends, and some badly-implemented builder APIs. They're trying to read like natural language, but when the order matters and it's unclear what the order is really supposed to be, the natural language metaphor breaks down and you're better off having it made clear what 'parts of speech' each call is and what the required order is. I would imagine stuff like that makes a language harder to translate because instead of words, you now have an ordering that might not work. I was surprised to see so few languages on that list where it was essentially a direct keyword translation. There's very little English in C-like languages until you actually start naming everything in the libraries.
- watersb 7y agoNative English speaker, very interested because I find my brain caught when I hear background noise in other (human) languages. These days, I am hearing more Russian and Dutch. Along with Spanish, German and Swedish, impossible for me to speak but hovering at the edge of understanding, my brain cannot ignore when I hear them. Programming languages, after 40 years of it I'm not aware of any particular effect of the English words. With "Wolfram Language", for instance, I think it would help if the words were based on Esperanto or Swahili, as I can never anticipate the magic invocations needed. Language is weird. https://en.m.wikipedia.org/wiki/Wolfram_Language https://en.m.wikipedia.org/wiki/Wolfram_Language