Never program in your native language!

One thing that has always annoyed me, is when people program in their own language (as in: non-English). They will use variable and function names in their own language, and write comments in their own language, and whatnot.

What’s worse, I noticed that a lot of course material also does this, even at an academic level. Which is rather ironic, since many such courses will use textbooks in English. However, for homework and other assignments, they generally use the native language, not just for the questions, but also in code examples and such.


There are many things wrong with this, I will try to list a few:

  1. Many languages use special characters, which either need a specific ANSI code page, or an extended characterset using unicode. This means that the text is not guaranteed to display correctly on all computer systems. The encoding is also not guaranteed to be compatible with all programming tools. Sticking to the standard 7-bit ASCII codes is the only way to guarantee that the code will be readable on a large range of systems, and can be processed by a large range of programming tools.
  2. Even if you think your code will never be used outside your own country, that is no reason to assume your code will never be viewed by people who do not speak your language. Especially in Europe, schools and organizations are getting more international every day. People are allowed to work or study anywhere within the European Union. Universities are teaching classes entirely in English more and more, to accomodate foreign students. Companies hire people from outside the country to get higher-skilled people and/or better value for money. People contract companies abroad, etc. If you need to translate your code because a foreigner needs to read it, you’re already too late.
  3. Virtually all code you are interacting with, be it OS-code or other third-party libraries, is also written in English. So when you interject your own language in there, it only makes things more confusing.
  4. Virtually all programming languages use keywords, mnemonics and other terms taken from English (for-loops, while-loops, if-statements, etc) and have naming conventions for code that also follow English. Take for example JavaBeans, where properties are expected to use method names that start with get/set. It does not make sense to start your method name with an English term, and then continue in another language.

So well, if you’re new to programming, try to write all your code in English from day one. Don’t teach yourself the bad habit of programming in your own language, then you won’t have to drop that habit later either.

If you already have the bad habit of programming in your own language, then stop doing it right away!


2 Responses to Never program in your native language!

  1. wfw311 says:

    I disagree to a certain extent, although this may be a special case.
    I’m a developer for an ERP system (client specific customizing, native language German.)
    The policy for the developers of the main product has been changed to use English comments and naming.
    The problem is that there are a lot of business terms I don’t know even though I’m quite fluent in English otherwise, especially in technical terms. So of course I know what is meant by “invoice” or “order”, but I had to learn “bill of material” (or for short “BOM”), and there are literally hundreds of terms. Add to this that judging from their comments some other developers have a poor grasp of English grammar I’d very much prefer to return to using in German. I’m happy to accept English for the technical stuff though.

    • isilanes says:

      It is quite safe to assume that most Germans are not fluent with business terms in English. It is also safe to assume they aren’t with those same terms in German, either. I know I don’t know them in Spanish, myself. The fact is the terms will have to be learned, whether in German or English, and being forced to do so in English will reduce the probability that, down the road, you will be blocked by some English term you are not familiar with, when you should (because you WILL find them, unless you program secluded in a German ivory tower).

Leave a Reply


You are commenting using your account. Log Out /  Change )

Google photo


Twitter picture


Facebook photo


Connecting to %s