Thursday, October 26, 2006


National Novel Writing Month

National Novel Writing Month is coming up again. Everybody get ready.

Unlike last year, I'm not going to pretend that I'll have time to write a novel this year. But I do want to write a short story. Here's the opening sentence for one story I have in mind:

Murder was easier than I expected.

If I don't have time to write the story, I'll just use that one sentence as a Very Short Story.


Bug-Fixer Extraordinaire

OK, maybe the extraordinaire part isn't right, but "bug fixer" has been my job for the past month. This is one of the things contract programmers do: come in at the last minute and help address as many issues as possible before a product is released.

The problem with bringing in contractors at the last minute is that the they often have no experience with the product in question. The learning curve limits what they can do in a short period. As a manager, you want to assign them tasks that they can perform without needing too much hand-holding from your full-time employees. You also want to make sure they con't screw things up too badly. It is very easy for a short-term contractor to become a net-negative producer.

The tasks I've been assigned can be grouped into three categories:

  1. cosmetic issues
  2. crash analysis
  3. black holes

The cosmetic issues tend to be pretty easy to fix, often trivially, but that doesn't mean they aren't important. If a window background doesn't redraw properly when the window is resized, or something flickers a lot when the window is moved around, users get annoyed and say bad things about the product.

After my past few years of concentrating on embedded systems and distributed communications, it's actually been a lot of fun to work on some simple graphical drawing code. It's like getting in a time machine and watching myself work ten years ago.

The crash analysis tasks have given me some new skills. This product test team collects crash dump files every time the app dies during testing. They have the executables and debug symbol files for every daily build in their version control repository, so it's a simple matter to load everything up into Visual Studio 2005 and look at why it crashed. This is a practice I'll definitely be recommending to other teams.

Finally, there are the "black hole" bugs, so named because they suck you in and there is no way out. These are the bugs that everybody else on the team has already looked at and been stumped by, so they let the high-priced so-called "expert" consultant have a crack at them. These are frustrating.

