October 21st, 2007

duke-school

Brain Tricks

I was writing a little school exercise that alphabetizes the days of the week. I ran it, and the output looked weird. I knew it had to be wrong.

Then I looked at it more carefully, and realized... it was correct. It's just that the order of the days of the week is so ingrained in my head that it looks completely Wrong for friday to come before monday! It's like they are numbers. They have their order already, and it's not alphabetical.

So I added a few new days of the week, to make the output easier to read and believe.

Unsorted: Sunday Monday Tuesday Wednesday Thursday Friday Saturday Appleday Zebraday Doomsday Humpday Alpacaday
Sorted: Alpacaday Appleday Doomsday Friday Humpday Monday Saturday Sunday Thursday Tuesday Wednesday Zebraday

Later I was mulling over this mental phenomenon, the fact that alphabetizing a list can remove order instead of imposing it. "The problem is that days of the week are like numbers," I thought. Then of course I wondered - what would an alphabetized list of numbers look like? Good thing I have a handy little program that alphabetizes things.

Unsorted: one two three four five six seven eight nine ten eleven twelve thirteen
Sorted: eight eleven five four nine one seven six ten thirteen three twelve two

Those look really wrong to me too. It's hard to read them as letters, not numbers, and acknowledge that they're really in the correct order.

It reminds me of a brain-teaser I've seen in a few places, where the words of colors are colored incorrectly. It can be hard to say the color of the text, instead of reading the text. Like this:

blue yellow purple green black

Interesting how the brain works!
duke-juggle

(no subject)

Oh dear, I think I might be getting a cold. How did this happen? I don't know anyone who's had one recently. I don't have time to be ill right now.

Maybe it's a phantom cold. Maybe it'll disappear by tomorrow, just my body's way of trying to get sympathy instead of finishing homework like it's supposed to be doing.

Don't feel good. Need ice cream.
duke-juggle

Three Down

int main() {
  do {
    me.workHardIsh();
  } while (! workFinished());
  me.celebrate("Yay final is done!");
  me.sleep();
  return 0;
}


Yay final is done!