Monday, May 26, 2008

Memorial Day Weekend

Tahoe Adventurer

Peace on earth. May all beings be free of suffering.

Lake Tahoe

Labels:

Saturday, May 17, 2008

Orh

Today I found out that my wife nodding and replying "orh" to what I say does not constitute agreement or even understanding of what I am saying.

Case in point: Lately it has been very hot in Mountain View, reaching over 37 degree Celsius in the past two days. Our house, which does not have any inlets except for the main door, is generally not in the direction of the wind. This causes the apartment to a furnace during hot days and starts baking the occupants - something that I start hearing about in the afternoon when my wife calls me and yelping for mercy from the heat.

One solution we found is to switch on the fan while the door is opened. The fan draws the cooler air from the outside and cools our apartment. This solution is not ideal as it leaves, well, the door open (i.e. you can't be sleeping). As an added bonus, insects get in.

I started proposing an alternate solution to my wife over lunch - use a fan to blow air out of a window, and open the other windows while leaving the main door closed. As air is being drawn out of that one window, this creates moving air (aka wind) and circulates the cooler air from outside to inside. And even if the air outside is just as warm as it is indoors, the air movement will cool the insides of the house, thus preventing baking of the occupants.

Arriving home in the evening, I proceeded to close the main door, bring the fan to the bedroom window and face it outside. My wife walks in and demands to know what I am doing. To which I replied, "trying out that hypothesis I mentioned earlier today". I walk outside to the living room and show her that cool air is starting to be circulate through the house, and say "see... it works!"

My wife exclaims: "oh is this what you were talking about over lunch? I still have no idea what you are talking about though."

Labels:

Wednesday, May 14, 2008

Canonical Strings, or, why I like Python

I needed a quick and easy function to map strings into a canonical form. In this case, punctuation, upper/lower case, and word order are not important. i.e. "!$%!@$!@!This!?! is... a test" == "a test this is". Less than 1 minute and I am good to go with...
import re
re_punctuation = re.compile(
r"[`~!@#\$%\^&\*\(\)\-_\+={\[}\]\\|;:\'\",<\.>/\?]")
def GetCanonical(input):
canonical = re_punctuation.sub(" ", input.lower()).split()
canonical.sort()
return ' '.join(canonical)

GetCanonical("This is a test") == GetCanonical("a test this is")

Labels:

Sunday, May 4, 2008

Cookie Monster Meditates

Me love cookies. Me tend to get out of control when me see cookies. Me know it not natural to react so strongly to cookies, but me have weakness. Me know me do wrong. Me know it isn't normal. Me see disapproving looks. Me see stares. Me hurt inside.


When me get back to apartment, after cookie binge, me can't stand looking in mirror—fur matted with chocolate-chip smears and infested with crumbs. Me try but me never able to wash all of them out. Me don't think me is monster. Me just furry blue person who love cookies too much. Me no ask for it. Me just born that way.


Me was thinking and me just don't get it. Why is me a monster? No one else called monster on Sesame Street. Well, no one who isn't really monster. Two-Headed Monster have two heads, so he real monster. Herry Monster strong and look angry, so he probably real monster, too. But is me really monster?


Me thinks me have serious problem. Me thinks me addicted. But since when it acceptable to call addict monster? It affliction. It disease. It burden. But does it make me monster?


To read more, click on the original article Cookie Monster Searches Deep Within Himself and Asks: Is Me really Monster? by Andy F. Bryan.

Labels: , ,