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)

  • @[email protected]
    link
    fedilink
    106 months 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.

  • @[email protected]
    link
    fedilink
    146 months 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
      link
      fedilink
      3
      edit-2
      6 months 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

  • folkrav
    link
    fedilink
    136 months 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…

  • @[email protected]
    link
    fedilink
    46 months ago

    This actually depends on the kind of project. In larger and longterm projects I write my comments in English. In quick jobs like writing a source code generator or data swabbler that I need once or relatively short term, I use German. It does not make much of a difference for me, though, and I have a script that walks over a source tree to find some common German words just in case I had written something in German by accident.

  • @[email protected]
    link
    fedilink
    2
    edit-2
    6 months ago

    I’m not a native English speaker, current country is non-English as well (ahora es español) . My comments have always been in English.
    I review and deal with a lot of code from different countries, and it’s always annoying if I have to throw the comments through a translator, if I think I’m not understanding the comment well enough.

  • Nicht BurningTurtle
    link
    fedilink
    36 months ago

    I do write them in English for personal projects. On everything else it depends on the requirements of the project.

  • 𝘋𝘪𝘳𝘬
    link
    fedilink
    256 months 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.

  • @[email protected]
    link
    fedilink
    26 months ago

    Yes of course. For collaboration with current and future remote abroad workers. Also in my country almost everyone speaks English.

  • @[email protected]
    link
    fedilink
    66 months ago

    In English even when I’m the only person working on the project as there’s always the prospect of someone else looking at it. Also my language doesn’t use the latin script and I don’t want to mix other scripts into code files. You can always write it in latin script but that’s really annoying to read. Funnily enough I wouldn’t be so against comments in another “big” language like Spanish or German.

  • @[email protected]
    link
    fedilink
    36 months ago

    I try to write them in English, but some German ones get through, when I am in a hurry or talking to a colleague (in german).

  • eatham 🇭🇲
    link
    fedilink
    English
    16 months ago

    I only know how to write English, but if I knew writing in multiple languages I would write the comment in both languages

    • well5H1T3
      link
      fedilink
      English
      26 months ago

      We should definitely make a plugin that will translate English comments into any language

  • @[email protected]
    link
    fedilink
    86 months 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.

    • @[email protected]
      link
      fedilink
      16 months 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?

      • @[email protected]
        link
        fedilink
        16 months 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.

  • @[email protected]
    link
    fedilink
    4
    edit-2
    6 months ago

    Writing detailed and technical comments in English is easier that saying a simple English sentence in real life for me, lol.