39

Possible Duplicate:
Do people in non-English-speaking countries code in English?

I have a development comming that is intended to be sold across Latin America (Spanish speakers), but I've heard from some partners that is a good practice to always code in English, I mean just code (methods, classes, pages names, etc), labels on GUI are going to be all in Spanish...

Code will be edited in the future by developer of companies across Latin America and just maybe some from outside.

What do you think?, any experience with this?

15
  • 17
    I would say it's mandatory. You never know, maybe someone will outsource the code to some other country.
    – Coder
    Commented Oct 12, 2011 at 16:39
  • 3
    what about table names on data base? Commented Oct 12, 2011 at 16:44
  • 9
    Consider it to be a form of obfuscation for non-english speakers.
    – Jon Raynor
    Commented Oct 12, 2011 at 16:45
  • 2
    What about in-code comments? Commented Oct 12, 2011 at 16:57
  • 3
    If your question is about what do other developers do, this is a duplicate, as @Caleb already mentioned. If your question is whether you should code in english or in spanish, the answer should be written in your requirements document.
    – mouviciel
    Commented Oct 20, 2011 at 8:05

11 Answers 11

56

I'm French and working in a French company.

However, we do code mostly in English. Here is why:

  • We sometimes have non-French people working with us so it's easier for them.

  • We have some code coming from third parties (lib, framework, etc.), and this code is often in English, so we don't want to end up with a patchwork of French-English code.

Generally speaking, this is not a problem because you have to understand English anyway if you want to be a good programmer.

8
  • 5
    Understanding English is one thing. Being able to correctly and consistently translate terms from a problem domain you are only vaguely familiar with is a completely different thing. Commented Oct 20, 2011 at 8:10
  • That's dumb. If you are not familiar with the domain, you'll have difficulties in both languages. This is a domain understandoing problem, not a language one.
    – deadalnix
    Commented Oct 20, 2011 at 8:25
  • 4
    Wrong. You can be 100% familiar with a domain without knowing how all the terms translate to English (and sometimes there are no really correct translations for some terms!). It's it's not uncommon at all to have a projct with such people as domain experts who write the specs, and programmers who implement the specs for whom domain knowledge is completely optional. Forcing those programmers to translate everything to English and back, that would be a really dumb decision. Commented Oct 20, 2011 at 8:56
  • Well, the spec should be written with terms in english too. Unless tou have a national specific problem, thoses terms will exists in english.
    – deadalnix
    Commented Oct 20, 2011 at 10:45
  • 3
    You can talk all day long about how things "should" be, but that doesn't change the fact that the requirement to have everything in English incurs a very real cost (not just from doing it, but also misunderstandings and errors) that cannot always be justified. And no, it's simply not true that "those terms will exist in english". Example: In Germany, there's a broand (and very widely used) category of securities called "Zertifikat" for which no equivalent English term exists (all English terms are either more specific or more general). Commented Oct 20, 2011 at 11:01
22

In most programming languages the keywords are in English, so it generally looks a bit forced if you mix languages.

For this reason, as well as developer numbers, English tends to be the language used in most developments, even developments by companies based in non-English speaking countries.

2
  • 4
    Except Lingua::Romana::Perligata!
    – svick
    Commented Oct 12, 2011 at 21:42
  • @svick: Hush now, we don't speak of LRP ;)
    – Daenyth
    Commented Oct 17, 2011 at 19:42
21

In general, as said in other answers: Programming languages use English keywords, and when a project becomes larger, you might get foreign people working on the code. Additionally, concepts like "getters" and "setters" or instance in languages like Java are commonly called getFoo or setFoo and it makes sense to keep this convention.

On the other hand, you might create an application for a specific target market. I, for instance, was working for a large bank developing balance analysis software where we had German financial and legal language. In the end, we decided to use German identifiers to keep the exact terms as the English terms sometimes had a slightly different meaning; on the other side, we kept the convention to use English in other places, so we had functions like getUmlaufvermoegen() (instead of getCurrentAssets()) which looks "funny" but proved to work well, as we could easily go through the calculations together with the experts from the bank who defined the calculations we did but was consistent with frameworks etc. we used.

1
  • I wish I could upvote this more. Coding everything in English sounds great in theory, but translating domain terms for the sake of language consistency is not a great idea... Commented Oct 20, 2011 at 8:07
6

This is a tough one. The problem with having all the variable names in English is that you have to translate the customer's domain from their native language into English. And that is really hard sometimes, as naming stuff is one of the more difficult problems in programming. If you are trying to practise DDD then creating an ubiquitous domain language is nearly impossible. There will always be two versions of every concept and meaning gets lost in translation.

But on the other hand if you mix another language into the code base (besides English) then it will always look messy and be unreadable for everyone that cannot speak that language.

