• reksas@sopuli.xyz
    link
    fedilink
    arrow-up
    10
    ·
    4 days ago

    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.

    • GreenBeard@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      4 days ago

      That’s probably fair, but I would also worry that anything coded in Finnish would be trying to find a way to kill me for not respecting its personal space.

  • Muffi@programming.dev
    link
    fedilink
    arrow-up
    10
    ·
    4 days ago

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

  • melsaskca@lemmy.ca
    link
    fedilink
    arrow-up
    2
    ·
    3 days 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.

  • Björn@swg-empire.de
    link
    fedilink
    arrow-up
    25
    ·
    5 days ago

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

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      edit-2
      4 days ago

      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.

      • Björn@swg-empire.de
        link
        fedilink
        arrow-up
        7
        ·
        4 days ago

        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.

    • Skullgrid@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      5 days ago

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

        • loie@lemmy.world
          link
          fedilink
          arrow-up
          4
          ·
          5 days 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
          
        • cecilkorik@lemmy.ca
          link
          fedilink
          English
          arrow-up
          2
          ·
          5 days ago

          The only solution to having too many standards is always to add another new standard. /xkcd

    • treadful@lemmy.zip
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 days ago

      Although false friends can also be quite annoying.

      What does “false friends” mean?

      • ILikeTraaaains@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        4 days 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.

      • sbeak@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        5
        ·
        5 days ago

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

          • Lemmert@reddthat.com
            link
            fedilink
            arrow-up
            6
            ·
            edit-2
            4 days ago

            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 :)

            • Aceticon@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              6
              ·
              4 days ago

              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.

              • Lemmert@reddthat.com
                link
                fedilink
                arrow-up
                2
                ·
                4 days ago

                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.

                • Aceticon@lemmy.dbzer0.com
                  link
                  fedilink
                  English
                  arrow-up
                  2
                  ·
                  4 days ago

                  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.

            • Whats_your_reasoning@lemmy.world
              link
              fedilink
              arrow-up
              2
              ·
              4 days ago

              That’s cool about “rare” in Dutch. It’s the same in Spanish. “Qué raro” means “How weird.” So that’s a false friend for English, but an accurate one between Spanish and Dutch!

          • Danquebec@sh.itjust.works
            link
            fedilink
            arrow-up
            3
            ·
            edit-2
            4 days 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.

      • Björn@swg-empire.de
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        4 days 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”.

  • ILikeTraaaains@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    4 days 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.

    • HM King Charles III DG FD@feddit.uk
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 days ago

      I use British English in variables for the word “colour”. It’s actually kind of useful because I can tell when it’s my own variable and when I’m interacting with something else.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    21
    ·
    5 days ago

    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.

  • yesman@lemmy.world
    link
    fedilink
    arrow-up
    17
    arrow-down
    1
    ·
    edit-2
    5 days ago

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

    • litchralee@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      5 days 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.

  • noobdoomguy8658@feddit.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    3 days ago

    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.

  • furry toaster@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days 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

  • ZILtoid1991@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    3 days 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.
  • Atomic@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    4 days ago

    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.

      • Atomic@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        3 days 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

  • Kazumara@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    4 days 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.

  • gandalf_der_13te@feddit.org
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    5 days ago

    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.

    • Alex@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      5 days ago

      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.

        • Alex@lemmy.ml
          link
          fedilink
          arrow-up
          0
          ·
          4 days ago

          Thanks. Are they related? I don’t understand any Asian languages myself but I do recognise difference in for example the Korean symbols and Japanese ones. But Japanese and Chinese ideograms look very similar to my ignorant eyes.

          • Kazumara@discuss.tchncs.de
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            4 days ago

            Yes they are very related.

            Japanese, Korean and Vietnamese loaned the symbols from China when they began writing their languages. However Japanese uses two moraic writing systems in addition (Hiragana and Katakana), Korean has later switched to a syllabic one (Hangul), and Vietnamese switched to a latin derived alphabet. Those are probably what you recognize as distinct.

            Where and when they use or used Chinese symbols the meanings per symbol are or were not consistent in the languages, as separate drifting of meaning and reforms of the writing system occured over a long period.

            The symbols are called 漢字 in traditional Chinese and 汉字 in simplified Chinese, the are called 漢字 in Japanese, it used to also be 漢字 in Korean, now in Hangul it is 한자, in Vietnamese it was 漢字 and is now Chữ Hán or Hán tự.

            As you can see they used the Chinese name for the Chinese ideograms. But they all say it a little differently. Hànzì in Mandarin, Kanji in Japanese, Hanja in Korean, Chữ Hán or Hán tự in Vietnamese. But it all means “Han” “characters”, with “Han” referring to the Han dynasty of Chinese rulers here.

            I think Japanese is the only language who loaned them and is still significantly using them. Only texts for children or learners would typically be written fully in Hiragana and Katakana, normal daily written language will have most concepts represented by Kanji, modern loanwords and foreign names in Katakana, and Hiragana for particles and some verbal endings etc for inflection.

          • Danquebec@sh.itjust.works
            link
            fedilink
            arrow-up
            2
            ·
            edit-2
            23 hours ago

            The Chinese invented the Chinese ideograms.

            The script-less Japanese adopted them, but they didn’t fit their language well on their own. So, they created hiragana (a syllabary) to be able to properly write their own language. A Japanese sentence typically comprises Chinese ideograms and hiragana.

            Later, both the People’s Republic of China and Japan simplified their ideograms, but not in the same way, and the Chinese went much further.

            So, now, Taiwan, Hong Kong and Macao use the traditional hanzi.

            Japan uses their kanji, somewhat simplified.

            And the PRC, Malaysia and Singapore use the simplified hanzi.

            South Korea uses hanja which is virtually the same as traditional hanzi. And North Korea completely abandonned the Chinese ideograms.

    • blackbeans@lemmy.zip
      link
      fedilink
      arrow-up
      1
      ·
      5 days ago

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

  • Siegfried@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    5 days ago

    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.

    • ILikeTraaaains@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      4 days ago

      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.

      • 123@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        3 days ago

        Not sure if thus is just bazzite with KDE/wayland, but i found today if i hold n i get the option for ñ/ń. Hold i and you get ì/í/etc. Similar to mobile keyboards on phones.

  • buran@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    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.