
Falsehoods Programmers Believe - manx
https://github.com/jameslk/awesome-falsehoods
======
jmnicolas
A couple years ago, a user of one of my software told me "I can't find some
customers in the software, when I type their name nothing happen. It seems it
only happens with the new Chinese students!".

Those Chinese customers all had 2 letters last name (mostly 'Xi' I think) but
when I developed the software I thought any last name would be at least 3
letters long and to avoid taxing the database, I didn't start autocompletion
before 3 letters where entered in the textbox.

Now the search starts at 2 letters, but I fully expect to find a one letter
last name customer before retirement ;)

~~~
beatgammit
Depending on how you encode names and what you define as a "letter", many
Korean last names are single characters (Lee: 이, Park: 박, Kim: 김), though
they're usually transliterated into multiple letters (Oh, not O). Every Korean
"character" has multiple "letters", but they treated as one entity most of the
time (like Chinese characters).

Personally, I wouldn't risk it and would just make single character lookups
reasonably fast. I doubt the number of relevant records exceed 100k, so the
savings shouldn't be significantly enough to bother with. However, I've seen
worse things done with poorer justifications.

~~~
jmnicolas
All the names are transliterated in Latin alphabet, when the passports are
delivered I guess.

The system is already quite slow as is (the DB is distant and on an
underpowered server) so I don't want to tax it even more. What I may do next
change is to cache locally all names at the start of the client and hit the DB
only when it didn't find the name in the cache.

