views:

118

answers:

3

Though at our company all people are non-native english speakers we try hard to write our documentation, code and comments in english, pretty much everything except user-related stuff, of course. This is ok as long as business terms are translateable and not too specific to the domain. But once the business terms get too specific, either there is no adquate translation for them or the translation just sounds silly and meaningless. This leads to a awful language-mix when writing code.

What is your experience on this topic? Do you avoid silly names in code by all means or do you just live with it?

+1  A: 

I've no experience with this as I am a native English speaker. However when the domain is complex, Extreme Programming suggests that you use a metaphor that programmers and customers are comfortable with.

This could be applied in your situation.

John Nolan
+1  A: 

I think that trying to keep everything in English when all developers and users have a common non-English native language is not only useless but actually harmful. Domain terms are just the most obvious example.

IMO all domain terms should stay in the native language, as should documentation and comments. This allows developers to concentrate on the code's logic rather than translation issues. It may look silly to have a mix of two languages in the code, even within single method names, but IMO it's not really a problem and better than making a great effort to have everything in English when nobody actually benefits from it.

Of course, this only applies in the described scenario. If you're a department of a large international company, or planning to expand your market internationally, or your native language has not very many speakers, then it's a different matter.

Michael Borgwardt
I second that: code in English, but don't translate domain terms; for comments and documentation, use whatever language is most apropriate (user base/maintainebility considerations: whose gonna read it, whose gonna change it?)
Christoph
+1  A: 

We have exactly the same problem in our company. We try to write the code and examples in English, but we often find unsolvable situations where direct common names in our native language have no direct or unknown translation or equivalence. So from my point of view, it is almost impossible to avoid mixing languages (will actually Spanglish be the language of the future despite my will?).

Basically it is a matter of two things:

  • Insufficient general English language knowledge.
  • Not everybody is perfectionist enough to spend some seconds to find out on Internet how to correctly say something, so what first comes to mind goes to code.

The effects of these are:

  • Comments can not be ununderstandable by native English speakers (because the used words do not exist or sentences are a literal translation from source language).
  • Incorrect translations full of false friends or invented words. A typical example of this would be using "actual" word for "current" meaning since it is what "actual" means in Spanish.

The actual solution to this is try to correct this is to attack the source of the problem:

  • English tranining courses (included applied technical English) should be a must in the company, so every worker could reach a minimun acceptable level of English knowledge.
  • Force the not-so-perfectionist people to follow some rules of coding by defining a stylesheet of code or even better have a QA department that enforces the quality of code, grammar of comments and readability included.
Fernando Miguélez