A common grammatical mistake that programmers makeenglish language programming grammar
I recently read a fascinating profile about a guy who made about 50 000 edits to Wikipedia to correct a relatively obscure grammatical mistake. The mistake of using “comprised of” when one should be using “composed of” or “consists of”. He is the ultimate wikignome. A name given to people who spend most of their time on the site making small corrections and fixes.
This reminded me of a grammatical mistake that programmers frequently make. I notice it in source code, on IRC, in mailing lists and in documentation.
Here are a few examples from actual code, which I found by using “grep”:
def cleanupInstance(self): def teardownSite(self): def setup_test_class(self):
case "default": // setup event handlers
What is the grammatical mistake in all these examples?
The compound nouns
cleanup are confused with
tear down and
In the above examples, they are used as verbs but spelled as nouns.
I ask you to
up for me. I don’t ask you to
something for me.
For Example: “Please set up the server for me:.
However, when I want to refer to the task you did (the noun), I refer to
When used as an adjective,
setup also stays one word:
Go to the setup menu. [adjective] The server's setup is not yet done. [noun]
This mistake happens mostly with
setup, however here are similar words
which also often get used incorrectly:
Turn over the documents. Our company increased our yearly turnover.
Hand yourself over to the police. The hostage handover went smoothly.
Clean up your room. The cleanup took hours.
Tear down this wall! This test needs a teardown method.
UPDATE: Here are some more:
- Callback <=> Call back
- Checkout <=> Check out
- Layout <=> Lay out
- Login <=> Log in
- Logout <=> Log out
- Lookup <=> Look up
- Plugin <=> Plug in
- Popup <=> Pop up
- Runaround <=> Run around
- Shutdown <=> Shut down
- Showtime <=> Show time
- Startup <=> Start up
- Takeoff <=> Take off
- Workout <=> Work out
- Writedown <=> Write down
Another interesting case is “maybe”. It can be used as an adverb (one word), noun (one word) and verb (two words, a modal verb “may” and the main verb “be”):
At the moment it's definitely still just a maybe. (noun) I'll maybe come over tonight. (adverb) He may be waiting for us. (verb)
What about something like
We don’t say
load it down. We say
That’s different. In the first category of compound nouns (
handover), the part of the word that denotes the act is
first, followed by an adverb such as
setup = set [verb] + up [adverb]
In the second category, the acting word is second (
throw) and the first word denotes position:
download = down [preposition] + [load] verb or noun
Other examples of the second category are:
These do not get split up.
I hope I made things clear and that programmers will now “undertake” to “clean up” their code by removing these grammatical mistakes. ;)
Hello, I'm JC Brand, software developer and consultant.
I created and maintain Converse, a popular web-based XMPP chat client,
I can help you integrate chat and instant messaging features into your website or intranet.
You can follow me on the Fediverse or on Twitter.