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?

Programmers making grammar mistakes (1970)

The compound nouns setup, teardown and cleanup are confused with the verbs set up, tear down and clean up.

In the above examples, they are used as verbs but spelled as nouns.

I ask you to set something up for me. I don’t ask you to setup something for me.

EDIT: Some readers misunderstood the point and thought I implied that there must always be a clause between the two words in the verb. This is not true. The point is that they are written separately.

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 the setup.

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:

turnover:

Turn over the documents.
Our company increased our yearly turnover.

handover:

Hand yourself over to the police.
The hostage handover went smoothly.

cleanup:

Clean up your room.
The cleanup took hours.

teardown:

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 download?

We don’t say load it down. We say download it.

That’s different. In the first category of compound nouns (setup, teardown, handover), the part of the word that denotes the act is first, followed by an adverb such as up, down, over or under:

setup = set [verb] + up [adverb]

In the second category, the acting word is second (load, grade, take, throw) and the first word denotes position:

download = down [preposition] + [load] verb or noun

Other examples of the second category are:

  • upgrade
  • downgrade
  • undertake
  • overthrow
  • understand
  • overcome

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. ;)

EDIT: I've thought about this some more, especially in light of some of the comments provided by readers. I can see how using the word "setup" as a type of shorthand for "set up", to avoid unnecessary underscores or capitals, can be useful and valid. If you undersand the distinction and prefer writing it as one word, then go for it. I think however what's important is for people to at least understand that it's an exception and not the general rule outside of computer science.

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.