Hey programmer, why don’t you code in english?

Published on and tagged with programming

It is hard to believe, at least for me, that there are still programmers out there who code in their native, non-english, language, i.e. they use non-english names for classes, methods, variables, etc. Of course, it is easier to use your native language than a foreign language. You think in your native language, and know all the words you may need without consulting a dictionary. Even though it is a bad practice to use an other language than English to write your code. Why? Let me explain.

  • English is the defacto standard language for code. Almost all programming languages, frameworks and libraries use English for their APIs
  • Code written in one language is easier to read than code that mixes two languages (I think you wouldn’t like it if I would mix german and english words in my posts *g*)
  • Code written in a non-english language excludes a lot of programmers from understanding your code, with the following consequences:
    • It is more difficult to get help in newsgroups, forums, etc.
    • It is more difficult to outsource the development of parts of your application
    • Your framework or library won’t be used

You see, there are more disadvantages than advantages when using a non-english language for your code. So there is no reason to stick to your non-english language anymore (except for maintenance purposes).

18 comments baked

  • Hubi

    I can’t agree 100%. Sometimes needs to use native languages in the code. Just think of SEO problems. If I provide content in my native language, I have to use native words in my urls, otherwise I’ll get worse hit ratio.
    If we see someone’s own propriatery project, I think the used language in the code is totally unimportant. In the case of shared code the situation is certainly totally different, the common communication language is the english.

  • MJR/slef

    Half of the time, supposedly-English-speaking programmers use nonsensical variable names, so who cares if they’re sensical in another language. It may even help someone if they now that language. Not all programmers are monoglots and English-enforcement isn’t healthy.

  • MJR/slef

    s/they now/they know/; Damnit, how can you proof-read anything in an input box this small?

  • tariquesani

    Well, what if they don’t care about the English speaking population?

  • cakebaker

    @Hubi: I don’t have experience with SEO, but to me it seems like an additional layer on top of your application. In cake that means I would probably use routes.

    Yes, for private projects the used language is not that important. But even in such a project I would recommend to use english, as in case you need help it is easier to get help in english (compare the number of subscribers of the english and german google groups).

    @MJR/slef: Yes, it happens that nonsensical variable names are used, but that happens even if you use your native language ;-)

    Whether English-enforcement is healthy or not, I don’t know. For me it is just a fact I have to live with.

    @tariquesani: I am not sure to which point you are refering. Can you make it more clear?

  • Felix Geisendörfer

    hey daniel,

    I agree that most (if not all) coding should be done in english. When I started ThinkingPHP I thought about making some German posts from time to time as well, but I realized that the audience would be way to low to do that. Same goes for code. While I try to help spanish/french/whatever people in irc/group if I have time, it’s more difficult to understand what they are trying to accomblish if variables, classes, comments, etc. are done in their native languages. So I’m much more motivated to respond to english (code) support requests, then to ones in other languages.

    However, if you work with a local group and you only depend on your own libraries/framework or ones done by people who speak the same language as you, it would maybe be more efficient to break with english as the standard language. But unless you have everything planned out very carefuly (which I seldom do ^^), you might find yourself working with a english library, making your code become difficult and weird to read.

    Nice post and it’s been interesting to see the different oppinions on this topic ; )

  • MJR/slef

    @cakebaker: re tariquesani: I guess he/she is trying to point out that if your target programmer audience isn’t English-speaking, then none of the claimed advantages are advantages. Some could even be disadvantages. Many of the code keywords in languages we use don’t have the most common English meaning anyway.

    By the way, I’m quite happy for you to post in German sometimes if it allows a more accurate rendition of your message. It’s a bug to assume English monoglot is best for every audience, before you do the research.

    Code without translated documentation has many problems being maintained or used anyway, whether the source documentation is English or some other language. Also, I’ve seen API docs written by English-as-a-second-language(2L)-speakers where they’ve misphrased something and it’s ended up just plain wrong. With a few exceptions, documentation is a translation from code to prose and is best written by 1L-speakers in their first language, like other translations. That’s not always possible, I know.

    Finally, even many English-1L-speaking programmers don’t use English properly, having grown up in places like the USA or England since they stopped teaching language and grammar at school. Many German-1L-speakers seem to speak USA English rather than normal English too. What’s a bit more language butchery between friends?

  • MJR's slef-reflections

    British Languages

    Is English Enforcement in free software
    programming a growing problem?
    I was surprised to see
    a call for all programs to be English-only [cakebaker]…

  • tariquesani

    @cakebaker – MJR explained my point very aptly

  • spark

    i’m using cake to code a quite big web app, to work fine in portuguese. Since it’s like 40 different models, each with many different controller actions, how could it be done in english ?

    using routes would be (almost insane), i think.

    it doesn’t make sense *to the user* if it’s all in english.

    lovely blog, btw ;)

  • Gilberto Stankiewicz

    Comment removed

  • cakebaker

    @Gilberto: Well, I don’t claim that English is the best language. There is no best language. But I think English is the most suitable language for code, i.e. variable names, class names, etc., because English is the defacto standard language of the IT world, whether you like it or not.

    As English is not my native language I had to worry about learning it (and I am still learning) ;-)

  • Gilberto Stankiewicz

    Comment removed

  • cakebaker

    @Gilberto: No problem :) My native language is (Swiss) German.

  • Gilberto Stankiewicz

    Hello Daniel, I need to ask you a favour. Is it possible to delete my comments from this post? Now I disagree with what I wrote two years ago, and what is worse, the post is one of the first results on bing.com when I search myself. Thank your really much.

  • cakebaker

    @Gilberto: No problem, I removed them.

  • Rodrigo

    Debe ser fácil decir eso cuando se es hablante nativo del inglés, no? ;-)

    Debus esar facila dicar ito kande onu esas nativa angla-parolo, ka ne? ;-)

  • cakebaker

    Rodrigo’s comment translated with Google Translate: “It’s easy to say that when you are a native English speaker, no? ;-)”

    Well, English is not my native language, my native language is (Swiss-)German. And still, I’m using English in my code because of the advantages I mentioned in the article. I couldn’t imagine to use German as it would feel odd.

© daniel hofstetter. Licensed under a Creative Commons License