3 ms·
You're right, but non-technical clients don't care. It's a little different to them. With a ZIP code in the US, it consists of 5 digits that form a unique numb
by noxToken 9y ago
You're right, but non-technical clients don't care. It's a little different to them.
With a ZIP code in the US, it consists of 5 digits that form a unique number for a geographical area with 4 more digits that represents a sub-area within the 5 digit ZIP. But there are no instances where there can be a letter. That's a hard fact. If you put 4308A-65XK as the ZIP, the post office or delivery service will not know how to deliver the mail without trying to cross reference address with possible valid ZIP codes.
Invalid CSV is murky, because CSV is a serialization format. That is, invalid CSV may not play well with a program that accepts well-formed CSV, but a human may still be able to parse it with no problem. Returning "invalid ZIP Code" makes sense. The client would understand that letters do not belong in a ZIP Code.
If you've never had to deal with a nightmare client of that sort, hats off to you.
- EGreg 9y agoPerhaps the problem is with the client relationship. Why not explain to the client that you will need to put in manual or custom work to clean up the CSV or batch of CSVs and charge for the extra time writing a script or cleanup? Literally the only time this may not apply is if you are writing a general purpose program.
- sametmax 9y agoYou can also have clients that don't have a working OS. But you can't fix that. You need to choose a limit after which you say "no, I won't do that, get you s* together" Well, it all depends on the money, doesn't it?