A very common grammatical mistake that programmers make
opkode.com
opkode.com
http://dictionary.reference.com/browse/setup?s=t
set up
verb (adverb, mainly transitive)
....
3. to build or construct: to set up a shed
Collins, 2012
I've slowly moved from prescriptivist to descriptivist, and if you want to keep your sanity, I suggest you do too, because linguistic history has shown that people use words the way they want and will keep doing so regardless of any interventions.edit: To clarify - the author says:
I ask you to set something up for me. I don't ask you to setup something for me.
I think the genesis of this expression was "to set up <sthg>" -> "set up <sthg>" -> "setup_sthg". The "to set <sthg> up" form /is/ probably more correct in the prescriptivist sense, but my take is that this isn't really a mistake, it's intentional. "setTestClassUp" sucks because it spreads the logical units of the identifier all over the place. I want the verb in the beginning and the noun after. setup
noun
...
set up
verb (adverb, mainly transitive)
...
That said, I agree with you regarding prescriptivism vs. descriptivism.This isn't a prescriptivist argument about language itself, it's an argument about a spelling convention (One which is arguably more accurately descriptive of the usage of the words.). Your dictionary link, by spelling "set up" as separate words when used as a verb, agrees with the author.
It's possible that language changes will result in "set up" becoming a fixed, atomic phrase, at which point writing it as one word would make sense. But since both"I'm going to set up the computer" and "I'm going to set the computer up" still sound perfectly natural to my ears as a native speaker, I don't think we've yet reached that point.
I suppose that in snake case it might be a little clearer, but in many cases it would still be good either way that someone named their method/function/variable fairly descriptively.
However something like "cleanupInstance" is much better written cleanInstance or cleanUpInstance
Sadly, this does mean that to set up the object, you have to execute the setup method. Which, I'll grant is odd. But seems fine.
I was upset when I learned some people didn't have to spend years in school trying to figure out all how to correctly sound out words in their language.
At least we have a large vocabulary to pull from.
It doesn't.
> that other programmers understand
It confuses many programmers.
The "mistakes" here are all examples of phrasal verbs:
http://en.wikipedia.org/wiki/Phrasal_verb
The central characteristic of these constructions is that the verb+preposition form "a single semantic unit".
That would seem to be a perfectly reasonable justification for not introducing underscores.
Many coding standards specify different presentation for single-word vs multi-word identifiers, except in languages where the syntax would prevent this (e.g., snake-, Pascal-, or camel-case presentation of multi-word identifiers.)
All the examples are phrasal verbs, presented as single words in identifiers that are using snake_case or camelCase to distinguish multiple words in the identifier, and so are incorrect.
The only times I can see this being anything more than a mild aesthetic issue (though still a real issue that, while perhaps not the most critical to address, is worth being aware of and avoiding) is if it is in a language where, e.g., properties and methods share a single namespace, and coding standards dictate that properties use noun-based names and methods use verb-based names. In that case, using a single-word noun in an identifier when you intend a phrasal verb is a substantive error (most particularly when that semantic unit is the whole of the identifier).
"Please set up a meeting with Kevin for me" sounds more natural to me than "Please set a meeting with Kevin up for me."
An example (pronouns almost never qualify as "heavy"):
Good:
• Please set him up
Weird sounding:
• *Please set up him
I don't think things should be named "setInstanceUp" or anything like that, but you could see how "setUpInstance" could mean something different than "setupInstance" (an instance of a setup, I suppose).
Same with "signup" versus "sign up", login/logout/etc. There are a lot of examples of these things where people confuse the verb and the noun, and the word split can be the most concise indication of which is which.
This is all a long winded way of saying the author of this blog post must be completely insufferable in real life.
Ideas like "setup" and "teardown" have grown to describe important verbs in their own right. Why argue that the original form (verb + preposition) should not be allowed to merge, when it's clear that they already are doing so? For no particular reason, other than maintaining a status quo? That's a little ridiculous.
PS: Same logic applies to "login" and "logout".
Total spend (instead of budget, expense) Compute power (instead of computing power)
Maybe it's just me and maybe they are grammatically correct but it just seems like trying to sound in-clique..
1 - A person who performs (alternative to performer). With semantics that suggests it's for more serious roles.
"The performant did a wonderful job during the ceremony."
2 - Efficient, effective. Considered a term-of-art in technical disciplines.
"The shape of this new hull design is far more performant than previous generations of ships."
For example, in English, verbs and nouns have an unusually close relationship, it's trivial and natural to verb nouns, especially when the verbed noun is obvious. This is an example of derivational morphology, and there's all kinds of ways of doing this in different languages.
In English, among other neologistic processes, there's also a process to compound common noun phrases. These days, compounding nouns usually skips several medial steps (like hyphenation) because everybody knows that in a couple generations we're just not going to bother with the hyphen and we skip all that stupidity. A thousand years of English has showed us that this is the pattern.
Verbing a compounded noun is not only correct, it's actually how English works.
What happens in this specific case, is that these are all examples of incompletely verbed nouns. You don't say "setupping" you say "setting up" and that's because the phrasal verb form is still in common use. Once it goes away, we'll all be saying "setupping" and a few internet grammar nazis who are caught in a linguistic time warp that's literally decades behind every other person around them will get all hot and bothered that people are participating in these completely natural linguistic processes.
Verbing weirds language.
Where is the evidence supporting the belief that we'll all be saying "setupping"? Not once have I ever heard anyone use the words "setupping", "loginning", etc.
I posit that the use of "setup", "login", etc. as verbs is simply the result of people not knowing how to spell. In other words, it's a change that's driven by (poor) writing, not speaking.
I think it's far more likely that people will start writing "settingup" than they'll start saying "setupping".
Something linguists stopped doing a very long time ago is trying to logically set rules for how a language should evolve and started observing how they actually evolve.
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&e...
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&e...
https://www.google.com/webhp?sourceid=chrome-instant&ion=1&e...
They might one day be accepted as grammatically correct because they are overwhelmingly being used like that, but that day hasn't yet arrived ;)
There are quite a lot of sites with buttons labelled "login" or "logout" (HN is one!) which I always thought should read "log in" and "log out".
I suppose the language is heading this way though, so I'm sure we'll consider these things to be grammatically correct eventually, if we don't already.
obj.SetUp() or obj.Setup() I'm indifferent to, but (mostly) there's no additional info gained by appending "instance" to it.
I say mostly because sometimes code could pass bound instance methods around for others to invoke alongside other functions.
And also: what on earth is the author proposing the methods be named then? Rename "setupInstance" to "setInstanceUp"? In what way is that clearer or more readable? And really, "setup" and the like have become verbs through usage already. Which would you be more likely to say?
1. Can you set a new user up for me?
2. Can you setup a new user for me?
For me, #1 sounds awkward, #2 sounds more natural. Similarly for cleanup, teardown, and other common computer tasks.
Can you set up a new user for me.
Maybe the problem is that the OP thinks that the rules of English apply to computer languages.
"Set up", "clean up", and "tear down" are used all the time in modern English, without interposing the direct object between the words, e.g.:
"Let's set up camp here."
"Clean up your room."
"Mr. Gorbachev, tear down this wall!"
So maybe if we were following the rules of CamelCase strictly, it would be setUpTestCase() or similar, but ultimately as long as what is meant is clear IT DOESN'T MATTER.
A better name for the former would be TestCase.Setup(), and a better name for the latter would be GetSetupTestCase().
One of the first comments on 'setup' on m-w.com is "most people think this spelling can be used as a verb".
Check back in 15 years and see where we stand :)
"I set up the computer", not "I setup the computer".