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?

Juan Jimenez
  • 509
  • 4
  • 6

11 Answers11

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.

Jon Purdy
  • 20,597
deadalnix
  • 6,023
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.

Luke Graham
  • 2,403
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.

Pang
  • 335
johannes
  • 3,611
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.

jsrc1115
  • 51
  • 2
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).

Andreas Bonini
  • 1,073
  • 1
  • 9
  • 16
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.

Konamiman
  • 627
  • 4
  • 12
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 :)

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?

Carra
  • 4,281
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.

cl-r
  • 37
-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.

deprecated
  • 3,297