Thursday, November 16, 2006

Stupid Microsoft

Proof that either Microsoft is very stupid or very sly.

Saturday, November 04, 2006

Mathematical? Thinking

I stopped reading the Java API for the String class to write this post at this sentence: "If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both." There is nothing grammatically wrong with it, but logically, it caused me some very brief confusion. This statement implies that there are 3 possible differences between 2 strings: 1) at least one character is different, 2) the lengths are different, or 3) both 1 and 2. How is it possible for the lengths to be different while the individual characters are the same? It isn't--I thought about it for a while and proved to myself it just isn't.
Then I realized that that isn't what the API stated--it read, "different characters at some index that is a valid index for both strings."
"Oh," I said to myself, "Yeah."

That's not really important, but what it led me to think about is:

I think very much like I write programs. I'm not sure if this is how everyone thinks (though I doubt it), but I'm pretty sure I know several people that think in a similar manner. When I read and thought about the above statement, I set, in my brain somewhere,
condition1: at least two characters are different
condition2: the lengths are different
A flag sprang out somewhere above my left temple, and I wondered why the API didn't read: "If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different and [insert condition1]". Then I read over the actual wording for the first condition and realized that repeating it would almost double the length of the sentence.
"Oh," I said to myself, "Yeah," but this time someone else retorted: "They could have actually written, 'condition A."
"Maybe, but that's kinda vague. I'm not sure it would be clear to everyone," I said skeptically.
"It should be if they're thinking like they should be if they're reading the Java API."
My tumbling thoughts wrestled this one a bit before I realized I couldn't argue, but I wondered if thinking like that is common or if it has a name.
I thought about it some more, rid myself of the association to computers, and applied one to math. This manner of thinking is the reason I usually understand new mathematical concepts easily. For example:
In algebra: if x + y = 4 and x + 2y = 5, then y = 1 and x = 3. When I read this problem and start to figure it out, I see, in my mind's eye, two shapeless, colorless blobs, representing the variables x and y, which bounce around and interact to first isolate one and then substitute it back into the equation to find the other one. Sometimes blobs represent numbers or digits in a number or variables or anything, really.

Mostly, thinking about how I think made we wonder if other people think like I think and realize that I know people who I think think like I think. Any thoughts?