Friday, May 22, 2009

Pair Programming

I've recently found myself a new late-night programming buddy.

He generally hangs out in a chair next to my desk, a vantage point which allows him to make frequent comments on the quality of my work.

His name is Brendan Javier Michael Smith, and he joined our family last Wednesday. He's about as cute as they come, even if he's not (yet) much of a coder.

See here and here for more pictures.

Friday, May 8, 2009

Asynchronous WCF Methods in Silverlight

I'm not sure whether I should love or hate a language that lets me write code like this:

   private void InitData()
    {
        RoomServiceClient rc = new RoomServiceClient(wsBinding, roomServiceEndpoint);
        rc.GetUserCompleted +=
            delegate(object sender, GetUserCompletedEventArgs e)
            {
                user = e.Result;
                rc.JoinRoomAsync(App.OwnerUserID, App.RoomName, App.UserID);
            };
        rc.JoinRoomCompleted +=
            delegate(object sender, AsyncCompletedEventArgs e)
            {
                rc.GetRoomAsync(App.OwnerUserID, App.RoomName);
            };
        rc.GetRoomCompleted += 
            delegate(object sender, GetRoomCompletedEventArgs e)
            {
                UpdateLocalState(e.Result);
            };
        rc.GetUserAsync(App.UserID);
    }