Michael has had to write a program for his computer class. Basically, it had to throw up a menu and ask the user how many items they would like to order. It would then calculate the amount owing, allow the user to enter the amount of money, and calculate the change (or amount still owing). Nice, simple program to introduce the students to *ahem* Turing. (Well, better than nothing, I suppose.)
He asked me to try out his program. The first input asked how many brownies I wanted. I entered 1.
For the next menu item, I entered 0.
Of course you can guess what I started doing for the rest of them. I gave him a look out of the corner of my eye. For the next I entered -1. He grumbled a bit. It took it.
For the next I entered 9999999999999999999999999999999999999999999999999999999. It took that, too.
For the last, I entered “xiefjeis”. It crashed. That’s when his grumbling turned into very audible complaints…
Me: “You have to check for stuff like that”
Michael: “Why would anyone ever declare an integer, then???”
Me: “Input it as a string and make sure it’s a number. Then you can convert it to an integer.”
Michael: “You’d have to be a RETARD to enter something like that!!!!!”
Oh my god. How precious. I wish I had a recording. He doesn’t know anything about real users.
Reid came over to try Michael’s program. Michael had already changed it. When Reid tried to enter “-1”, the program output “Try again, retard.”
When it asked for the amount of money you were going to pay, Reid entered $4. Hah. Program crashed. I think Michael’s pissed at us now.