title image

journal.nullschool.net


Archive for June, 2005

It looks better if this post has a title so…

Monday, June 27th, 2005

Walking through Times Square today I overheard one woman to say to another woman, “turquoise is the new pink”. They were accompanied by their daughters, and all four of them were wearing… turquoise shirts.

“x is the new y”. I guess it’s everywhere these days. Commenting about it seems to be in fashion, too. So, naturally:

meta x is the new y is the new x is the new y

Damn, now the cat’s out of the bag:

meta meta x is the new y is the new meta x is the new y is the new x is the new y

I should stop now.

New York, New York

Friday, June 17th, 2005

WTC ArtTimes Square

Just last weekend, I moved to a new apartment in Kichijoji, 15 minutes west of Shinjuku. My apartment is now sitting alone, a few boxes scattered throughout its interior. I’m in New York.

I’m in New York on a business trip with my manager. The company I work for is building an American team of developers for a big project we’re bidding on. I’ve never been to New York, and the decision to leave was made so quickly that I didn’t have much time to think about it. Already, a few days into the trip, it’s been quite an experience. It all started on the plane.

Flew on Northwest Airlines from Narita to NY on Wednesday. 12 hour flight. Sitting in my row was a woman who boarded late and claimed I was in her seat. Not true–she had the window seat, not the aisle. She wore a yellow and green baseball cap pulled low with a button on it that said “Candy”. Her friend came by a little later–he sat between us.

Near the end of the flight, we started chatting. I asked what they did for work and her friend said, “well, she’s a famous DJ.” Well, DJ Kaori to be exact. Wow, I’ve actually heard of her. The guy was her makeup artist. She does mostly hip-hop music, and while not necessarily my thing, I was interested to take up her invitation and check out her show later that night, assuming the jetlag didn’t knock me out first.

The hotel I’m staying at is not the greatest hotel, by far, but the location is excellent–about one block from Times Square. For dinner my manager and I went to Uncle Nick’s for some astonishingly good Greek food, including a feta cheese appetizer that made me wonder if the goat was kept somewhere in back.

Afterwards we met up with the manager of our American team. He took us out to Bond 45 for some drinks, one of those places I always imagined a New York dinner club would look like. To get there, we walked through Times Square while the clouds came in and cast a pale haze over the buildings and (incredibly) bright billboards.

Just about this time my jetlag kicked in, but I persevered and walked down to Club Shelter to see DJ Kaori’s set. On the way I saw several street artists performing their work, most of which featured the World Trade Center. I don’t think this was simply for the benefit of tourists; New York is still wounded.

Club Shelter is pretty cool with several wooden dance floors and the rooftop open for getting a breath of fresh air and hanging out (they have a bar up there, and even a mirror ball suspended in air on wires).

DJ Kaori’s set started around 1 am or so. She looked completely different, radiant. Her makeup artist does good work. I went up to say hi and watch her work, spinning the records up in quick succession, matching beats and calling out to the crowd. Fascinating art form (see Scratch). At this point, my jetlag decided to kick my ass, and I headed back to the hotel.

Thursday was a marathon meeting with the American development team. We went to dinner afterwards at Bar Americain, the restaurant opened 7 weeks ago by Bobby Flay (who was there that night). If I could eat food like this everyday, I think I would die happy. New York is not Tokyo.

useful IIf for Visual Basic 2005

Wednesday, June 8th, 2005

The IIf statement in Visual Basic is a pain when Option Strict is on. The reason is that the return value is Object and thus requires a cast back to the target type:

    Dim a As Integer = IIf(SomeCondition(), 10, 20)
    Error: Option Strict On disallows implicit conversions from 'System.Object' to 'Boolean'.

To fix the compile error, you need to add a cast:

    Dim a As Integer = CInt(IIf(SomeCondition(), 10, 20))

Even worse, use an enum:

    Dim b As Color = CType(IIf(SomeCondition(), Color.Red, Color.Blue), Color)

But by using generic methods and type inferencing, you can create a version of IIf that eliminates the need for the cast:

    Function IIf(Of T)(ByVal Expression As Boolean, ByVal TruePart As T, ByVal FalsePart As T) As T
        If Expression Then Return TruePart Else Return FalsePart
    End Function

Then the above examples could be written as:

    Dim a As Integer = IIf(SomeCondition(), 10, 20)
    Dim b As Color = IIf(SomeCondition(), Color.Red, Color.Blue)

Much nicer. And also much faster because we avoid boxing the parameters and unboxing the result. Now if only IIf could be massaged into a real ternary operator…

The View from my Desk

Sunday, June 5th, 2005

view from my desk

As a student at Yamasa, you tend to develop surprisingly consistent classroom drinking habits. A friend of mine drank Royal Milk Tea everyday for lunch whereas another would, with great fanfare, crack open a can coffee at the exact moment first-hour class would finish–everyday. A guy from Canada always drank Top Valu apple juice boxes. Yet another would bring a thermos full of coffee and sip it from a cup with two hands while leaning against the window. As for me, I would run down to the vending machine to get a Georgia brand Cafe Latte, manufactured by the Coca Cola company. I’m beginning to think they put crack in it. It’s been two months since I left Yamasa and I still drink the damn thing…

Also in the picture is my electronic dictionary (電子辞書). Yay.