magfest / ubersystem

MAGFest's Ubersystem - handles ticketing, staffing, analytics, volunteers, and tons more
http://magfest.org
GNU Affero General Public License v3.0
48 stars 55 forks source link

Validate manually-typed badge numbers during check-in #2338

Open kitsuta opened 7 years ago

kitsuta commented 7 years ago

Although barcode scanners are expected to help prevent typoes of badge numbers during check-in, we should also have a way to help prevent typoes even if you type a number manually. We can use a luhn check, which is a single number digit at the end of a number (also used in credit cards), to help verify that someone didn't accidentally type the wrong badge number.

This needs a bit more discussion, particularly in terms of where this number would be required vs not required and how or where it might be printed on the badge. My thought is that the full badge number with luhn check would be printed in small letters underneath the barcode (where the barcode code is now), with the normal badge number in big letters elsewhere on the badge. It would also be used only during check-in, at least at first. @rscullin also has opinions, as he suggested this in the first place.

thaeli commented 7 years ago

https://github.com/arthurdejong/python-stdnum

This wouldn't be used by all events, but I'd like to see it used as much as possible. Damm or Verhoeff are the best algos apparently (even better than Luhn) at the expense of "a computer needs to calculate them" vs. Luhn that's easy to do by hand. Seeing as how we are a software project, I don't think that is a required use case for us.

thaeli commented 7 years ago

I've been experimenting with this. If we add four digits to the numbers, we can actually correct up to two digits in error. This would also cover transposing two numbers. I don't think this is worth making the numbers that much longer but it's pretty cool.

With a single check digit, the number of valid possibilities (basically, adding every "error" to the number and testing if it's now valid) is reasonable - I'm still implementing some of the less common data entry errors but with the most common ones in, valid "guesses" are returning less than 10 possibilities. Especially given that we could often eliminate some candidates simply because they aren't valid, checked-in badges, possibly filtering on badge type, approximate age, etc, this narrows your search space considerably.

The main use case I can think of for needing to correct a badge number would be Security looking up a reported badge number. Anywhere it's data entry, we can just ask the user to type in the number again.

kitsuta commented 7 years ago

Yes, I was thinking of a check-digit as only being used during check-in. The quantity of badge numbers our volunteers type during check-in is a few dozen times higher than the quantity of badge numbers our security staff deals with, so I don't think they'd need to use that check-digit. So basically, the idea is that volunteers checking in badges would type "badge num + check digit" and everyone else would continue using just "badge num."

thaeli commented 7 years ago

Archiving a few other links I was looking at here.

https://books.google.com/books?id=Zr9bjEpXKnIC&pg=PA36#v=onepage&q&f=false https://www-users.cs.york.ac.uk/~pcairns/papers/Wiseman_HCI2011.pdf