I ask because sometimes I feel very silly when writing clumsily in English and even sillier when I have to look up how to spell a particular word.

I want to know if I’m the only idiot that it happens to or if on the contrary it’s something generalized.

(Mi idioma es el Español, por cierto)

  • BlessedDog@lemmy.world
    link
    fedilink
    arrow-up
    37
    ·
    13 days ago

    This is interesting, I’ve thought of this before.

    I write comments and commit messages in English, mainly because programming is collaborative. I am a member of a local association of young programmers, and in the community (discord, meetups) we speak Finnish, however all interactions on github are in English, so are function and variable names, as well as comments. If someone makes a PR and it’s reviewed, it happens in English, even if both parties are native Finns.

  • i_stole_ur_taco@lemmy.ca
    link
    fedilink
    arrow-up
    30
    arrow-down
    1
    ·
    13 days ago

    This is expected Canadian source code:

    // cache the colour in case we need it later for the neighbour
    color = fetchColor();
    neighbor.color = color;
    

    When language keywords are all written in American English it’s foolish to try to author your code in a different language. But comments are fair game.

  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    arrow-up
    24
    ·
    12 days ago

    German here.

    I am not writing anything in my code in German. All of my code, my variables, my default texts, my comments, my documentation, my UI strings, etc. are always and explicitly in English.

    The only German I use, is when I provide translations for UI or documentation.

  • reesilva@bolha.forum
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    13 days ago

    I write in the official communication language of the company, because that’s guaranteed that everyone that will be hired will have to speak that language. I came from Brazil and it is a massive country and most of the population doesn’t have access to good English courses, so I like to go with the easiest solution for all future joiners

    • Daemon Silverstein@thelemmy.club
      link
      fedilink
      arrow-up
      5
      ·
      13 days ago

      I’m not sure if it’s a São Paulo (as in the state, not the city) thing, but I had English classes when I was in public high school (“ensino médio”). They weren’t the best English courses out there (i.e. they weren’t comparable to Brazilian schools that specialize in English courses such as CCAA, CNA, Fisk and Wizard), but they offered a good start for those who had no prior knowledge of the English language. It’s also worth mentioning that people who work in IT have more potential to come into contact with communication in English because a lot of documentation is in English. But I totally agree with you that most of the population does not have quality access to English courses.

  • kubok@fedia.io
    link
    fedilink
    arrow-up
    16
    ·
    12 days ago

    Always English. I live in a country where developers are hard to find. Chances are that I will get colleagues who do not speak my native language (yet).

  • folkrav@lemmy.ca
    link
    fedilink
    arrow-up
    14
    ·
    13 days ago

    I’m French speaking, but I write all code and comments in English, all the time. The code is basically English keywords and symbols, the mix and match just looks weird, makes it harder to share snippets for help or debugging with non-speakers. Especially in code that will be read by other people after the fact, it also tends to make it less likely that this person will be able to understand it - maybe they’ll hire an offshore team or some guy who just immigrated…

  • xmunk@sh.itjust.works
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    13 days ago

    Bold of you to assume I write comments.

    (Yes, they’re usually in my native tongue. I think it’s better for you to express your comment clearly then stumble through a different language to make it accessible… chances are you’ll be reading that comment next and non-spanish speakers can use Google translate or whatever and ask you if something is unclear).

    • folkrav@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      13 days ago

      The place I used to work at had a bunch of people speaking various South and North Indian languages, Vietnamese, Swedish, French, English, Spanish and Brazilian Portuguese. I’d have spent my whole days on Google Translate lol

  • aluminium@lemmy.world
    link
    fedilink
    arrow-up
    10
    ·
    11 days ago

    No, I once had the displeasure of working with a mixed german english codebase (where also classes and functions were in both languages). It was quite the experience.

  • algernon@lemmy.ml
    link
    fedilink
    arrow-up
    10
    ·
    13 days ago

    If I’m working for someone else (company or otherwise), I’ll write comments and docs in whatever language I can speak that they want me to (which pretty much means I write comments in English, because I rarely work for Hungarian companies nowadays, and even the ones I did work for preferred English, and these are the only two human languages I can write :().

    When working on my own projects, it is always English, because Hungarian doesn’t have good translations for many of the technical terms, so half my comments would be English borrowed words anyway. Might aswell write the rest in English too. Also makes it easier for others to chime in, because there are a whole lot more people speaking English than Hungarian.

    It was harder in the beginning, when my command of the English language was far worse, but even then, half-Hungarian/Half-English comments just looked weird, and more jarring than full English, even if that English was kinda bad.

  • Daemon Silverstein@thelemmy.club
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    13 days ago

    I’m Brazilian. For personal projects and snippets, especially if I’m going to share their code publicly (e.g. GitHub or GitHub Gists), I often use English. However, when it’s a project from a company I’m working for, I use Portuguese, as every company I’ve worked for so far are Brazilian (and my coworkers were Brazilian as well).

  • edinbruh@feddit.it
    link
    fedilink
    arrow-up
    9
    ·
    13 days ago

    Depends. Generally English, unless they are “directed” to one specific person like the professor who’s gonna grade it. But even then I might go with English anyway.

    Oh I also use my language when I’m leaving an important warning to myself in a config file, like “this is needed because X! don’t touch it! If you touch it do Y!”

    • wellDuuh@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      11 days ago

      Exactly. In case you haven’t noticed, English is defacto communication language in most paradigms, especially in the programming domain.

      Even broken English passes as English nonetheless

  • leisesprecher@feddit.org
    link
    fedilink
    arrow-up
    8
    ·
    13 days ago

    That depends, actually.

    In general, I try to keep everything English, since we do have some international colleagues.

    However, I work with a bunch of projects that have some legal/administrative background and certain words have very precisely defined meanings, that can’t be easily translated (at least not in one word, so that the next guy can back-translate the word). So in these cases, I sometimes write comments that explain the domain problem in German, because it’s much much easier and whoever touches that code better understand the German terms or screw everything up. Unfortunately class and method names are often a weird language mix.

    It’s not a perfect solution, but given the legal complexities behind seemingly simple words, it’s the best of the worst.

    • gentooer@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      11 days ago

      That’s an interesting perspective. Do you think it would be better to have separate legal documentation in German, which you then can refer to in your comments?

      • leisesprecher@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        11 days ago

        That would be a way to get rid of German comments, sure. But it’s also another layer of hassle. Usually, the comments are just a few lines to explain weird behavior.

        The naming problem is nearly unsolvable, though. Unless you want to map every concept to a random string, but that’s not feasible either.