Coding Naming Conventions: Australian (or British) vs. American English

I really dislike American spelling of words. Nothing personal, but I guess growing up with knowledge about how words are spelt and then seeing words spelt “wrong” is frustrating (particularly when you can’t turn off a US spell-checker and it keeps “auto-correcting” your words to incorrect spelling).

Something my team has a discussion on this week was what our naming convention should be for words that have different spelling in US English vs Australian English (the most common one that has come up lately is finalise vs finalize).

In the end, we decided for consistency between displaying to the user and using the words in our code we would use Australian spelling (let alone the fact that seeing the “incorrect” spelling of the words really grated us).

I just did a bit of Googling and came across a really interesting thread. It is talking more generally about using English (or not) when your native language is English, however there are a few comments in there about American vs. British English.

In the end I feel it doesn’t matter too much because the spelling is similar and intellisense will normally save you, however I think the following points are important in this case:

  • If there is no possibility of people from other countries working on your code and the naming makes sense to the developers and users then you can break away from US English for a local variant.
  • If you are contributing to code that is open source or an International collaboration then use US English since it’s the de-facto standard.
  • I like this comment on the above linked to thread

3 Replies to “Coding Naming Conventions: Australian (or British) vs. American English”

  1. I agree that there is a defacto standard for some things; Color and Initialize are pretty common.

    Outside of that, though, even when working with a multinational team, I see no reason that RequestCancelled could not be a legitimate event name, InitialiseMainEngine a good method name, at least until someone invents identifier spell check.

    1. If you are using a compiled language it doesn’t matter because any method naming errors will be picked up at compile time and be readily identified.

      If you are using a good IDE that has intellisense then it probably doesn’t matter because it will tell you the method name.

      If you are working in a non-compiled language, with a dumb IDE then it probably matters.

      In saying that, I strongly feel that consistency of naming is important, and thus within the project a certain name for something e.g. Finalise should be kept the same.

  2. What a joke! Only an American could possibly advise that US English is used outside America. Australian English (and any other non American English) = UK English – yet Microsoft now have finalise as finalized in the Australian version of word! I was proud of our IT dept recently when they finally learnt to install software across our Australian business and defaulted Australian English not US (but then subsequently disappointed microsoft got it wrong with finali’z’e).

Leave a Reply

Your email address will not be published. Required fields are marked *