Friday 11 December 2015

Watch the Language!

People read my blog. Not as many as I initially pictured, but I'm grateful for the attention. Or, rather, I was. You see, very few actually read it for the useful (ahem) technical snippets. They read it because it entertains them. Apparently it's my colorful use of language, and my prose. The common refrain seems to be: "For a techie, your English is pretty good."

Well thank you very much, guys... I think.

Even discounting the obvious negative geek stereotype, I'd like to point out that the undoubtedly well-meaning people who compliment me in this manner, have it backwards. I'm not good at English despite what I do. Rather, I take to computer programming because I'm good at English.

Natural languages vs computer languages

Like many other children of my generation in Singapore, we were brought up to be bilingual. We'd learn to speak and write in English, and Mandarin/Malay/Tamil as a second language. Outside of school, we might find ourselves speaking several dialects.


Those days.

And like computer languages such as C or Cobol, natural languages have rules. They have a syntax that needs to be followed in order for communication to take place. Also, like computer languages, any given phrase uttered in a natural language can be either correct or wrong.

However, unlike computer languages, in natural languages the rules tend to be a lot less consistent, the constraints more nebulous. There's often room for ambiguity. Which is probably by design - human beings have the capacity to interpret nuances, sarcasm, insinuation and puns. Computers don't.

In effect, you could speak English (for example) incorrectly and the subject of your communication could still interpret your intended message correctly by applying context. Take the example below:

The soldiers retrieved their weapons, and began to clean them. They were filthy.


What's filthy - me or
my weapon?

That could either mean the soldiers were filthy (not a huge stretch of the imagination) or that their weapons were filthy. A human being would infer the latter without much thought, but to a computer, this would be highly ambiguous.


And how about this one:
He came across a woman selling bagels, as he was out for a stroll with his wife. He bought her bagels.


Bagels, anyone?

This could mean that the man bought the woman's bagels. Or that he bought the bagels for his wife. While the end result is pretty much the same - this man bought bagels - the context is unclear.

Or the following sentences.
Yo dawg, hit me up.
Hello buddy, get me a beer, please.

Gambatte!

In a pub, these two sentences mean the same thing. Taken literally and without the fuzziness of cultural slang as a factor, they mean entirely different things. In a computer language, one learns to be very specific. There's no room for interpretation - the instructions you keyed in to the computer were either right or wrong.

To conclude...

I could list a hundred other examples. But the gist of it is - the rules for a computer language are way more clearly defined. It's far trickier to use a natural language than a computer language. Which could account for the stereotype that programmers are bad at social interaction. But the reverse can also be true - being adept in a natural language (or two, or several) and - of course - having a decent grasp of logic makes a person more well-equipped to handle a computer language.

Yours C-ncerely,
T___T


No comments:

Post a Comment