Monthly Archives: September 2007

Quests

Having been linked to by the infamous Mini-Microsoft and quoted (although not credited) by MSFTextrememakeover, I thought I should do a follow-up post to the Company Meeting last week.  I thought Mini’s post was excellent–it has a bunch of stuff I forgot about.  I’m on some internal e-mail aliases where people expressed their opinions on how boring the meeting was; I disagree because I think this meeting was frank, as opposed to the glossy, hand-wavy meetings of years past.  MSFTextrememakeover, on the other hand, seems hell-bent on impeaching SteveB.  I don’t have enough context to decide whether or not he’s right, but he does make pretty convincing arguments.  I would love to hear someone’s arguments for SteveB–how much he’s contributed to/guided (guiding) the company (and how "Monkey Boy" is helping our image–sorry, I’ve been reading too much FakeSteve too).  It’s a pretty one-sided debate at the moment.

Nevertheless, I’ve been thinking about "Quests" after the Company Meeting.  BillG talked about the concept of quests; how they should be our guiding north stars, toward which the company should be moving towards.  Long-term visions, if you will.  Especially since he’s leaving the company this year.

First of all, I think the word "quest" was a horrible choice.  When I heard "quest" I immediately thought of "Qwest" the company, probably because I watch too much TV.  The second thing that came to mind was World of Warcraft or Final Fantasy, probably because one of my previous roommates used to play these games for hours on end.  The word "quest" invokes images of knights wearing chain mail, riding on horses in King Arthur’s time, on a quest to find the Holy Grail.  What I definitely did not think about was a long-term roadmap.

Anyhow, forgiving our Chairman’s lackluster choice of words, I got to thinking about one such "mini-quest" after seeing the demo of the upcoming Windows Live Calendar.  I wonder how many people will start using the Calendar?  For that matter, I wonder how many people (tech-adopters aside) use Google’s Calendar product or any of the other plethora of calendaring products?  We use Exchange at work (by the way, contrary to popular belief, Hotmail does not run on Exchange).  Exchange has pretty darn good calendaring support, but it’s not great if other people aren’t on Exchange too.  As someone with a work calendar, I don’t want to have to deal with calendar for personal stuff too.  What you want is a single place to keep track of all your appointments/meetings.  This stuff isn’t revolutionary.  Sometimes I still use pen and paper to keep track of to-do lists.

Actually, funny enough, this kind of comes back to the whole (original) Windows Live theme.  You.  There should be a single place to go to get everything you need.  I should be able to tailor my calendar to my work and to my personal life.  I should be able to control my social contexts on Facebook.  The world should revolve around me.  I should be able to own my data and be able to access that data from anywhere on any device.

Back to the Company Meeting.  I like the annual Company Meeting because it makes us cogs feel like we’re actually a part of something as a whole.  It lets the masses know that the company actually has some purpose and direction and isn’t a big fat hippo with too much inertia to move.  It lets us monkeys drink the kool-aid and, once in a while, gives us a dose of reality that many of us desperately need.

What I would have liked though, is more tie-in with these "quests" of ours.  We’ve seen the PlayTable Surface at least twice in the Company Meeting now.  It’s good to hear that they’re finally going to ship something to retailers (Sheraton Hotels and T-Mobile) this winter.  I’d love to see each division come up with one or two Quests, and show progress towards those quests each year.  Maybe mini-quests too.  This is what we’ll have in 5 years and this is what we did in the past year to get closer to that goal.  *Feature* demos are great, but what we really want to see are cool new (revolutionary) toys that display innovation.  We want to ooo and ahh–and then get our hands on those toys to play with.  We want to know that each division has a sense of purpose, and aren’t just dicking around with new teams that get trashed after two years.  After all, we are a business (even if we do have monolithic cash reserves to spend a billion on broken xbox’es).  No hodgepodge of random services that aren’t heard from after being introduced.  Purpose.  Direction.  North Star.

Quests.

Overlapped I/O

I don’t get much of a chance to do any native coding these days, and I’m uncertain whether or not that’s a good thing.  On the one hand, this means that there’s just a lot of crap I don’t have to deal with, but on the other hand, it means that those skills are getting rusty/gone extinct.  The topic of managed coding comes up time and time again, and indeed, it came up yesterday with some of the people I was taking the bus to the Company Meeting with.

Aside: I would argue that although a developer can write sloppy managed code and/or sloppy native code, the bar is much lower when writing managed code.  In other words, it’s so easy that people don’t think, and tend to write sloppy code.

