Searching for Algorithms

So I need help. I really think I’ve been programming far too long.

I have a Diet Coke addiction – actually it’s an Aspartame addiction, and while you might think that would be what I need help with (and it probably is) – that’s not what I’m writing about.

See, I go to the vending machines to satisfy this addiction a fair amount. Enough that you begin to recognize the patterns of the machines. Inevitably during the summer, because there’s fewer students around, the vending powers that be fill the machines less frequently, and the machines seem to suffer more “malfunctions” of various types.

Well, normally, when you use the dollar portion of the machine, if you want your change back, it will give you your dollar back. Some time back, I noticed that if you put your dollar in, pressed the button for a sold-out selection, and then wanted your change back, you’ll get coins.

I noticed this after doing that once or twice.

This has now come in quite handy that the dollar bill acceptors on the the 20oz machines are malfunctioning, but work on the 12oz machine. The Diet Coke on the 12oz machine is sold out, so I go to the 12oz machine, put the dollar in, press the button, return change, and use the change for the 20oz machines.

Voila! Real-life algorithms. Who says that 4 years of Computer Science wouldn’t come in handy one day?