|
There is a small change in the specs, we now have two more optional (middle?) initials. Please adapt your code...
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
I actually know two people with 5-letter initials (they each have double middle and double last names).
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
Here it is pretty normal to have several "first names", in Dutch we actually call them firstnames (plural), although first, second, third, etc. would be more logical. I have four. So we don't really have a middle name or middle initial, when you ask me for a middle initial you'd get three of them. And all that is without double or composite names.
How about the code?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: How about the code?
Ok, I'll construct the N-name control. The user can enter any number of name parts, and select (from a drop-down) the type each name part is. It will look a bit like this:
[First v] _________
[Middle v] _________
[Last v] _________
[Freak v] _________
[Add Name Part]
Of course, there will be validation rules (e.g., last names cannot appear before first names). Happy now?
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
No
(yes|no|maybe)*
|
|
|
|
|
AspDotNetDev wrote:
Of course, there will be validation rules (e.g., last names cannot appear before first names). Happy now?
No. In Bavaria, the "family name" (which is called the "last name" in English) comes first. Also Hungarians do it this way.
|
|
|
|
|
Then I'll add "Family Name" and "Given Name", and they will not have the same validation rules.
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
Hmmm. This looks to be a Power-ful example for making a case for compiler localization: if you want an executable for say Tagalog, just change your display language in VS and re-compile. The compiler would pull in different rules for name construction based on Phillipine conventions. Then voila! You have no need to re-write your logic.
|
|
|
|
|
The multiple names is not SOOO uncommon here in the U.S.A. anymore either.
The nanas were arguing about the middle name for our second daugher, so we just gave her "Amber Ann" as the middle name!
|
|
|
|
|
AspDotNetDev wrote: 5-letter initials
In Spanish speaking Latin America (maybe all Spanish nations?) you have two last names - your father's first last name and your mother's first last name. When a woman marries, they add their husband's first last name on to their name (so my wife has five names, excluding the 'del' and 'de'). Our niece already has five names so when she marries she'll have six names!?
You think this is strange but every time they ask for my surname they wait for me to say a second one and I have to explain to them I'm British and don't have a second one; they think I'm the crazy one!
|
|
|
|
|
I think it's very weird in some countries there is the culture of splitting First and Last names. Some web sites/places don't even have middle name field.
I wonder why this is, here in Brazil it's always one field for the name only. Is there any need for splitting the names? I find it more confusing only. Worse for the websites that have only first and last names. Do I use:
"Franco, Fábio dos Santos" or "dos Santos Franco, Fábio". Here everywhere, it's only one field for registering anywhere, field splitting were never missed.
|
|
|
|
|
It can be useful to split names. That way, companies can send you emails and address you by your first name (or given name, or whatever name part it is common to address people by in a given region). So, they can say "Dear Joe" rather than "Dear Joe Blo III". It is also useful to let the user know that all portions of the name must be entered. For example, if entering credit card details, it is a handy reminder to users to have first/last name so they know they must enter their whole name. While unfair to those with different naming conventions, first/middle/last is the standard for English websites (some add title and others, but the main thing is first/middle/last). It might be best if they allowed for a toggle, so you could switch between first/middle/last or just "full name".
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
AspDotNetDev wrote: companies can send you emails and address you by your first name
someString.Split(' ')[0];
AspDotNetDev wrote: let the user know that all portions of the name must be entered
lblName.Text = "Full Name:"
I know that name splitting has it's usefulness, like displaying in formats like "Last, First Name" the way the user wants, but I believe single field names benefits outweighs by far the benefits of multiple field names. Not only on the functional perspective, but also on development. It's much simpler to have only one column on the database to hold a name.
A better solution would indeed be a toggle, but then, that adds overhead to development.
|
|
|
|
|
How would your code handle a user who enters: "Mr. Fabio Franco, Ph.D."?
Or how about these:
- "Mr Fabio Franco, Phd"
- "Mr Fabio Franco the first, phd cna"
- "Mrs. Fabio Franco"
- "Fabio Franco, Mr"
- "Fabio Franco III"
- "Fabio"
There is quite a bit of variation out there, and I'm sure more variation I don't know about in other cultures. Users do funny things when you let them (try to) think for themselves.
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
I get what you mean, users thinking by themselves are not good , but I think design can solve those issues :
Title:
Full Name:
Again, it works so well here that I'm still to find a place in .com.br domain that asks for a multi field name.
I don't there's magic bullet for anything, but I still believe that my argument stands, that single field names benefits outweighs multi-field names.
I think in US is more of a culture of "most do this way, so we're not changing", although I've seen several single field name cases already.
|
|
|
|
|
Yeah, while the forename-surname thing is kind of fair enough for many applications (most of us do work in English language countries), even in those, lots of people have more than one middle name.
|
|
|
|
|
|
I physically feel sick
I may or may not be responsible for my own actions
|
|
|
|
|
AspDotNetDev wrote: Dim firstEmpty As String = String.IsNullOrEmpty(firstName)
String.IsNullOrEmpty returns "bool"... How are you assigning it to a string variable..?
|
|
|
|
|
*grumbles* bloody VB *grumbles*
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
I had completely forgotten about Option Strict On ; it's been years since I had the misfortune of writing in VB. Implicit conversions can be such a waste... At least it wasn't using loose variables.
|
|
|
|
|
Blame VB? That's hardly fair. Crap code can be written in any language. I believe the above is more a reflection of the coder, not the language.
|
|
|
|
|
Sure it's fair. VB didn't show a compilation error. It is happy enough to do implicit conversions that the programmer didn't intend.
Though, that can be turned off. Will have to remember to do that for all the VB projects at my company. I'm a little afraid of all the errors that will result.
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|
|
I agree 100% that implicit conversions should not be allowed. If there was no way of disabling that then VB would suck, but since that can be controlled then I'm still not clear on why VB is to blame? That's like blaming a car for being in an accident because the brakes didn't self-engage... the tools are there, blaming VB for not knowing how to use them just doesn't make sense to me.
Besides - implicit conversion is not really the worst part of the function, is it?
|
|
|
|
|
G-Tek wrote: implicit conversion is not really the worst part of the function, is it?
That would get my vote for worst part. What part of the function would you vote worst part? Maybe we should suggest a Code Project survey.
This is not the age of reason, this is the age of flummery, and the day of the devious approach. Reason’s gone into the backrooms where it works to devise means by which people can be induced to emote in the desired direction.
|
|
|
|