3 ms·
> overly broad assumptions (e.g name=`${firstName} ${lastName}`) So an internal application I work on has communication between teams where first + last isn't
by jsgo 7y ago
> overly broad assumptions (e.g name=`${firstName} ${lastName}`)
So an internal application I work on has communication between teams where first + last isn't a given. So I'm constantly paranoid if I'm going to get it right (usually just don't communicate name at all, just make statements).
Fast forward to a month ago when I started working on a rewrite and while constructing the users (and actually making them users within a company instead of effectively companies themselves), I added an enum for NameOrder and separated the two fields.
Not particularly important to the application in the grand scheme of things, but geez, it feels mildly freeing that it won't be so ambiguous in the future.
- lucasmullens 7y agoNames are pretty complicated, not sure that fully covers it. Many people have multiple last names, and how do you handle middle names? I've generally heard it recommend to just have a "Full Name" text box, but that wouldn't solve your use-case, so now I'm not sure.