Sure, I'm paid by the hour, so if they want me to spend a couple of days looking at something they know I won't be able to fix, I shouldn't complain. But I hate it when I'm assigned a task that I can't complete. I'm learning all sorts of things about the flakier parts of Windows and Office (MSHTML and MAPI, I'm looking at you). Maybe that knowledge will help a future client, but I'm not helping my current client as much as I wish I could.

If I'm lucky, they'll find a misspelled menu item tomorrow, so I can fix that and feel good about myself.

Tuesday, October 24, 2006


Guru of the Week

If you want to be a good C++ programmer, or if you think you already are a good C++ programmer, you should go through all the exercises at the Guru of the Week (GotW) archive. Even arrogant know-it-alls like me can learn a few things.

Tuesday, October 17, 2006


My Next Windows Laptop

I like my MacBook, and running Windows in Parallels has been acceptable. But it's not ideal. There are three big problems with doing Windows software development this way:

So, I've decided I need a new Windows laptop. I want one that's fast enough to serve as my primary development machine, but small enough and light enough that carrying it around won't be a burden.

I'm also pretty sure I want a Tablet PC. I miss my Newton and my Handspring Visor. I'm also learning how to draw, so having a tablet will let me do some doodling in my spare time. Also, I think tablet-oriented application software development may be a niche where I can have some fun.

Right now, I have my eye on the Toshiba Tecra M7, but I'm open to other suggestions.

[Update: Toshiba says my customized machine will be shipped November 8.]

[Update #2: Toshiba says it has been shipped. It may be waiting for me when I get home from NYC next weekend.]

Friday, October 13, 2006


Flight Restrictions Over the East River

In the wake of the "high-rise plane crash" (a phrase I hear during every commercial break in New York), the FAA is now requiring all fixed-wing aircraft to be in contact with air traffic controllers when flying over the East River.

Such information is distributed to pilots in a Notice to Airmen, or NOTAM. Here's what one looks like:


It is my hope that the FAA will discover lower-case characters someday.

Non-fixed-wing aircraft (in other words, helicopters) are still allowed to fly in the area without ATC contact, as are departing or arriving seaplanes. This makes sense: controllers would be overwhelmed if they had to keep track of all the helicopter flights in the area.

For those of you who are surprised to find out that pilots commonly fly around without filing flight plans or talking to controllers, I recommend my Flight Plans and Control Towers post.

I was in a Manhattan office building at the time of the crash. This office has a lot of televisions around, so we were all kept informed. While initial reports were coming in, one of the guys in a cubicle near me started explaining aviation technicalities ("visual flight rules", "VFR corridors", etc.). I added a couple of explanations myself, and so we identified one another as pilots. He's a student pilot, hoping to have his checkride later this month. We talked about the complicated airspace around New York, and swapped some flying stories.

I was a little surprised that none of the news outlets have mentioned the weather as a potential factor. When the newscasters first mentioned that the plane was flying under visual flight rules, I looked out the window and noticed how misty it was outside. I checked the local weather on the web, and visibility was reported as six miles. That's not terrible, but it's not ideal. I don't think it was a factor, but I expected the media to advance some uninformed theories about it.


Stuff I Left At Home

I'm posting a list of things I wish I'd brought along with me to NYC. I hope I'll review the list before my next trip.

(Worst blog entry ever.)

Sunday, October 08, 2006


Really Short Hair

For the past 15 years, I've had a regular barber that see once a month. I'm happy with his work, but I've been up in NYC for a few weeks, so I had to get my hair cut here.

The mall next to my corporate apartment has three barber shops. I couldn't detect any difference between them, so I chose the one with the cutest girl at the front desk. (I'm open to suggestions about how to make a better choice in the future.)

My hair style is pretty simple: straight, parted on the right. The stylist asked me how I wanted my hair, and I told her to take about half an inch off, all around.

She took out some clippers, put a guard on them, and started shearing my head. I immediately suspected a miscommunication. She apparently thought I wanted just half an inch of hair remaining all around. There was no point in stopping her once she started, so I just watched as big clumps of hair fell from my head.

Now I look like I've joined the Marines. It's no big deal: the hair will grow back in a few weeks, and right now it doesn't look that bad. You know how in military films, all the actors are almost bald, except for Harrison Ford or Tom Cruise, who just have really short versions of their normal movie-star haircuts? Mine is like that. It's not bad—it's just different.

The shortness of my hair makes the gray a lot more pronounced. I don't know whether it makes me look more distinguished, or just old.

Don't ask for pictures.

[Update: My mother and my sister-in-law both say they like how my hair looks.]

Friday, October 06, 2006


I Hate Programmers, Part 2

So, I'm reviewing a source file, and I run across this:

  CreateXML(false,false,true,true,true, false, true);

Wondering what the arguments meant, I tried a search:

SomeClass.cpp(2017):  CreateXML(false,false,true,true,true, false, true);
SomeClass.cpp(2135):  CreateXML(false,true,true,false,false, false, false);
SomeClass.cpp(2254):  CreateXML(false,false,true,false,false, false, false);
SomeClass.cpp(2334):  CreateXML(false,false,false,true,false, false, false);
SomeClass.cpp(2413):  CreateXML(true,false,false,true,false, true, false); 
SomeClass.cpp(2492):  CreateXML(false,false,false,false,true, false, false);
SomeClass.cpp(2572):  CreateXML(true,false,false,true,false, false, false);

I am especially amused by the fact that the last two arguments on each call have spaces before them. The difference in style suggests a different author. It means that somebody thought it would be a good idea to add two more mysterious boolean arguments to a function that already had five mysterious boolean arguments.

It was no surprise to find that the CreateXML function was a few hundred lines long. It contains 39 if statements. I'm sure the authors were proud of the powerful function they'd created.

Monday, October 02, 2006


I Hate Programmers

Why would anybody write this:

if ( (k == 0x43) || (k == 0x56) || (k == 0x58) || (k == 0x5a) ||
     ((0x70 <= k) && (k <= 0x78)) )
    // ...

when they could write this:

if ( (key == 'C') || (key == 'V') || (key == 'X') || (key == 'Z') ||
    ((VK_F1 <= key) && (key <= VK_F8)) )
    // ...


This page is powered by Blogger. Isn't yours?