Language Musings: From Brackets to “Color”

Marc Judge
Version 1
Published in
4 min readJun 6, 2024

Introduction

As a software developer, I find myself immersed in various linguistic realms. There’s the language I use for everyday conversations, the one I wield when writing, and then there’s the unique dialect of code. Being Irish, my linguistic journey is a delightful blend of British English with a dash of Irishisms and a sprinkle of Americanisms. I’m going to discuss some of the peculiarities I come across day to day.

1. Brackets: A Transatlantic Tale

Parentheses vs. Brackets

In America, these [ ] would be known as brackets while I myself would call them square brackets.

To me, these ( ) are brackets. To an American they are parentheses.

So, please exercise caution when you say bracket, because ( ) and [ ] can mean drastically different things when coding.

The Curious Case of Parentheses

Why do Americans favour the term “parentheses”? It’s not their style to use frilly language. According to the dictionary, parentheses is the plural form of parenthesis — a remark added to a sentence for explanation or extra information, set apart by commas, brackets, or dashes. Is that a circular reference to brackets? Uh-oh!

British English: Everything’s a Bracket

In British English, its kept simple: everything is a bracket.

These ()? They’re round brackets.

Them [] ? Square brackets.

And those{ }? Of course they’re curly brackets.

In American lingo, these { } are known as braces. Maybe Americans haven’t overcomplicated it; they’ve just given each symbol its unique moniker.

Now, here’s a fun experiment: Mention square brackets to an American, and observe the subtle tilt of their head — a quizzical look akin to discovering someone irons their pants…or underwear I should say😄

2. Java vs. JavaScript: A Hammy Comparison

I once heard someone say Java is to JavaScript as Ham is to Hamster. Now maybe that goes too far but it is easy to falsely assume these are two closely related programming languages.

Java: The Backend Workhorse

Java and JavaScript — two names that sound eerily similar but serve different purposes. Java, the stalwart of backend development, is a compiled language. When you write Java code, it undergoes compilation to create bytecode. To run it, you’ll need a Java Virtual Machine (JVM) installed on your computer.

JavaScript: The Frontend Dynamo

JavaScript, on the other hand, dances to a different tune. It’s an interpreted language, executed directly as the script runs. This makes it ideal for creating interactive web pages without constant page reloads. Think postcode validation on a web form — JavaScript’s got your back.

3. What is Equality anyway?

Primitives and Objects

Primitives are the fundamental building blocks of coding languages.

If two primitives have the same value the equality operator returns true.

It’s a simple concept to get your head around.

The Steve and Eric Conundrum

Imagine two objects, both with the same type and identical values, written below in pseudocode:

Person steve = new Person(age: 33);
Person eric = new Person(age: 33);

Seems like they should be equal, right? Alas, they are not. For objects by default the equality will be determined by memory address. It makes sense if you think about it. The fact that two people are the same age does not make them the same person.

But hold on! If you then say:

steve = eric;

Suddenly, Steve is another alias for Eric, and the object initially created for Steve is no longer referenced.

Now, if you are updating Steve you are also updating Eric. A classic gotcha moment for new developers!

4. Non-Native English Speakers: Code Across Borders

As a native English coder from this side of the pond, I occasionally grumble about spelling “color” instead of “colour.” But spare a thought for non-native English speakers diving into the world of code. Most major programming languages are written in English, which means they navigate unfamiliar territory. I take for granted the use of many keywords in code. “Public”, “Private”…“Interface”, yet, they soldier on, deciphering keywords and syntax with admirable determination. Regardless of you first language, anyone taking up coding/Java will remember the abject confusion when confronted with the main method for the first time.

Readable Code Knows No Borders

Sometimes my greatest contribution on a project has been to correct the spelling mistakes of far better coders than me or tidying up their use of verbs. I’m a firm believer that code should be as readable as possible and without the need for excessive commenting. That might be something that comes easier to myself as native English speaker.

Whether you’re a native speaker or a code traveller, let’s celebrate the beauty of language in all its forms!

About the Author:
Marc Judge is a Senior Java Developer at Version 1.

--

--