In computer science, you should have a username or a user name or a user-name and a password to be able to log into the system.
Which one is the correct spelling?
In computer science, you should have a username or a user name or a user-name and a password to be able to log into the system.
Which one is the correct spelling?
The OED gives ‘username’ and has three citations, from 1971, 1997 and 2007, in support.
The correct spelling in this case is username.
The username is the (usually unique) thing you type in with your password, for example: bobsmith66.
The user name is the name of the user, the user's real life name, for example: Bob Smith. User name is sometimes used for username, but occasionally it makes a difference, so be clear and avoid the ambiguity. (Better still, use full name when you want them to enter Bob Smith.)
User-name is a variant of username, but this is rarely used if ever.
Obligatory Google Ngram:
In case the link breaks again: username is much more common these days; user-name is not used at all.
I've seen both "username" and "user name" used widely. Both are acceptable. As far as I know, techies mostly prefer "username". "User-name" just seems awkward.
userName
or UserName
or user_name
(that is, whether to use camelCase, PascalCase or whats_er_name) but several style guides additionally caution that “username” is a single word and should not be written as either of the above.
Commented
Sep 28, 2011 at 8:18
Like most things in language, it depends upon context.
If you are writing a journal for a computer science publication, username is acceptable.
If you are writing the user's manual or labeling a field, I would use "user name" since the users may or may not be well versed in computer science, and it just feels less complex.
In terms of computer science , username is mostly used as a standard. I have always used that.
The O.E.D. often defines words merely because they're commonly used, regardless of their correctness. (For example, I don't consider "LOL" or "ginormous" to be words.)
I realize that it is often used to describe "the thing you type in with your password," but that is more correctly called the user ID since it is not the actual name of the user.
In my opinion, it's a compound noun and the correct spelling is "user name" as in "the name of the user." Just because we can delete the space between two words doesn't mean we should, although plenty of compound nouns do. Language evolves, of course, and it's just as likely that we're in the middle of this word's evolution. In a few years, I may change my mind and edit this entry.
"I'd also point out that "LOL" is an initialism. Again, not a word. "
Is lol a word? Is radar a word? What about scuba and laser? Are acronyms really not words? You are correct that the OED records common usage, not "correctness", because there is no official arbiter of "correct" English.
In computer terminology use the word "username" and/or "filename", always. For variable/class names in computer coding also use "username/Username" and/or "filename/Filename" and never "userName/UserName" and/or "fileName/FileName".