# 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]  | 

I was glued to my couch this morning trying to finish Charlie Huston’s Six Bad Things : A Novel.  It’s quite a ride, and the last 50 pages or so really go like gang-busters.  It’s a sequel to the equally frenetic Caught Stealing : A Novel.  On the surface they seem like just faced pace, hard boiled crime fiction (possibly more violent than most) but having now finished both books I think that there’s deeper meaning at work. 

<potential spoilers>

I think these novels are really about how easy it is for an average guy to turn to a life of violence and crime.  The main character keeps getting caught up in progressively stranger circumstances, and to protect first himself and then his parents he sinks deeper and deeper into this plot of drugs and casual violence.  He starts thinking of himself as a violent individual, but it doesn’t happen all at once.  Each time he finds his back to the wall he finds it a little bit easier to take the violent way out, until in the end he finds himself killing without remorse.

</potential spoilers>

So, if you like crime fiction, these are definitely worth checking out.  There is supposed to be a third book in the series coming out later this year, and given how the second one ended I’ll be interested to see what happens next.

Thursday, 16 March 2006 12:52:31 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, 08 March 2006

I’m most of the way through Jack Kerouac’s The Dharma Bums, and a couple of things really strike me about the book.  This is the first time I’ve read Kerouac, so I can’t compare it to his other works (although I’m interested to read On the Road now) but having just finished a biography about him during the period he’s writing about, the whole book is really just lightly fictionalized auto-biography.  That makes for interesting reading, and Kerouac’s style is certainly entertaining. 

The thing that strikes me the most is that here were a bunch of guys who were worried that the combination of suburbia and television were turning Americans into anti-intellectual, under-educated drones who never went outside.  And this was FIFTY years ago!  Well, unfortunately they’ve turned out to be largely right.  TV hadn’t even been around more than a few years then, and already its effects were being acurately predicted.  Sigh.  <rant>Stop violating your minds with television, people! Go outside!</rant>

I find it interesting that the antidote that Kerouac and the other Dharma Bums suggested was essentially voluntary homelessness.  Not something that’s easy to do these days.  However, I think I now understand a lot more about one of my uncles.  He totally fits the Dharma Bum profile.  I had no idea. :-)

Wednesday, 08 March 2006 11:11:03 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 07 March 2006

Last night I finally got broadband access hooked up at my new house.  Two weeks without Internet access has been crushing me slowly, but this was the soonest I could pull everything together. 

I found out a while back that I could get Verizon’s FIOS service at my new house.  Way faster than the 768Kb DSL connection I had before.  I went round and round about how to set up networking/phone/etc. at the new place.  I considered cable modems, VoIP phone, etc.  I didn’t really want a cable modem, since I don’t watch TV, and Comcast really tries hard (relentlessly?) to make you watch TV once they get a foot in the door.  I considered DSL again, but you can’t get DSL without local phone service, and I didn’t really want that either.  FIOS works out perfectly.  It’s fiber direct to the home, and you can get (right now) 5Mb down and 2Mb up for $35/month.  Perfect.  I don’t have a landline, since I already pay for cell phones, and FIOS carries no local phone requirement, although if you use Verizon as your local phone service, they route your phone over the fiber too, at no additional charge.  If you really feel you need it, FIOS is also capable of 15Mb/2Mb for only $10/month more. 

Once that was decided, it was still a lengthy process.  Turns out that FIOS requires a little box (the Optical Network Terminal) to be installed on the outside of your house.  This (for me) required getting approval from the HOA, and for that I had to wait until we closed before even submitting the application.  That took a few days to process, and by then the earliest time I could schedule Verizon for was over a week out.  Sigh.  Being a utility, Verizon gives you a nice tight arrival window for the technicians between 8 AM and 5 PM.  Thanks.  So I worked at home all day waiting for them to show up.  They finally arrived at 4:45.  Good thing I waited. :-(  Once they got there though, I was very impressed.  They only took about an hour, which included installing the ONT on the outside of the house, installing a battery backup for said device inside my garage, and running CAT5 from the ONT through the crawlspace and into the room where I have my PC set up.  The install ends in a very tidy looking RJ-45 jack.  They even install a free (if you agree to a one year contract) wireless router and get it all configured to talk to their server (via PPPoE, I was surprised to learn). 

I tried it out last night, and it kicks the llama’s @$$, as they say.  Lightyears ahead of my DSL connection. 

If it’s available in your neighborhood, it’s totally worth checking out. 

Tuesday, 07 March 2006 10:40:24 (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |