top 50 comments

sorted by: hot top controversial new old
[–] 49 points 1 month ago (3 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 6 child comments
  • [–] 11 points 1 month ago* (1 child)

    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
  • [–] 12 points 1 month 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 2 child comments
  • [–] 9 points 1 month ago (1 child)

    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 2 child comments
  • [–] 36 points 1 month ago (3 children)

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

  • source
  • parent
  • hideshow 5 child comments
  • load more comments (1 reply)
  • [–] 8 points 1 month ago (3 children)

    Although false friends can also be quite annoying.

    What does "false friends" mean?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 9 points 4 weeks 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
  • load more comments (1 reply)
  • [–] 41 points 1 month ago (1 child)

    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 2 child comments
  • [–] 30 points 1 month ago* (2 children)

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

  • source
  • hideshow 4 child comments
  • [–] 5 points 1 month ago* (last edited 1 month 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
  • [–] 21 points 1 month ago (1 child)

    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
  • hideshow 2 child comments
  • [–] 20 points 1 month 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
  • load more comments (2 replies)
    [–] 20 points 1 month ago* (3 children)

    i've seen both. there is german program code with german variable names and german comments. yeah, it sounds about as strange as it is.

    // diese variable beschreibt den luftzug an den messrohren
    var trötflöte = lese_zahl_aus(datenbank);
    

    but it's rare. most people who work in IT in germany will write english variable names and english comments.

  • source
  • hideshow 5 child comments
  • [–] 8 points 1 month ago (1 child)

    In my experience it's more common in industrial (plc) and embedded software. Where people don't have to work in large teams.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 1 month ago (1 child)

    It's super common if it's any sort of open source project because the collaborators can be anywhere and English is a good baseline.

    IIRC one of the big tasks when Star Office became Open Office (later Libre Office) was translating a bunch of the German comments to make the code more accessible.

    I'm sure I've seen some majority french code bases as well. There are certainly academic hypervisors out of China which have comments in Chinese kanji.

  • source
  • parent
  • hideshow 2 child comments
  • load more comments (1 reply)
    [–] 18 points 1 month 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 1 month 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
  • [–] 13 points 4 weeks 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
  • load more comments (1 reply)
    [–] 12 points 1 month ago (4 children)

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

  • source
  • hideshow 4 child comments
  • load more comments (4 replies)
    [–] 11 points 1 month ago* (last edited 4 weeks ago) (1 child)

    Russian here.

    For the most part, it's all English. Not even romanized Russian in variable names, although that happens sometimes. Comments are mostly in Russian, though. Depending on the company and whether it has to deal with countries where Russian isn't as widespread (e: which is not a lot of companies these days), that English can be a little difficult to understand once you start applying English language logic to it as opposed to basically writing Russian poorly translated to English. It's fine if the variables, classes and method names are short and offer little room for stringing words together, but anything complex poses risk of producing something that will be difficult to read without heavy Russian background and developed English skills (at both comprehending and producing).

    However, there is a number of Russian-based programming language. I am fortunate to have never worked with any one of them. One of them is 1C:Enterprise, which is also a sizeable business for automation software and such.

    Here's what it looks like. I can spot a couple of English words there, though. And having learned programming through English and English only, I actually find it more difficult to read, because Russian-native developers still often refer to things in English, even if there's a word for that same thing in Russian - it's just that much part of your programming work.

  • source
  • hideshow 1 child comment
  • load more comments (1 reply)
    [–] 10 points 4 weeks 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
  • load more comments (2 replies)
    [–] 9 points 1 month 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
  • [–] 8 points 1 month 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
  • load more comments (1 reply)
    [–] 8 points 1 month ago*

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

  • source
  • [–] 6 points 1 month 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
  • [–] 6 points 1 month 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
  • [–] 6 points 1 month 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 1 month ago

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

  • source
  • [–] 5 points 1 month 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
  • [–] 5 points 4 weeks 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
  • load more comments (2 replies)
    [–] 5 points 1 month ago

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

    https://hedy.org/

  • source
  • [–] 5 points 1 month 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
  • [–] 4 points 1 month ago (2 children)

    Sadly, in the horrible english language

  • source
  • hideshow 2 child comments
  • load more comments (2 replies)
    [–] 4 points 1 month 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
  • load more comments (2 replies)
    load more comments
    view more: next ›