this post was submitted on 23 Jan 2025
476 points (99.6% liked)

Mildly Interesting

17855 readers
1 users here now

This is for strictly mildly interesting material. If it's too interesting, it doesn't belong. If it's not interesting, it doesn't belong.

This is obviously an objective criteria, so the mods are always right. Or maybe mildly right? Ahh.. what do we know?

Just post some stuff and don't spam.

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] undefined@lemmy.hogru.ch 111 points 1 week ago* (last edited 1 week ago) (32 children)

As a developer, users doing dumb shit like this really makes me question why I’m trying to help make life easier for them in the first place.

I have a shipping web application with fields that every shipment should have, for example “tracking number.” These people will prefix the value with “PRO#” or “#” as if the field isn’t already labeled correctly. I’ve fought for years with validation, sanitizing, etc. because having this junk data causes issues further down the line.

The same goes for other similar fields (reference numbers for example); they’ll also do everything they can to fuck up the address as much as possible so that it can’t be validated (unit number first, completely mismatched city and postal code, putting the street in a field that doesn’t belong to the address, etc).

I always try to give them the benefit of the doubt—they’re not developers. But is this something like, hard to understand for normal people? I’ve talked to them several times yet they can’t be fucked with to change their ways.

[–] bestboyfriendintheworld@sh.itjust.works 2 points 1 week ago (1 children)

people will prefix the value with “PRO#” or “#”

Sanitizing input afterwards is a good practice and trivial for these cases. For data with a known format like here, you should always strip for example spaces in any case.

Writing three lines of extra to allow more flexible input is easy and will make it much more user friendly. Far easier to make a software more intelligent than educate and train all users.

[–] undefined@lemmy.hogru.ch 3 points 1 week ago* (last edited 1 week ago)

Ha! Been there, done that. You’ll find that they’ll continue to find ways to trick the system.

Now I get input like “*PRO”, so I have to block any string that starts with any non-alpha characters stripped + pro (case insensitive). You’d think you could just strip out all non-digits and match “pro,” but some carriers actually have letters so next you try to match any string starting with “pro” (case insensitive) after already stripping out non-alpha characters, but then you’re screwed if the string contains the letters P, R, O at all.

It’s a cat and mouse game, but it wouldn’t have to be if people would use their brain to understand the system doesn’t need you to tell it which field you’re entering when it’s clearly labeled already—just use your brain and input the correct fucking data.

But more to your point, you’re right. I let users input phone numbers however they damn well please and if I can’t standardize the formats and figure it out then finally I can show an error but 95% of the time that’s not the case.

load more comments (30 replies)