As a native English speaker living in Sweden, I lean towards translating everything to English except for the odd word that just cannot be translated without losing some of its meaning.

5

I live in Colombia and we are taught to write our code in english for the sake of universality, most of the good programmers know the 2 languages anyway because its necessary and because almost all good documentation and reference is writen in english;

So i think is safe to write your code in english its very likely that they are going to understand and it is a good practice.

1
  • 2
    thank you compatriot, are you writting your comments and DB objects in english as well? Commented Oct 12, 2011 at 17:58
3

I live in Italy and here you usually see English mixed with Italian or English words with Italian suffixes.. This is very widespread, for example in a slide in a CS university course I saw:

bool checkFatto;

("check done")

I'm a strong believer that all code, including comments, and even including in person developer talk should be in english. Italian simply doesn't have many of the required words required to discuss programming topics. But this is virtually never done.. Maybe that's why I chose to telecommute for an american company.

Something that bothers me just as much is people who google programming questions in italian or look up the italian wikipedia. They have no idea of the quantity of the information they are missing out on (such as the entirety of SO).

3
  • 4
    In person developer talk? I really don't think so. If I speak with my colleagues that have the same native as me, I am going to speak with them in that. And if some term doesn't exist there, or it wouldn't be clear, I'll just use the English term. Being good programmer requires you to read well English technical text. But that's not the same as being able to speak coherently in English.
    – svick
    Commented Oct 12, 2011 at 21:46
  • 1
    I dont understand why this question get a downvote. +1 for me since I agree I can't imagine seeing stackoverflow clone in Italian.
    – Rudy
    Commented Oct 13, 2011 at 3:35
  • It's not that Italian doesn't have the words, It's more that Italian is a much more verbose language. Commented Oct 18, 2011 at 18:28
3

English:

GetUserInvoices(int userId);

Spanish:

ObtenerFacturasDelUsuario(int idDeUsuario);

English words are usually shorter and easier to read, that's one of the reasons why I usually code in English (I am from Spain). The other one is that I find ugly to mix Spanish words with the English language keywords and framework classes and members.

2

We were discussing coding standards recently at work and an interesting point came up. We are English speakers in the UK, and we have been directed to code in US English. As hard as it is for us to swallow our pride, we have to accept that this is the right thing to do. Although there is no difference in the keywords, much of the .NET framework is in US English, and I accept it is better to keep the consistency, rather than put national pride first :).

It also might help your English (not that there's anything wrong with it!). The big question is, with the emerging economies on the rise, when will us English speakers have to learn to code in Brazilian Portuguese, Russian, Hindi or Mandarin :)

5
  • yeah good point Paul I think things are kept reasonably simple with English but who knows what's in store for the future? If I may be a bit drastic or draconian here hah Who knows in the next decade if humans will code? Us lot will be replaced by a bunch of machines!
    – user21122
    Commented Oct 13, 2011 at 10:41
  • Maybe, but who's going to write the code for the machines? :) Commented Oct 13, 2011 at 10:53
  • Crikey hmm yeah it's all uncertain I'm afraid :)
    – user21122
    Commented Oct 13, 2011 at 11:42
  • 3
    I am brazillian and code in UK english when I remember the UK version of a word or construct. :P I think UK english is more beautiful and sounds better.
    – speeder
    Commented Oct 18, 2011 at 17:59
  • sometimes the spelling differences help e.g. Color is a type Colour is a property
    – jk.
    Commented Oct 20, 2011 at 10:01
1

When we started our application five years ago we only had 4 Dutch programmers. But we wrote everything in English.

Today, our code is used by French colleagues and Indian developers. Thanks to using English, they can also use our code. The French colleagues have quite a bit of french in their comments and naming schemes. We can still make some sense of it but it's a lot easier if everything is in English.

In short, what if tomorrow you have a few Brazilian colleagues?

0

It's a dilemna from me: for mechanism and key words, or read documenation, no real problem.

My english is poor, and this language have no words for many subtle significant ideas.

I've tried to developp in english, it lead me astray, and I have to make it again with known words that represent the real world.

So, for core/essential code it is in French (nobody's perfect) with dual languages translation with hope that for a native english it is not so diffucult to have the keys of understanding close to the some piece code (not all).

It is not proudness, just to enrich the work with different cultures and to do job in the best manner.

-1

I firmly believe that no serious developer can be uncapable of, at the very least, understanding English in written form. How else would you refer to any library's documentation, read a book on a highly specialized matter or even use Stack Overflow?

In your particular case, chances are that if a client "requires" the source code to be in their local language, they could be a quite low-profile company, and perhaps you wouldn't like to establish a relationship with such a customer.

Not the answer you're looking for? Browse other questions tagged or ask your own question.