test.ical.ly | getting the web by the balls

Aug/12

17

What language should I use when programming?

I was discussing this question with a journalist the other day as journalists are amongst others the people we work for at my company. I’m not talking about the programming language but the language used for your object and function names, variables and comments etc.

A few years ago I would’ve had a different opinion on this.

I would’ve said English of course!

Nowadays I see things a little different though.

It depends on the kind of project your working on:

  • Is it fire and forget or sustaining?
  • Is it for a client or your own product/service?

If you’re working for a client and will have to maintain and further develop your project in the future I would want to establish the following goal:

It is of utmost importance that all object, function and variable names – in other words all nouns and verbs – are those used by the client!

Journalists (my clients) for example distinguish a lot of different types of articles ranging from news bulletins to interviews and commentary and loads more. Technically most of those are the same so developers will talk about articles without distinguishing.

Lets ignore for a while that of course different types of articles will most certainly need different attributes which will cause the need for more than one class of object.

This small difference in language immediately leads to a problem of understanding between the client and the developers.

Furthermore if your client does not use English for internal communication – which is true to most of the world – all of the terms in question will be German, French, Spanish, etc. Simply translating wont cut it.

The question then is not about nice looking code. Of course a mix of languages looks weird. But using the same terms throughout an organisation referring to the same things will add to the quality of communication between client and development.

Of course open sourcing will be difficult then but then that’s rarely part of the assignment.



  • http://www.facebook.com/sebastien.armand Sebastien Armand

    Oh no! Not “a mix of language looks weird”. In my experience a mix of language makes it a real pain to work with.
    At my previous job, the code base was half English half Chinese. And for the Chinese, because you cannot use Chinese characters in functions and class names, half of it would be in transliterated pinyin, half in standard characters.

    You also never know who is going to come work with you next month. It would suck if you couldn’t recruit a great dev because your codebase makes it impossible for him to work with you.

  • caefer

    @facebook-621327693:disqus ok, different a character base is a different matter altogether I admit. That aside my experience shows me that much more problems occur through misscommunication by using different terms for the same thing or even the other way around that occur through two languages in your source code.

  • http://www.facebook.com/sebastien.armand Sebastien Armand

    While I agree, I also have to disagree ;-)
    I’m French, I live in China. But right now the project I’m working on has an API that reads with terms like “lastschrift” “preis-leistung” etc…
    You understand these terms better than me as I don’t really remember any German.

    So by having a non-English code-base, you forbid yourself from a lot of outsourcing possibilities.

    “Hey we need a small widget for the Olympics, let’s find a German speaking outsourcing company in Vietnam to do it for cheap!” Huh! What?

    On one side there is more upfront work to be done: defining a clear common vocabulary.
    On the other, you can probably get started faster.

    On one side you can then work with mostly whoever you want.
    On the other you forbid your project and team to ever include non-German speakers.

    Those are very strong implications and decisions to make. Not to be done lightly I would say.

  • caefer

    @facebook-621327693:disqus With a provocative post such as this one I expected to stir some negative reactions but your comments show that both choices can be sensible depending on the kind of project you’re working on. Thanks.

<<

>>

Theme Design by devolux.nh2.me