Stop #@$!ing up my last name!

My last name is not:

  • Braun-jones
  • Braunjones
  • Braun Jones

Yet those were my options according the the person responding from info@reunion-specialists.com. I fully understand the problem they face1:

Sorry about the limited options, alumni were entering their names with all caps or all lower case and the name badges looked terrible so we wrote this rule to keep things as consistent as possible.

But their solution is pathetic: always capitalize the first letter and any subsequent letter that is preceded by a space. Since the support contact at Reunions Specialists was completely unapologetic and not even willing to fix my name by hand, I decided to stop for 15 minutes and spoon feed the webmaster of the reunion-specialists.com. A very good (but not perfect) solution is not difficult to design if you just realize that (1) virtually no surname consists of all lowercase or all uppercase and (2) almost all mis-capitalization is due to the use of all lowercase or all uppercase. So, if the entered surname contains mixed case, the user probably meant for it to be that way. If not, do your best to guess the correct capitalization, but since the user didn’t even care enough to type it right, don’t feel bad if you don’t get it perfect. Here’s a basic PHP implementation:

This gives pretty decent results:

  1. Well, not really. They are charging $80-100 per person to attend a high school reunion so I know they have the funds to do old-fashioned human input validation. []
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *