3 ms·
For those thinking that only a complete idiot would consume the string null vs the value null when processing form input, you're pretty much correct. Most langu
by coding123 10y ago
For those thinking that only a complete idiot would consume the string null vs the value null when processing form input, you're pretty much correct. Most languages, even scripting ones, don't rely on the value of the string, but of the value of the reference. And while there are probably many web-front ends that happily work with "null" as a field, that's likely not the issue here.
The issue that will most likely strike are all of the assumptions that your front-end team don't care about- downstream systems. This typically comes from software that is packaged for explicit purposes. In Healthcare we have things called MPIs (master patient index) and as a rule we typically have data scrubbers because in the MPI world we HAVE to work with bad data, self-entered data. We don't have the luxury of relying on primary keys for everything. Names like "Baby Smith" often comes in as the yet-to-be-named baby of the Smith family. I won't go into HealthIT 101 here, but suffice to say, we must do a lot of data scrubbing and/or annotation.
What compounds the issue even more is that most of these software components, be it healthcare or other industries, are typically resold and therefore have customers that keep piling on more and more use-cases. There are solutions to the problems, but many of them involve breaking human-end workflows (how do you tell a customer that you'll now require every patient to remember their patient ID, for example, before you admit them?). Those workflow changes tend to be non-starters and from there, the chain of never-ending bad coding compromises enter the scene.
Now I'm not defending the practice of treating "baby" or "null" or any other string as a special case, but being part of some of these workflow issues for years has led me to believe that not only are coders around the world going to continue these practices, there's not much they can do about them until more and more of our software gets more built-in intelligence. Maybe in the future we can actually detect it better when the name "baby" actually is their first name! (And actually with all of the deep learning going on lately, I'd imagine someone is building something like this now!)
All I'm saying is that it takes a broader understanding of the issue here to fully get why it's not just a front-end coder's error, but rather a deeper, as-of-now hard to solve problem. Think about when you start integrating with outside systems that don't follow your organization's understanding of a name. What about when you get into analytics? When you connect to external systems that performs mailings? Do YOU know the assumptions and use-cases that went into the platforms you're about to hop on board with? Probably not all of them.