Archive for the ‘ Interesting ’ Category

A Series of One Sided Conversations

Once upon a time my wife’s phone broke. A replacement had to be ordered, so she was issued a loaner phone for a week. When we were playing around with it I was surprised to find that the previous user(s) of this phone had not deleted the incoming text message history before returning the loaner to the store. There was no outgoing history, no address book, no photos, but there was a large repository of incoming message history.

This was an older “dumb” (regular?) cellphone so it didn’t have threaded conversations, just a few hundred text messages sorted in chronological order. After reading the first few messages I couldn’t help myself; I was enticed. I couldn’t stop reading it! It was like discovering an exciting new author and not being able to put the book down. I found this interesting for a few reasons:

  • Firstly, for anthropological reasons. It was interesting to see how other people communicate. I had no idea who the sender of the message was (i.e. with no address book there were no aliases for the phone numbers). I didn’t know what their name was, whether they were male or female, young or old, where they were located, etc. Reading the message history was like peering through a one way window into a room full of anonymous strangers.
  • The second reason I found the message history interesting was because there was no sent message history. All of the messages made up only half of the conversations. I had to fill in the blanks. I had to imagine what might have been said (or not said) by the user of the phone between replies.
  • And third, because in most cases the grammar was so atrocious, even by text message standards! Since I didn’t know how many people had used this phone I wondered whether a lot of people communicate like this (i.e. all the friends of dozens of users) or whether only a small population of people (i.e. specific friends of only one or two users) communicate like this.

I decided to transcribe the dialog before we had to return the loaner so I could read it again on a rainy day. Today is that day, and I have it here to share with you too, dear reader! I’ve broken the dialog up into “chapters” so it reads more like a short story, but you can interpret it however you want. Does this hold your attention the way it held mine, or do you get bored and stop reading quickly?

Just to be clear, I didn’t change anything at all except for masking the phone numbers and replacing one hyperlink with “[SPAM].” All grammar, punctuation, capitalization, spelling, symbols and formatting are exactly as it was on the phone. Here it is:

Confessions of a Loaner Phone

.NET Math.Round() #EPICFAIL

Consider this: you have a number, say 392.865, and you want to round that number to two decimal places. The resulting value should be 392.87, right?

Well… well, yeah… let me just gather my breath for a second here…

If you’re using the .NET framework’s Math.Round() method then boy do I have a surprise for you! The result of Math.Round(392.865, 2) will be 392.86.

This is because .NET uses “banker’s rounding” by default.

You think I’m joking don’t you?

I should be joking, but I’m not… see MSDN for confirmation.

I’ve been writing .NET code for 11 years and I never knew about this until today. I wonder how many calculations (not just mine, but everyone’s around the world) have been and will continue to be incorrect because of this default behavior?

You have been warned.

#MindBlown