# Monday, 24 April 2006

We do a bunch of serialization from objects into various (legacy) formats, and just this week discovered a performance bottleneck I’d never anticipated (mea culpa).  Apparently Type.GetCustomAttributes(true), or PropertyInfo.GetCustomAttributes(true) are expensive operations.  When I stop to think about it, I guess I’m not surprized, but it was not something I’d ever considered as costly performance wise.  We have to pass true in a few cases, since we may need to now about inherited attributes out on leaf nodes in the inheritance hierarchy.

Anyway, some selective caching fixed a pretty sizeable portion of the problem.  The realy way to solve the problem is, not surprisingly, exactly how the XmlSerializer solves the problem:  runtime code generation.  But we’re not quite there yet. 

Anyhow, if you find yourself calling GetCustomAttributes(true), beware that it may be more expensive than you think…

Monday, 24 April 2006 14:20:11 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  | 

Vikki and I took the kids to see an “Indian Dance Ballet” downtown yesterday called Krishna Bhakti.  It was great!  Groovy costumes, great music, and some very impressive dancing.  The ballet focuses around the lives of two female saints and poetesses who were proponents of Krishna Bhakti, or love of the divine in the form of Lord Krishna.  Their stories reminded me a lot of that of Hildegaard von Bingen, a medieval German nun and abbess who was also a poetess, and whose work has become popular of late. 

The lead dancer and choreographer, Jayanthi Raman, also runs a school for Indian dance here in Portland, and many of the dancers yesterday were her students.  I’ll be looking out for future productions sponsored by Rasika, an Indian Arts and Cultural Council in Portland. 

Monday, 24 April 2006 14:12:52 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, 10 April 2006

I’m such a sucker for good TV shows on DVD.  Our latest favorite is Lost.  What a groovy show.  I love the fact that during the cource of the first couple of episodes you form distinct impressions about the nature of each character, and one by one during subsequent episodes those impressions are exploded.  A very interesting premise for a show, particularly set against the survival-on-a-desert-island background.  I also like the fact that there are unanswered questions that are allowed to linger for several episodes before finally being addressed.  It’s nice to see more TV shows taking advantage of story arc, a la Joss Whedon, and not making the assumption that your viewers are all dim bulbs who can’t remember what happned a few weeks back. 

We’ve been renting Lost one DVD at a time, which Vikki says is a good thing, or else we’d never sleep.  :-)

Home | Movies
Monday, 10 April 2006 11:29:36 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 

The second I win the lottery, I’m so getting one of these.  They are wood-covered, spherical rooms that you hang from trees.  What a great place to hang out in (literally). 

 

Treehouse sphere
Monday, 10 April 2006 11:03:06 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, 03 April 2006

This weekend Vikki and I were in Seattle for an anniversary party (that turned out to be a wedding… long story) and part of the festivities was a performance by Circus Contraption.  They were completely fantastic.  What an awesome show!  They are a group of musicians who also happen to be circus-style performers.  They played some very cool music, highly reminiscent of 30’s bistro music, a la Paris Combo or similar bands.  Along with the music (which would have been cool enough by itself) there was juggling, tap dancing, ballet, several varieties of trapeze art, a strong man, stilt walking, and more. 

I was really impressed not only with the breadth and depth of their talent, but how consistent they were with the retro-circus style.  The costumes, music, instruments, everything fit very well together.  I think it’s cool that people would choose to preserve this particular style of music and performance and do it with such obvious dedication. 

Enough raving… if you ever get a chance, check them out.  They are playing a week-long engagement in Seattle in mid-July (details on their site) and I’m hoping to make it up for a show.  It’d be worth the drive.

Monday, 03 April 2006 14:42:37 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 30 March 2006

The product I spend most of my time working on (our SDK) gets installed in the GAC.  The problem with that is that I often find myself having to switch between functional testing of client apps that use the SDK (and need it to be GAC installed) and my own unit testing.  In the past, that’s meant that every time I need to do unit testing of changes, I had to uninstall the version in the GAC, since if they ran from the GAC, there were no PDB files, and hence no debugging. 

Thanks to Explorer hiding the GAC directories from us, you have to do it from the command line or using some other tool.  I hate writing batch files, so I thought I’d try it with Monad instead.  I’ve been playing with it for a couple of weeks since Scott turned me on to it, and I’m digging it pretty seriously. 

The script below assumes that you are running it from a directory that includes both the DLL and PDB files.

Enjoy.

$pdbfiles = get-childitem | where {$_.name.EndsWith("pdb")}

