November 24th, 2009

When computer programmers dabble in making change

My colleague who dabbled in economics when deciding how many lunch vouchers to buy had a number of other money-related quirks. One of the ones that I remember is that when paying for a purchase, my colleague would double the balance and give the cashier that much money. For example, if the total was $5.20, my colleague would hand over $10.40. Why? Just to see if the cashier reacted when pressing the Enter code appeared to have no effect. Total is $5.20. Cash tendered is $10.40. Change is $5.20. Most of the time, the cashier wouldn’t pay any attention. Heck, the cashier wouldn’t even question why my colleague handed over such a strange amount of money. Sometimes my colleague would mix it up and instead add $6.66 to the total. For example, if the total was $5.20, my colleague would hand over $11.86, just to see the cashier’s reaction when the cash register indicated that the change due was $6.66.

And then one day, magic happened: The total was $6.66. Without skipping a beat, my colleague handed over $13.32.

Topics
Other

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.