Programm(e)ing Terminology Between the Pond

The differences between British and American English in Coding.

In the early 21st Century it is fair to say that most people associate computer coding and programming with the USA. Films like The Social Network, TV like Silicon Valley and Devs and the global presence of the big tech firms like Google, Twitter, Apple, Amazon and Facebook means that the US — Silicon Valley and the West Coast in particular — are essentially a by-word for technology to many people. Of course, this is not to say that technology and computer coding was invented there; in fact, arguably the three most important figures in modern computing and technology: Ada Lovelace, Alan Turing and Tim Berners-Lee, all hail from Blighty.

Tim Berners-Lee was literally named the Greatest Briton in 2004

Coding has a rich tapestry of influences from around the world and much like the English language itself, shows these influences if you know where to look.

The Big Differences: Colour, Centre, Localise and Finalise

The word colour has it’s root in the Latin word color and entered Middle-English through the French colur. Like many variant British/American spellings the divergence occurred when Noah Webster created the first entirely American dictionary and wanted to create a unique American culture and to the chagrin of millions of British-English speakers later, his changes stuck. Unfortunately his suggested spellings for soup, machine and daughter — soop, masheen and dawter — did not stick.

Despite Webster’s simplifications, the majority of the world that learns English as a Second-Language actually learn British English so it would make sense that international code might be written that way as well and often that is the case. If you are working at an Australian or South African firm in those countries, you will probably name your variable ‘colour’ and you will ‘finalise’ your ‘localisations’. While Americans at American firms will use ‘color’, ‘finalize’ and localize. Much like whether to use a semi-colon after a line in Javascript, it comes down to preference and shouldn’t create problems if everybody is on the same page and consistent with each other. And this makes perfect sense, computers translate everything we write into binary anyway so what difference does it make to them?

However, there are significant areas where this is not the case. Two of the first languages any front-end developer will have to learn and master, HTML and CSS, are specifically written in American English as standard.

If you try and write:

.container {

Your element will remain left-aligned and black.

This makes sense at a surface level, as having one accepted term uses less data and leaves less room for error and bugs. But it does mean that British-English speakers are out of luck, there is no solution to this besides learning a second way of spelling some key words when coding.

Brackets vs parenthesis

It seems everybody in the English-speaking world is aware that there are variations on the spelling of colour/color and a few other relatively important words like film/movie etc. As a half-American/half-Brit I assumed I knew even edge-cases such as fork and knife and bangs/fringe but even I wasn’t aware of the brackets problem.

In the UK, much like America: square brackets means [ ] and curly brackets means { }. But unlike the US, brackets means ( ) and parenthesis is a word that only exists in the minds of Astro-Physicists at Cambridge. As an example of this difference, you use PEMDAS as order of operations in the States while in Britain we are taught BODMAS.

Already, in my short coding career, I have been working on projects with a partner and my use of the word brackets has created confusion. I will eventually transition to using the word parenthesis eventually much like I have succumbed to words like trashcan and candy bar. But before I do, I propose a new system of naming that we have informally adopted at Flatiron.

( ) are banana skins

Git

One of the things they don’t tell you when you really start coding and working on projects is just how much Github will become your closest (and maybe only) friend. Pulling and pushing becomes the first and last thing you do every day and merging correctly takes up the rest of it. Git in Britain was a popular slang-term in the 90s that meant idiot and I’d often wondered why it was called Github and why I had to write a word my mum wouldn’t have let me say as a child a thousand times a day but assumed it had a technical reason behind it. I was pleasantly shocked to learn that actually it was created with the British slang term in mind, as creator and Linux legend Linus Torvald had this to say: “I’m an egotistical bastard, and I name all my projects after myself. First ‘Linux’, now ‘git’.”

What’s a wee Brit to do?

The sun may have finally set on the British Empire but British English is going nowhere, arcane spellings and all. However, the battle for the coding lexicon was truly over before it began and American English has emerged victorious. All the rest of the world can do is remember that ‘r’ comes after ‘e’ in centre and parentheses and exponents are the order of the day.