foreach ($pdb in $pdbfiles)

{

    $dllPath = [System.IO.Path]::Combine([System.IO.Path]::GetDirectoryName($pdb.FullName),[System.IO.Path]::GetFileNameWithoutExtension($pdb.FullName)) + ".dll"

 

    if([System.IO.File]::Exists($dllPath))

    {

        $dll = [System.Reflection.Assembly]::LoadFile($dllpath)

        #$dll.FullName

        $version = $dll.GetName().Version

        #$version

        $token = $dll.GetName().GetPublicKeyToken()

        #$token

        if($token -ne $null)

        {

            $dllPath           

            $tokenStr = ""

            foreach($b in $token)

            {

                if ([int]$b -lt 16)

                {

                    $tokenStr += "0";

                }

                $tokenStr += [Convert]::ToString($b,16)

            }

            $tokenStr

            $d = $version.ToString() + "__" + $tokenStr

            $installPath = [System.IO.Path]::Combine("c:\windows\assembly\gac",([System.IO.Path]::GetFileNameWithoutExtension($dllPath)))

            $installPath = [System.IO.Path]::Combine($installPath,$d);

            $installPath = [System.IO.Path]::Combine($installPath,[System.IO.Path]::GetFileName($pdb))

            if([System.IO.Directory]::Exists([System.IO.Path]::GetDirectoryName($installPath)))

            {

                [System.IO.File]::Copy($pdb.FullName,$installPath,$true)

            }

        }

    }

 

}

 

Thursday, 30 March 2006 15:42:37 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, 20 March 2006
Scott and Mo are putting together a team for a Walk for Diabetes later this Spring.  I walked with Scott and his family 6–7 years ago, and had a great time.  Jump on over and make a tax deductible (in the US) contribution, or come out and walk in May.  I’ve watched the technology that Scott uses to control his condition pretty closely over the years, and know that there’s still a long way to go.  Definitely a worthy cause.  Show your support for Team Hanselman, and know that you’re helping a lot of people in the process.
Home | Work
Monday, 20 March 2006 16:43:00 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
The weather was so nice yesterday I couldn’t resist the urge to cache.  Over the last few months between moving, the truly foul weather, and the fact that large parts of Hillsboro were under water, it’d been a while since I’d logged a new cache.  The kids and I got two yesterday.  Nice easy ones to get back in the game.  I’m hoping to start logging more regularly now that Spring is almost here.  We’ll be out in Sisters a couple times this Spring, so I’m hoping to pick up a few more out there too.  Caching in the high desert is fun.  Plus I’ve picked up several sets of maps for my GPS, so that’ll make finding things much easier out there. 
Monday, 20 March 2006 16:38:14 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
V for Vendetta completely rocks.  Vikki and I went and saw it late Saturday night, and were very much impressed.  The film is above all consistent.  The performances, the story line, and the sets/scenes etc. were all very consistent.  Natalie Portman actually acted, for the first time since The Professional.  Hugo Weaving was completely fantastic, despite the fact, or perhaps because of the fact that you never see his face.  Good effects, but they don't get in the way, and aren't the focus.  All around great film.  Makes me want to read the comic now.


Monday, 20 March 2006 16:33:19 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 
# Thursday, 16 March 2006

Early this week my beloved iPod (a 3G 20Gb) died horribly, in a won’t boot and the diagnostics crash kinda way.  Great sadness.  I hadn’t been using it as much lately, largely due to how rediculously the battery life was SUCKING.  But with it gone, I was really missing it, particularly the Audible support, which I use in my car all the time. 

The result:  a quick trip to Costco (home of all things good) last night and a shiny new black iPod Photo 30Gb.  Gotta love Apple.  The packaging is even sleeker and sexier than before, and you can’t beat their out of box experience.  The documentation that comes in the box basically says “install iTunes, plug in the iPod and everything just works”, and that’s pretty much how it went.  Took over an hour to get my 11Gb+ of content downloaded, but I love the fact that the USB interface will charge them now.  I was a little bummed that you don’t get the wall-plug-to-iPod-cable charger any more, although I’m sure my old firewire one still works. 

The screen is truly amazing.  I scoffed at the thought of trying to watch videos on such a tiny screen, but it really is that good.   Since I don’t get cable, the fact that you can get the Daily Show on iTunes is pretty dang cool, since that’s about the only thing that makes me want cable. 

Sadness gone.

I really have to hand it to Apple (once again).  I’m amazed that so few other companies seem to “get it” the way they do.

Thursday, 16 March 2006 13:01:54 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |