I went with my cousins to the Denver Parade of Lights on Saturday night and had an interesting run in with some technology there. We drove down because it was a bit cold outside and we didn’t want to wait for a bus with Eliot (our 2 year old). Parking was easy to find and fairly inexpensive.
After waiting in line for 10 minutes to pay for parking, I finally make it to the head of the line. There is a big green button that says, “Press to start” and in smaller letters underneath is says, “press again to add time.” Above me there is a large sign that dictates the rates of this parking lot. I went back on Sunday to snap a shot of the sign.
This seems pretty simple. During the day you can only be charged $6 and at night you can only be charged $10. If you just want an hour, it’s simply $3. Seems pretty straightforward to me. We arrived at 5:15PM and so we were in the evenings block and it should cost $10.
So, I naturally hit the green button and then quickly insert my credit card and 2 minutes later (must be using a modem) I have my receipt. I look down at the receipt and notice that I’ve been charged $13 dollars. I ask the attendant what happened and he says, “you must have hit the green button.” Well, of course I hit the green “start” button. As it turns out, this payment device has so many bugs that I just had to share.
1. In the evenings or during special events it isn’t necessary to hit the green button. The machine is always in the “ready” state.
2. If you hit the green button during these times it adds additional hours to your bill. Since the evening rate is $10 and the hourly is $3, hitting the green button makes your total $13.
3. The machine is not programmed to realize the maximum limit of the current purchase. It will happily charge you $31 dollars if you hit the button 7 times.
So, what’s the moral right? The moral is test edge cases. The programmers for this device should have realized there are different maximums at different times during the day. This should be easily set by an administrator and probably changes infrequently. The machine should never allow anyone to add more time than the maximum allows, especially for fixed rate times such as 4PM-6AM. The main test cases would ensure that all the buttons work, the addition of money works, the credit card routines work and all that Jazz. The edge cases are all the little things like adding too much time at 5:15PM or having buttons whose function changes without warning or notice.
Just remember to test the edge cases. They usually end up being the worst bugs and cause the most headaches.