Thursday, September 28, 2006 

In the past few weeks, I've received not one but two letters from Christine Gregoire, the governor of Washington State, looking for support in re-electing her. The thing is, is that she's running in 2008, not 2006.

I threw away the first one. On the second one, I wrote something like this and mailed it back:

If this had come in December, I have been willing to support you. But not six weeks from a high-stakes election. What the hell are you thinking? Don't bother me again before 2008.

Sheer idiocy. Why would anyone send her money at the moment, instead of making donations towards the mid-term elections?

posted on Thursday, September 28, 2006 11:39:20 PM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Wednesday, September 27, 2006 

I experimented with Google's new service, Google Transit.

It suggested this route for traveling from my home to my work:

 Begin by walking
1 Start at 4XXX 13th Ave S
2 Go to Airport Way S & S Industrial Way (takes about 7 mins)

Take the King County Metro 131 (Direction: NORTH)
3 7:17pm leave from Airport Way S & S Industrial Way
4 7:24pm arrive at 4th Ave S & S Jackson St

End by walking
5 Go to 315 5th Ave S (takes about 2 mins)

This fails badly in two respects.

First, four bus routes run along 15th Avenue S, two blocks east of my house: the 39, the 32, the 36, and the 60. The 39 drops me one block from work at 4th & Jackson. The 60 leaves me at 12th & Jackson. The 36 only runs along 15th after 7pm; earlier than that, I a 10-minute walk to Beacon Ave. And the 32 is an express bus that only runs at rush hour.

Second, it suggests that it's a seven-minute walk to Airport Way S & S Industrial Way. Actually, it's a two-mile walk, because I-5 and the railroad are in the way. You have the unpleasant choices of walking north to Spokane Street and climbing down an endless set of stairs at the freeway onramp, or south to the Lucile St bridge. And even if there were a direct route, it would take at least 10 minutes to walk down there.

That said, it integrates very nicely with Google Maps.

The Google Transit page links to Metro Trip Planner, which does a better job. Their disambiguation of addresses sucks, however. Try entering 5th & Jackson. It suggests a short list, starting with 5TH AVE S & S JACKSON ST (in SEATTLE). However, if you actually type that address into the main page, it offers you a long list of suggestions. In other words, it can't consume its own output.

Update 2006/12/29. I just tried the same experiment again. Google Transit now correctly suggests walking two blocks east to 15th Ave S and taking the 39.

posted on Thursday, September 28, 2006 3:11:03 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]

content/binary/iraq-torture-dogs-thumb-tm.jpg

I just sent the following letter to my senators, Patty Murray and Maria Cantwell, as well as to the Seattle Post-Intelligencer's Letter Page :

How has America come to this? Is the United States of America truly about to repudiate the Geneva Convention? Is the Senate about to let the President decide when and whom to torture?

This is foul. This is wholly un-American. This is deeply immoral. Every civilized society abhors torture.

How can we claim to be spreading Democracy in the Middle East at the same time that we commit torture? Are we to lose all of our moral standing in the eyes of the world under this wretched Administration?

Tell me that we're better than this. Please!

Senator, you must oppose this wholeheartedly. Do not let it come to a vote on the floor of the Senate.

posted on Wednesday, September 27, 2006 7:43:47 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [1]
Tuesday, September 19, 2006 

Via AmericaBlog, an amusing video of a cockroach taking on a weatherman. Twice.

posted on Wednesday, September 20, 2006 2:28:53 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Wednesday, September 13, 2006 

I ran into a problem installing some COM+ components today. The installer was using Regsvcs.exe to register each COM+ component. I noticed after a while that the installer wasn't making any progress and that my dual-proc system was stuck at 50% CPU utilization. I attached a debugger to the offending process, regsvcs, and found that it was stuck in the following infinite loop (disassembly courtesy of Reflector):

internal void System.EnterpriseServices.CatalogSync.Wait()
{
if (this._set)
{
RegistryKey key1
= Registry.LocalMachine.OpenSubKey("SOFTWARE\\Classes\\CLSID");
while (true)
{
int num1 = (int) key1.GetValue("CLBVersion", 0);
if (num1 != this._version)
{
break;
}
Thread.Sleep(0);
}
this._set = false;
}
}

There are two severe problems with this code.

  1. The loop should time out. There must be some reasonable limit after which you can incontrovertibly say that something must have gone wrong, and throw an exception. There has to be some way to terminate a loop.

  2. Never use Sleep(0) in a loop. Sleep(0) yields the processor only if there's a runnable thread. If there isn't, Sleep(0) will return immediately. If the code is sitting in a tight loop, the net effect is that it will maximize the CPU until the thread's quantum is exhausted. There are no other runnable threads, so the scheduler immediately starts this thread again. This code will run until your CPU burns out.

(And, yes, I have committed both of these sins in shipping code. Why do you ask?)

I don't know what the calling code is doing or why CLBVersion isn't being altered by some other thread or process. I had to use RegEdit to modify this value to get the loop to terminate, whereupon RegSvcs immediately did its work and terminated. And then it started all over again, with the next invocation of RegSvcs on another COM+ component. I don't know if the components are really installed properly. I had to leave at that point.

posted on Thursday, September 14, 2006 6:53:47 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Monday, September 11, 2006 

As I mentioned last month, I participated in this year's AIDS Walk on Saturday.

I raised over $1300 online, handily exceeding my goal of $1,000. I also raised another $300 in cash and checks at the fundraising barbecue that we threw on September 1st.

I've lost count, but I believe that in the last 15 years, I've raised about $10,000 for charity. Most of it has been for the Northwest AIDS Walk. The last few years that I was at Microsoft, I raised $2,000-$3,000 each year, thanks to the power of Microsoft matching, which doubled the amount of money that I raised. I've also raised money two years running for Ugandan orphans sponsored by Vim: Microsoft Vim Users raised $2650 for orphans in Uganda.

Go me! ;-)

posted on Tuesday, September 12, 2006 6:29:15 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]

Nine-Eleven. The date burned into everyone's brain. One of those dates where everyone remembers where they were when they heard the news. Emma and I awoke to the radio telling us that planes had crashed into the World Trade Center. We went downstairs and watched the TV in horror.

For a time, an all-too-brief time, the country pulled together in a show of unity and grief. The world joined us in an outpouring of support.

There are many reasons why history will condemn George Bush, but one of the most serious is his squandering that good will for quick partisan advantage. A better man could have built a bipartisan consensus to tackle terrorism in a serious way. Ask not what your country can do for you -- just go shopping.

He should have finished the job in Afghanistan. Instead, his attention turned to fomenting the irrational, immoral Iraq war, which turned the world against us.

In many ways, the terrorists have won. This country slides slowly towards a police state, as Bush arrogates imperial powers to himself. Bush and bin Laden have a symbiotic relationship. Bush has turned Iraq into a recruiting ground for Al Qaeda. Bin Laden is the ever-threatening boogeyman to scare the American people.

posted on Tuesday, September 12, 2006 5:34:57 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Wednesday, September 06, 2006 

MoneyCentral is reporting that our Video On Demand product is running a major pilot:

Cable television operator Sunflower Broadband and MTV Networks today announced that they are launching a market-leading campaign to dynamically insert national advertisements into on-demand cable television. Sunflower will begin dynamically placing ads into MTV Networks on-demand programming this week. The first campaign, created and managed by the agency Mediaedge:cia, promotes the theatrical release of Paramount Pictures' and MTV Films' major motion picture "jackass number two", in theaters nationwide on September 22. Ads for the movie will be inserted into Comedy Central On Demand programs at the moment that viewers request the free on-demand shows.

more ...

posted on Wednesday, September 06, 2006 6:43:31 PM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]
Friday, September 01, 2006 

My colleague, Greg, and I spent all day debugging a build break in some unit tests that exercise a webservice interface in legacy .NET 1.1 code. Last night, the tests stopped working on our CruiseControl.NET build server. We couldn't understand it. The tests had been working for months. Now we were getting timeouts in SOAP. The tests essentially mock a SOAP service using the soap.inproc transport and a stub implementation that signaled an event to acknowledge a method being called.

The only thing that had changed in the code tree was that another colleague, Pavel, had discovered that two of our .csproj files somehow shared the same GUID, and had repaired that. But that could hardly have any effect on the WSE2 runtime. Could it?

Turns out that it was the cause of the break. NAnt 0.85 rc2 and rc3 silently failed to build the NUnit assembly because of the duplicated GUIDs. The assembly was not getting propagated to the directory where all the other NUnit assemblies are placed. The CC.NET task that ran the tests never noticed the missing assembly because the test was couched in terms of *.NUnit.dll. And we never noticed that the test hadn't been run in months because we have ~20 such NUnit assemblies, and the NUnit summary output goes on for several screens in CC.NET.

Morals of the story

  1. Use NAnt 0.85 rc4, which detects the GUID collision and treats it as a fatal error.

  2. Create .csproj files through the IDE, not by taking an existing file and hacking on it. (At least, that's we assume happened.)

  3. Assumptions can bite you. We assumed that the code was being run all along, so it took us several hours to draw the connection between Pavel's checkin and the failing NUnit assembly.

  4. Don't mock a webservice by implementing a dummy SoapReceiver, hauling in the WSE runtime and a boatload of non-determinism. (Instead, make fun of its dress sense.) For our newer code, we've been taking an approach like this, using partial classes and Rhino Mocks.

  5. We have also taken to including our test fixtures in the same assemblies as the code they test. I have mixed feelings about this: it offends my sensibilities to have all this test code compiled into production code. But it would certainly have been hard to miss the build break in production code.

posted on Saturday, September 02, 2006 3:17:42 AM (Pacific Daylight Time, UTC-07:00) 
#    Comments [0]