all 74 comments

sorted by: hot top controversial new old
[–] 44 points 3 months ago (22 children)

Preferably in English. Nothing is worse than reading code with a mixture of languages. Although false friends can also be quite annoying.

  • source
  • hideshow 22 child comments
  • [–] 11 points 3 months ago* (2 children)

    They are annoying even if you write in English. One such example is "library".

    In Spanish, there are two words: "biblioteca" and "librería".

    Library = biblioteca

    Book shop = librería

    When speaking about programming libraries, everyone says "librería" because it's just easier to translate that way. But it just feels wrong every time.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 11 points 3 months ago (1 child)

    A funny one is Pizza Hut. "Hut" means "hat" in German. And since the Pizza Hut logo kind of looks like a hat many Germans believe that they gave it a German name in Germany. So they pronounce it in a German way and if they were to talk to an English speaker they might say Pizza Hat in an effort to translate.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 9 points 3 months ago (5 children)

    What should you do if you inherit a project where they are already mixing languages because they just copy pasted from tutorials?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 36 points 3 months ago (4 children)

    Exacerbate the problem by using your own style that's not been used before.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 7 points 3 months ago
    int main(){
      cout << "It's more compact this way and yeah I'll die on this hill";
    Return 0;}
    
    //see you even get to end lines in devious winky smilies who doesn't love that
    
  • source
  • parent
  • [–] 8 points 3 months ago (12 children)

    Although false friends can also be quite annoying.

    What does "false friends" mean?

  • source
  • parent
  • hideshow 12 child comments
  • [–] 15 points 3 months ago (9 children)

    In a nutshell, words that look the same / similar but with different meanings in their respective languages, making it pretty confusing.

  • source
  • parent
  • hideshow 9 child comments
  • [–] 3 points 3 months ago (8 children)

    Like homonyms or something different?

  • source
  • parent
  • hideshow 8 child comments
  • [–] 20 points 3 months ago* (last edited 3 months ago) (6 children)

    False friends usually aren't homonyms since the word comes from different languages.

    To give an example: an English speaker might look at "rare auto" (Dutch) and might translate it to "rare car". But "rare" means "weird" in Dutch. So rare is a false friend in this case

    Edit: an example of a false friend that is a homonym is "horloge" in French and Dutch. They are pronounced and written the same, but it means "clock" in French but "(wrist)watch" in Dutch

    Edit 2: just a writing mistake :)

  • source
  • parent
  • hideshow 6 child comments
  • [–] 7 points 3 months ago (3 children)

    The Dutch word for "who" - wie - is the same as as the German word for "how".

    Nastiest false friend I know because it's a very common use word in both.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 3 points 3 months ago (2 children)

    The more you know! German as a Dutch speaker has always been a bit of a special language (I'm assuming the other way around as well).Like some words are similar (like gevonden/gefunden). Which makes sense, but then some German composite words sound funny. Because we do understand what a bahn (baan) and hof (also hof) mean. But we call a bahnhof a station.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 months ago (1 child)

    I first learned Dutch as a non-native speaker (I'm Portuguese and lived in The Netherlands for almost a decade) and only after that did I start learning German, and knowing Dutch is both helpful for it (due to things live verb order in the sentence and many, many words being very similar) but also problematic because of the false friends and also because whilst speaking one language words from the other often pop-up instead.

    I've picked up Spanish because of speaking Portuguese as my native language, but unlike with that language pair were I always know for sure if a word is on one language or the other (probably because Portuguese is my native language), with the Dutch - German language pair that's not at all the case and they seem to interfere with each other a lot in my mind.

    Even though I learned Dutch first and to a much higher level, I don't really get a feeling of strangeness with German probably because they're both strange to me.

    That said, I do get that strangeness with Spanish, were there are also some weird unexpected things vs Portuguese (like going along a sentence which is pretty much the same thing with a different accent but there's a single word that's totally different), though not in composite words since neither language has that.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 3 months ago*

    Yeah the strangeness I do have with German as a native Dutch speaker. But that'd made sense since I'd obviously know when a word isn't Dutch, like you're alluding to.

    Though I'm assuming it's not to the same extent you have with Spanish and Portuguese, since that description fits more with what I have with Afrikaans.

    But I only learned some basic German in high school for an hour per week so I definitely don't have the same experience with it that you probaby do. Neither do I have any push to use or learn it, compared to French where there was.

    Still really cool to hear the perspective from someone like you!

  • source
  • parent
  • [–] 4 points 3 months ago*

    There are many false friends between French and English. Off the top of my head:


    • EN: eventually (FR: un jour)
    • FR: éventuellement (EN: possibly)

    • EN: actually (FR: en fait)
    • FR: actuellement (EN: currently)

    "Enregistrer" in French both means to record or register something and to save a file, but you can't use the English word "register" for both.

    "Défense" in French both means defense and prohibited, but you can't use the English "defense" for both.

  • source
  • parent
  • [–] 8 points 3 months ago*

    As others stated, it is when two words in different languages are similar phonetically/graphically.

    They are called false friends because they seem familiar and you expect to mean the same as with other words that are pronounced similarly in two languages and mean the same. False friends not just mean different things but they sometimes can change the phrase in a bad way.

    Note: The following examples are with Spanish from Spain, they might be different in other Spanish speaking countries.

    Alice and Bob discussed about having children
    Alicia y Bob discutieron sobre tener niños

    In English Alice and Bob had a conversation, in Spanish they had an argument.

    Bob is a sensible guy
    Bob es un tipo sensible

    Bob is a person who acts with prudence and thinks carefully in English, in Spanish he is a guy who is easily affected by feelings.

    I had an English teacher who told the same anecdote about false friends and her sister. She was in UK and the batteries for the remote died, so she went to a convenience store and asked if they had them.

    The thing is that in Spanish we only use battery (batería) for the ones that are not meant to be replaced regularly, like the car battery, the laptop battery, etc. The replaceable ones (even the rechargeable that take the same shape), are called pilas. So in the anecdote, the sister told the woman at the store very confidently “Do you have piles?” (haemorrhoids, for the ones who doesn’t know).

    I don’t know how real the anecdote was, but it fulfilled its purpose to make us aware of these situations.

  • source
  • parent
  • [–] 3 points 3 months ago

    Words in two different languages that sound the same but don't have the same meaning. Real example from my last work: The German word for "topic" is "Thema". So our programmers called the database field and variables "theme".

  • source
  • parent
  • [–] 20 points 3 months ago

    I wrote variable names and comments in Spanish when I started as my English level back then was very low.

    Once my English improved and started to use English documentation and tutorials I just switched to write in English.

    In my previous job I worked at software consultancy, I had coworkers who wrote code in Spanish but it wasn’t the norm.

    Currently I work for an international company, the team is Spanish but we have to write everything in English as it can be shared with teams in other countries and audited by international organisations.

    When AI tools were allowed, a lot of people use them in Spanish, it generates code with comments in Spanish. I had to reject a lot of PRs from the same guys over an over because everything must be in English.

  • source
  • [–] 20 points 3 months ago* (2 children)

    The real deal isn't the language barrier but the keyboard layout. Most special characters usually used for coding are just perfectly at hand when using the US layout.

    At one point i started buying US keyboards set with the US-int layout, which i find easier to use than ES and latam.

  • source
  • hideshow 2 child comments
  • [–] 3 points 3 months ago (1 child)

    This, I switched my keyboards to US layout, and since I learned a bit touch typing , having the laptop with ISO es_ES is not of a big deal having the symbols not matching the input layout.

    For Mac it is a bit shittier, I don’t get used to the way to introduce the Ñ with its US int.

    On Linux, I didn’t managed to set the US int, only US so I don’t have either Ñ nor the possibility to add accents. It might be easy but I didn’t look for it either.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 39 points 3 months ago (4 children)

    It depends honestly.

    Key words like If, Match, Else, From, This ,etc will be in English, but variable names can be in any Unicode language as the var name gets converted to machine code after compilation.

  • source
  • hideshow 4 child comments
  • [–] 17 points 3 months ago

    Most popular programming languages have English-language keywords and that can't be changed, so we certainly have to learn those.

    How we learn to name symbols (variable/function names), that obviously depends on the programming course. But most real-world code has most symbols written in English with the possible exception of business-specific terminology that the business doesn't use in English. The same is true of comments.

  • source
  • [–] 14 points 3 months ago

    As somebody with a friend who speaks Chinese as their first language, I know she often uses non-English file names, variable names, etc.

    It's still standard Python and C++ though (and excellent code at that!), nothing esoteric.

  • source
  • [–] 28 points 3 months ago* (2 children)

    Also air traffic control and commercial aviation radio communication are in English, worldwide.

  • source
  • hideshow 2 child comments
  • [–] 5 points 3 months ago* (last edited 3 months ago)

    For handling international traffic under ICAO rules, ATC is indeed supposed to be done in English.

    But if we take a look at some of the terminology in aviation, the French words cannot be ignored. Mayday and pan-pan are from the French venez m'aider and panne.

    When radio silence is required, a station might command "SEE-LONCE" but this comes from the French word for silence. Though I think this is a rarity in aviation.

    And then outside of aviation radio, the French left their mark on aircraft parts names: fuselage, empennage, aileron.

  • source
  • parent
  • [–] 12 points 3 months ago (1 child)

    Never even heard of a programming language in Danish. Even the ones invented by danes are in english.

  • source
  • hideshow 1 child comment
  • [–] 12 points 3 months ago (4 children)

    Everyone should code in Armenian. Why? Because it would be funny.

  • source
  • hideshow 4 child comments
  • [–] 3 points 3 months ago (3 children)

    Western Armenian or Eastern Armenian?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 9 points 3 months ago (2 children)

    much easier to look for guidance for coding in english instead of my native language, syntax makes more sense too. Though personally i would wish more stuff was properly translated into finnish instead of english slowly gnawing at it.

  • source
  • hideshow 2 child comments
  • [–] 8 points 3 months ago (1 child)

    I'm a native Spanish speaker, it depends on the language and the person.

    Spanish has very few diacritics, so it's quite understandable in ASCII (áéíóúüñ). But I guess it would be a lot harder in other languages like Czech or Vietnamese.

    When I program for myself or in public repos, I tend to code everything in English, but when I have to do projects with classmates at my university, I usually do it in Spanish because they are not great at English.

  • source
  • hideshow 1 child comment
  • [–] 8 points 3 months ago*

    We always code in English at work. Using our native language for programming is generally frowned upon.

  • source
  • [–] 6 points 3 months ago

    I quit my degree in computer science in 2018 after studying for two years, but I remember that it was a big focus on using norwegian for variable names.

  • source
  • [–] 6 points 3 months ago

    No chance, hungarian has non-ascii characters(ő and ű), digraphs(cs, dz, gy, ly, ny, sz, ty, zs) and a trigraph(dzs). Also generally how the language works is pretty disadvantegous to coding and tech. English has maaaany useful one syllable imperatives(get, click, etc), even with doors irl its often in english whether you pull or push cause hungarian doesnt really have these completely stateless verbs. One thing that did exist back in the day was people coding in german but i only know a single person who still does this.

  • source
  • [–] 5 points 3 months ago

    A mix. In uni we learned algorithms in pseudo code and that was always in native language. Actual coding was typically English, but older professors often did it in their language.

  • source
  • [–] 5 points 3 months ago

    Hedy is a new programming language designed for pedagogy that can be localized to different languages.

    https://hedy.org/

  • source
  • [–] 5 points 3 months ago (2 children)

    Coding is all done in the language of the code... if, and, or, for, include, except, etc. It's not exactly a vast array of words you need to know to be able to code.

    Also, I can only speak for Sweden, but I started learning english in third grade. These days they start in kindergarten. Basic stuff, days of the week, 1 through 10. But still.

  • source
  • hideshow 2 child comments
  • [–] 1 point 3 months ago (1 child)

    Are you coding in basic? Look at the std libs for any modern language and there is a plethora of words to learn to program effectively.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 3 months ago

    The words you need to "know" to code, compared to what you need to know to communicate effectively, are but a promille.

    He also specifically said "learn to code". Beginners often struggle with the concept of a loop, let alone trying to import a bunch of libraries

  • source
  • parent
  • [–] 9 points 3 months ago

    Online: everything in English for me, except for some explanations sometimes but that's just at random as I'm a hobbyist/amateur.

    Offline (a course I did): explanations in Portuguese (Brazil), we learned Portugol (programming language that uses Portuguese keywords) as an introduction then switched to C.

  • source
  • [–] 4 points 3 months ago* (2 children)

    You'll be surprised to learn that WinDEV can be programmed in a ton of diferent languages. I mean the instruction set and all. It feels dirty to read code written in french, and that's my mother tongue. What a shit show. Only 'logo' for kids in primary school makes sense to have in their native language. EDIT : mostly french or English actually https://pcsoft.fr/wlangage.htm

  • source
  • hideshow 2 child comments
  • [–] 2 points 3 months ago (1 child)

    Came here exactly for this comment...

    Windev is probably one of the worst possible programming language out there, look at this !

    This is from their official documentation

    // Récupère le CA du mois en cours
    TotalCA est un monétaire = CalculCAMoisEnCours()
    
    // Si le CA dépasse l'objectif
    SI TotalCA >= 1 250 000 ALORS
      LIB_Objectif= "Objectif dépassé !"
      LIB_Objectif.Couleur= VertFoncé
    SINON
      // Si le CA n'atteint pas l'objectif minimum attendu
      SI TotalCA <= 200 000 ALORS
        LIB_Objectif= "Objectif non atteint"
        LIB_Objectif.Couleur= RougeClair
      FIN
    FIN
    
  • source
  • parent
  • hideshow 1 child comment
  • [–] 4 points 3 months ago*

    I teach my students to just code in English from the start. Not all languages/compilers/linkers/whatever handles the Danish characters 'æ', 'ø', and 'å' all that predictably, most companies will require you to use English for international collaboration, and besides most documentation is in English anyway. Last reason is why I urge my students to just use English versions when available. Some FLOSS translations are crap, and you can't just copy paste an error into askjeeves and get an answer.

    The only thing that has to be in Danish is Excel automation, because for some bizarre reason Microsoft translated all some of the functions. I say some because I've seen functions in English that just wasn't available in Danish Excel.

  • source
  • [–] 6 points 3 months ago

    About every programming language is based on English. Names for functions, objects, variables are based on personal, project, or company preferences. In reality you'll find these only in two languages as far as I've seen in the last decades: either English or Chinese. I've seen German and, sadly, French, but they are outliers.

  • source
  • [–] 3 points 3 months ago*

    Only in the very beginning people use anything besides english

  • source
  • [–] 5 points 3 months ago

    I learned English before learning Programming, but there are localized programming languages targetting learning like Portugol https://pt.wikipedia.org/wiki/Portugol

  • source
  • [–] 4 points 3 months ago (2 children)

    Sadly, in the horrible english language

  • source
  • hideshow 2 child comments
  • [–] 2 points 3 months ago (1 child)

    I don't begrudge peoples difficulties with English. It has some positives like not needing gendered conjugation for objects and a fairly wide cultural exposure. However it freely steals words from other languages making it a bit of a mongrel. Also the spelling and pronunciation is entirely non-regular so the usual answer to people looking for rules to work these things out is "just know".

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 3 months ago*

    I don’t begrudge peoples difficulties with English

    it has nice things and bad things (is horrible constructed and very incontinuos in its pronunciation), like almost every natural language.

  • source
  • parent
  • [–] 2 points 3 months ago*

    Well we learn to code in the programming language that the teacher choses, not in any natural language at all, so neither English nor our native languages.

    But all significant programming languages that I know do have reserved control words that are taken from English. Maybe that is the direction of your question?

    Then no, mostly we don't use specifically crafted or preprocessed programming languages just to have control words recognizable as words in our native languages. We just learn the English-based control words as features of the programming language, if we don't already recognize them.

    As for the variable names and natural language comments embedded in the code, that we create, that varies. I'd say as soon as interlingual collaboration or code sharing is a possibility, people will go for English in my experience. And I suspect that people who have gone for English before tend to stick to English even in their private use.

    This is also related to learning materials, documentation of language features and libraries being available to the largest degree in English.

    I perceive it as easier to stick to English, rather than to code switch between natural language while I program.

  • source
  • [–] 2 points 3 months ago

    There have been some interesting attempts to translate languages, but generally at most you would get phoneatically local names using English characters for functions and variables, etc.

  • source
  • [–] 2 points 3 months ago

    I have no clue but at the very least, a programmer names their own variables and, barring any special characters, they could be named in any language.

  • source
  • [–] 1 point 3 months ago

    i think it depends, for me at least, mostly being self taught, english entirely because I just think in english, search in english, speak in english to myself so much

  • source
  • [–] 1 point 3 months ago

    The only things that tend to be in another language in code are variables and strings, from my experience.

  • source
  • [–] 1 point 3 months ago

    I learned to code before I learned proper English as a child.

    However, many educators insist of forcing students to first learn Hungarian pseudocode (not Hungarian notation) stuff first, I specifically was forced to learn Hungarian pseudocode SQL, because our teacher thought the future of programming will be natural language programming (she was a mediocre mathematician). Problems with it include:

    • Hungarian is very antithetical to be used as keywords in a programming language, mainly by substituting affixes with different words, or keeping the affixes in certain ways.
    • Students who already know English or actual coding are confused by it.
    • Natural language programming is quite bad. Nothing is gained by throwing out programming symbols in favor of natural language. In fact, things are being lost, and the main advocates of NLP are just out-of-touch techbros, who think creation is about having a cool idea.
    • Time that could been spent learning other things are wasted on it.
  • source