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.