In an earlier post, I had argued why/how English grammar is so similar to computer programming syntax. I noted, however, that computer programming syntax is not as forgiving as the English grammar. Make a mistake in English, people may understand (or misunderstand) you, and you will walk away with it. Make a mistake in programming syntax, the computer will say NO, you are wrong, I cannot understand you, so I will not execute your instructions!
Today, I want to share two other common mistakes in English grammar (last time I talked about misuse of commas). Look at the following:
- Me and my friends went swimming
- Please join my son and I
I hear and read the above sort of mistakes every day … and unfortunately, those who hear or read such things every day will firmly believe in them, which is very dangerous. This is even worse for children since the mistakes will stick in their heads forever ... just like I cannot believe up to now that there has never been a World War III simply because I heard something from my teacher when I was a kid, and it has remained glued in my head to-date.
To appreciate the injustice done to the Queen’s language with the above two examples, one simply needs to understand the difference between subject and object in English grammar.
A subject commonly does something (i.e. comes before a verb), especially in a declarative sentence, where the subject appears before the verb ("The man shouts") – here “man” is the subject. In an interrogative sentence, the subject usually follows the first part of a verb ("Does the man shout?")
An object is a noun, a noun phrase, or a pronoun that is affected by the action of a verb. In other words, an object is governed by a verb or a preposition. Something is done on an object. An object comes after a verb.
Once you are at home with the concept of subject and object, then you can hardly make mistakes such as in the above examples.
Just to get a better grasp, consider the above examples to be similar to the following:
- <Me
and my friends> went swimming, or generically <subject> went swimming
- Please
join <my son and I>, or generically Please join <object>
In number 1 above, <Me and my friends> is a subject; <my son and I> is an object. So ask yourself: would you ever say “Me went swimming” or “Please join I”? Would you ever say "Me go to school" or "Please tell I the truth"? Obviously not, and therefore, you should never make the above mistakes. The correct forms are:
- My friends and I went swimming
- Please join my son and me
As a general rule, use “I” when the pronoun is the subject of the sentence, and use “Me” when the pronoun is the object.
I cannot over-emphasize the similarities between the English grammar and computer programming. I just like the discipline that computer programming inculcates in a programmer. It’s like the kind of discipline we hear exists in the military.
Next time, I want to compare and contrast “statements” in English and computer programming (or logical math for that matter). That’s another very interesting topic for computer programmers.
No comments:
Post a Comment