Bug in my laundry swipe card
So, I had a balance of $0.75 in my laundry card and I went confidently to the laundry room to put my clothes go through the torturous dryer once again. The cost of dryer is $.50. Any normal human being would think that 50 < 75 and so it should magically work. But guess what, I got a nice error message saying “INSUF FUNDS”!!! zkupbneygouiegashab???????
I am trying to think, what the engineer who wrote that piece of code was thinking? Or wait, may be it is configurable in which case what was the person who has control of configuring it thinking?? Seriously, what is it? Here are some things I can think of.
1. if(fundsInCard < 1.0) {
print “INSUF FUNDS”;
}
Seriously, if this is how it is coded, there is only one option. Fire that guy who wrote this.
2. Now, with inflation the costs go up. So, in the next 6 months the price for dryer might be $1.00. So, they just configured it for $1.00??? That doesn’t make any sense. But hey, I am just brainstorming here.
That is all I can think of. If you know what could have gone wrong, where the bug is, let me know. May be the owner of that card reader company will read my blog and post a comment. May be the guy who wrote the code or may be the person who configured it will post a comment. hmm .. what are the chances of that happening. Let’s see. On average, there is one comment per post on my blog. That means, there might be a grand total of “1″ comment for this post. Now, taking into consideration that the owner, configurer, coder is just one out of say 5000000 people in this counry and the considering the chances of him reading blogs at the first place and then considering he bumps into my awesome blog, the probability is pretty close to “ZERO”. Feel free to correct me if I am wrong.
On that note, have a good day!
Mahesh Murthy
Dear brother,
If you keep thinking so deep on the code and the guy who wrote the code…..probability of you going nuts is extremely high!! aaaaaaaaaaaaaargh!