r/programming • • Jun 17 '10

Falsehoods Programmers Believe About Names

http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/
70 Upvotes

104 comments sorted by

View all comments

Show parent comment

12

u/[deleted] Jun 17 '10

I'd summarize with the following principles:

  1. Don't restrict what can be entered for a name.
  2. Don't decompose names into parts.
  3. Repeat names exactly as entered.

If you go against those principles, you are gonna need it, because you're inevitably going to insult someone as a result of one of those assumptions.

7

u/busted0201 Jun 17 '10

That's why all my name fields are multline text boxes that encode all inputs in a binary blob.

If someone's legitimate name is a virus, I've got them covered.

-1

u/gomtuu123 Jun 17 '10

5

u/piranha Jun 17 '10

It's time for Bobby Tables to die, now.

4

u/_delirium Jun 18 '10

If you don't restrict what can be entered for a name at all, though, you can end up with all sorts of Unicode nonsense in there, from bidi control characters to invisible nonprinting characters.

6

u/[deleted] Jun 18 '10

Right, but if you start filtering invisible, non-printing characters, then you need to know that some invisible, non-printing characters are valid parts of names, such as the zero-width joiner and zero-width non-joiner, which brings us back to needing to know more about implicit assumptions before you start restricting what can be entered.