Let me share a real-life nasty little heap corruption bug that resulted in an access violation crash.  In retrospect, this should have been obvious, but it never occurred to me while writing the code (almost a year ago now; yes, it took that long to surface).  It’s actually really simple.

The Overlapped struct is used for async input or output.  When you use it in some function like ReadFile or WriteFile, you give it a handle to an event that your app can wait on to be notified when your outstanding call has completed.  The bug was this: on shutdown (or some other scenarios), we were cleaning up the event, the thread and all its allocated objects, like the Overlapped struct.  At some point down the line (unpredictably), we’d get this Access Violation.  If you took a look at the heap, it was corrupted.

A little digging showed that we were freeing the memory in the Overlapped struct.  Something would come along and use that chunk of memory; and then "something" would come along and re-use that chunk of memory, even though it had been freed?!  Why?

It turns out that when you want to get rid of the Overlapped struct, you actually still have that outstanding request on it.  What was happening was that we would free up the struct, and then the aysnc I/O would complete, whereupon it would try to write data back into the struct (that we just freed) about the completed I/O.  Doh!

The fix, is to call CancelIO to cancel the outstanding I/O request.  Simple.  Obvious.  In managed code you usually wait on a list of waithandles/events, one of which is a shutdown event that allows you to exit out of some loop to dispose of things properly.  This is similar to the native case.

One caveat: CancelIO only works for operations that are issued by the calling thread for the specified handle.  Big limitation.  On Vista you can use CancelIOEx, but otherwise you’ll need to do some finagling to make sure that the calling thread also does the cancel (as I had to).

Company Meeting 2007: Change the World

[ Usual disclaimer applies. ]

It is indeed that time of the year again, when Microsoft’ies pile into SafeCo field to watch our CEO prance around like a monkey and run around until his armpit sweat saturates his shirt, and drink the kool-aid about how awesome our company is with all the "synergy" and "innovation" coming down the "pipeline" and how "super-excited" our executives are about our prospects for the year ahead.  Sorry, I guess I’ve been reading too much Mini.

So some brief thoughts:

– The video at the beginning was absolutely hilarious.  I’d love for that video to make its way onto YouTube (or SoapBox) soon.  (It was a cartoon-y video with photo cut-outs of the heads of the execs playing to some ra-ra song.)

– I was surprised by the lack of buzzwords used.  If it was a drinking game, I would barely have had a couple shots.  BillG was the only one that used "synergy" and even then, he used "synergistic" which isn’t even a word (oh wait, maybe it is).  No one really used "super-excited" (perhaps on account that it was voted "People’s Choice Most Overused Microspeak").

– The feedback loop that happened during BillG‘s speech hurt my eardrums.  Twice.  He handled it rather well.  "That was to wake up the guy that was sleeping."

– I was surprised LisaB and the HR dept didn’t come out with anything new.  Mini led me astray after the BusinessWeek article.  Except for that wifi coach "Connector" bus at the very beginning.  Which doesn’t help me anyhow.

– Demos were ‘ok’.  Nothing to get super-excited about (in my opinion).  Much better than the Excel demo a year or two ago (where they showed that you could colour cells in 2007 😐 ).  Can’t wait to see what Zune v2 looks like.

– We hired 12,800 employees world wide in FY08.  Uhhh wow.  Do we *really* need that many people?  Core tech was less than half that.. but still.  8.3% attrition (4% is good).  Of all college hires, we get ~50%, Goog gets the other half.  Interesting stat.

– I did like ROzzie‘s speech and mini-history lesson.  He really pounded software+services.  It’s almost becoming like a broken record.

– SteveB’s going to be around for a long time.  Even though BillG’s leaving this year.  Good or bad?

– It was refreshing to see execs cite specific competitors and acknowledge those to which we have not fared well against.  Especially impressive was SteveB‘s scorecard slide where he ranked red/green/yellow how we fared against each of Linux/Oracle/IBM/Sony/Nintendo/Google/Apple/piracy etc etc, customer satisfaction, revenue, innovation, hiring, etc.  I don’t recall that ever happening before.  In meetings past I always felt the execs sidestepped issues of consumer perception and confidence.  Or maybe they always do that and I had just fallen asleep by that point.

– The only swag I got was a fleece for my team and a stress ball shaped like a hippo (yes, a hippo–guess why?) from the Experimentation Platform team.

Overall, a pretty good meeting to get some pulse out of this giant of a company.  What’d you think?