3 ms·
There was another one I saw where you could order a dollar burger, then order another ten burgers without the burger, and because of how the kiosk software calc
by thrower123 7y ago
There was another one I saw where you could order a dollar burger, then order another ten burgers without the burger, and because of how the kiosk software calculated the "no burger" modifier, the total came out to $0.
https://www.usatoday.com/story/tech/2019/04/08/11-free-burgers-these-friends-reportedly-hacked-mcdonalds-kiosk/3398623002/ https://www.usatoday.com/story/tech/2019/04/08/11-free-burge...
- WalterBright 7y ago> There was another one I saw where you could order a dollar burger, then order another ten burgers without the burger, and because of how the kiosk software calculated the "no burger" modifier, the total came out to $0. This looks like the software was missing some internal sanity checks. For example, it was hammered into us at Caltech that any answers we derive need to be sane. If an energy value turned out to be negative, we would have to note on the solution something like "the negative value is clearly wrong but I don't know where my mistake is" or we'd get not just zero credit on the solution, but a negative credit. Software should have the same sort of checks. It's called "contract programming", the simplest manifestation of which are asserts.
- orf 7y ago> Software should have the same sort of checks. It's called "contract programming", the simplest manifestation of which are asserts. A wrong answer is wrong, but the correct response isn't always to fail. Imagine you added this and that caused 0.01% of orders to fail for 10 days while you debug the issue. Perhaps your assert is only stopping a 1 cent deviation from the correct order total - is it better to prevent 0.01% of orders in their entirety or have the absolute correct order total? Also a value of $0 is a perfectly valid cost for food - maybe they are using a voucher, or some loyalty points, or something else. The Uber eats integration with McDonalds seems to print an order that costs £0.
- WalterBright 7y agoDetected failures should bounce it to the cashier to ring it up. All the McD's I've been in with a kiosk also have a human cashier to help anyone with problems. > or something else Easy to account for it. BTW, the entire reason for the invention of double entry bookkeeping is to detect errors, not throw up hands and say it can't be done.
- orf 7y ago> Detected failures should bounce it to the cashier to ring it up Assuming a minor deviation from the real order cost that ends up being more expensive than swallowing the difference and continuing with the order, and it also increases the number of abandoned orders at peak times. Either way you’re paying a dollar to save a cent. Because you don’t know what the true value should be (else you have no bug) it’s very hard to choose the correct course of action. I’d argue that attempting to detect unexpected deviations and adding friction to fast food orders could backfire massively at McDonalds scale
- WalterBright 7y agoUsing sanity checks in software is normal practice, especially in software that calculates critical things. It works. > I’d argue I'm sure if you put some effort into thinking about how to make it work, you'll be successful.
- orf 7y ago> Using sanity checks in software is normal practice, especially in software that calculates critical things. It works. Literally the whole point, that I've repeated to you 3 times now, is that a single cent is not critical if it means losing the entire order. This isn't a rockets trajectory or a an MRI scanner, it's a glorified tablet selling high-volume impulse food at a good markup, so stop pretending as if the context doesn't matter when discussing things.
- WalterBright 7y ago