spout

December 22, 2005 spout

PM Skill #0: Know Your Job

I’ve been a Program Manager (PM) at Microsoft now for about 2.5 years. Before that, I’ve been a managing contractor, a lead author, an engineering manager and a chief architect (both for commercial and shared source projects). Over a 12 year career, I’ve not only contributed to lots of shipping projects, but have lead several.

Most recently, I’ve been applying that experience to being a PM on a real Microsoft product team, which is its own unique experience. I’ve only been doing it for a few months, during which I spent a lot of time studying internal PM training materials and asking my exemplar PM brethern how they do it. At the same time, I’ve been helping a colleage get up to speed on just what it means to be a PM, so I thought I’d use this blog for what I think it’s best at — writing down what I believe and having people tell me where I got it wrong. So, consider these posts (like all posts on this site) to start with in my opinion.”

A PM’s job is to ship the right thing on time and on budget, while keeping your team happy. There’s a lot in this sentence, so let’s break it down:

  1. ship” – first and foremost, the job of any PM is to start with a goal, either self-imposed or assigned, and ship an implementation of that goal. If you don’t ship, the rest doesn’t matter.
  2. the right thing” – unfortunately, shipping ain’t enough, you also have to ship the right” thing by some definition of right.” This is the most ambiguous part of the job, because any one goal can have many, many implementations and even the goal might not be the right one. My personal definition of right includes getting buy in from your team, your management, your partners (internal and external) and your customers (internal and external). You’re allowed to do whatever makes all those folks happy (and good lucking finding the intersection : ).
  3. on time, on budget” – this is all about execution. As a PM, it’s your job to lead your team through planning, scheduling, resource management and delivery.
  4. keeping your team happy” – this one is hardest for many engineers, because it involves keeping your team happy, focused and productive. There ain’t no rule book for this one, although I find a useful technique to be something widely known as management by walking around.” Many folks won’t tell you how they really feel in a meeting, but if you can catch em on a phone call or in their office, 1:1, they’ll give you their real gut,” which is vital to making sure that folks are happy, motivated and on the right track.

I’ve got more opinions about other vital PM Skills, which I’ll post as the spirit moves me, but hopefully at the rate of about 1/day til I’m dumped the entire contents of my brain, making room for other things. : )

December 18, 2005 spout

How come nobody says “impeach?”

WARNING: This is my political side bubbling over. If you only want fun stuff about my kids or technology, this post ain’t for you.

Clinton engaged in an consensual adult act in the west wing and endured the impeachment process.

Bush sics the NSA on us w/o due process, starts a war so he can look tough for his dad and continues to dismiss global warming as a myth. Why aren’t we impeaching his ass?

December 16, 2005 spout writing

Windows Forms 2.0 Book Samples Posted

Mike did some last minute clean-up and checked in the files, so I’ve uploaded the code sample for the Windows Forms 2.0 book. Enjoy.

December 16, 2005 spout writing

Windows Forms Programming 2005 in C# Submitted!

I packaged off the final chapters, figures and PDF files for submission of the WinForms 2.0 book this morning. Michael made it easy by fixing all the last minute nits I found, producing the PDFs and bundling all of the figure files together (he separated the graphics from the Word docs using a WinForms 2.0 program, of course!).

In spite of the fact that I’ve been working on long-lead prototype coding for the last month and Mike’s been moving to the US from Australia, we managed to get the book submitted a full 15.5 hours early (they meant midnight when they gave us a 12/16 deadline, didn’t they?!?).

I’m so excited to get the book in your hands, that I’ve asked Mike to check in the files he’s got checked out so that we can post the code samples ASAP. It’ll still be a while before the book is in your hands, though. We took 22 months to write it, but it’s the 3 months it takes to print it that always sticks in my craw the most for some reason. : )

Wahoo (2)!

November 23, 2005 spout

A C# 2.0 anon delegate “gotcha”

I’m a huge fan of anonymous delegates, but I ran into a gotcha this morning when using anon delegates inside a for-loop:

class Worker {

  public event WorkCompleted Completed;

 

  public void DoWork() {

    Console.WriteLine(Worker: work completed”);

    if( this.Completed != null ) {

      foreach( WorkCompleted wc in this.Completed.GetInvocationList() )

        wc.BeginInvoke(delegate(IAsyncResult result) {

          // Use wc from surrounding context

          int grade = wc.EndInvoke(result);

          Console.WriteLine(Worker grade= {0}”, grade);

        },

        null);

      }

    }

  }

}

When I run this code, I get the follow exception:

System.InvalidOperationException:
  The IAsyncResult object provided does not match
  this delegate.

What’s happening, of course, is that the wc variable continues to change after the dynamic invocation happens instead of the value being stored away, one for each call to BeginInvoke, as I’d intended. One fix for this problem is to pass the value I wish I could take off the stack as the async state argument:

class Worker {

  public event WorkCompleted Completed;

 

  public void DoWork() {

    Console.WriteLine(Worker: work completed”);

    if( this.Completed != null ) {

      foreach( WorkCompleted wc in this.Completed.GetInvocationList() ) {

        wc.BeginInvoke(delegate(IAsyncResult result) {

          // Pull the value out of async state

          WorkCompleted wc2 = (WorkCompleted)result.AsyncState;

          int grade = wc2.EndInvoke(result);

          Console.WriteLine(Worker grade= {0}”, grade);

        },

        wc);

      }

    }

  }

}

This isn’t quite the elegant code I’d like to write with anon delegates, however. I can do a little better by creating a variable on the stack specifically for use in the delegate:

class Worker {

  public event WorkCompleted Completed;

 

  public void DoWork() {

    Console.WriteLine(Worker: work completed”);

    if( this.Completed != null ) {

      foreach( WorkCompleted wc in this.Completed.GetInvocationList() ) {

        WorkCompleted wc2 = wc; // Copy wc for use in delegate

        wc.BeginInvoke(delegate(IAsyncResult result) {

          int grade = wc2.EndInvoke(result);

          Console.WriteLine(Worker grade= {0}”, grade);

        },

        null);

      }

    }

  }

}

In this case, each time through the loop, a new variable is created on the stack specifically for that invocation of the loop and is therefore unchanged by the time the anon delegate is executed. This still isn’t quite ideal, but it’s not too bad.

November 15, 2005 spout

Turning off special features in DVDs and CDs?

Does anyone know if it's possible to turn off the special PC features of DVDs and CDs? I'd like to avoid Sony-sponsored virus enablers on CDs and required players for DVD content and just treat each of these CDs and DVDs as un-special. Is such a thing possible?
November 13, 2005 spout

USB HD w/ OS/Apps + FolderShare = Portable Computing?

If you could boot Windows Vista from a USB drive large enough for the OS and apps, like this version of Linux, and log into FolderShare for your data, you could use any computer that allowing booting from USB into a temporary terminal (although device drivers would be a challenge).

November 11, 2005 spout

After the writing is done

Today Michael Weinhardt and I submitted the final chapters of Windows Forms 2.0 Programming in C#” for review. Mike has worked his butt off for the last 20 months to bring this revision about, taking a fresh look at every single chapter, not only for updates to the technology, but also for story. The book is far, far better than it was without him and he deserves your love and praise when the book is released (hopefully in April of 2006).

Since this is Mike’s first book, I imagine he thinks that most of the work is done. Here’s the list of things I sent him that still needs doing:

  1. Mike will make changes to the chapters based on reviewer feedback, being careful to leave in change marks so I can see what he’s changed
  2. I’ll review each chapter, approving or rejecting changes and making my own edits and comments and we’ll repeat this til we’re both happy
  3. We’ll send everything by our post-reviewer-comment-application reviewer and apply his feedback like steps 1-2
  4. I’ll update the preface after Thanksgiving, sending it by Mike and our final reviewer til we’re all happy (and in the process, you’ll put in your acknowledgements)
  5. We’ll each update the frontmatter.doc to include dedications
  6. I’ll update the TOC.doc to match our final TOC
  7. Mike will pull out all of the figures into separate bitmap files (.bmp)
  8. By 12/12, we’ll upload the complete final manuscript, both Word and PDF versions, and send it off to AW
  9. Hopefully AW will send it along to Betsy, my most favorite copy editor ever, and she’ll mark it up, sending Mike the marked up pages to approve or disapprove each copy edit
  10. AW will drop PDF versions of each of the final chapters to us, which we’ll submit change lists for
  11. We’ll ask for updated PDFs, cuz the publisher traditionally only applies half of the feedback on each round, so we’ll repeat 10-11 til they get them all
  12. Sometime in April of 2006, we’ll each get a big box of books with our names on the front cover, which indicates that they’re on their way to the book sellers, e.g. B&N, Amazon, Borders, etc. At this point, I’ll update the web site and post the sample code while Mike updates the app that tracks errata
  13. People will send us email telling us how much they like the book to butter us up before asking a technical question. We’ll answer each question to the best of our ability and ask each questioner to post a review on Amazon.com
  14. Some of the questioners will submit bugs in the book, which we’ll track in the errata database
  15. When a print run has been exhausted (the initial print run will be between 10K — 20K copies, with subsequent print runs between 3K — 5K copies), AW will ask us for a list of changes for the n+1th edition. For some reason, they’ll always ask for those changes less than a week before they need them
  16. AW will send us each a copy of the n+1th edition, which we’ll use to check that the errata we submitted was actually applied (for some reason, publishers don’t always apply all the changes we ask for), marking errata in the database as fixed in the n+1th edition
  17. Repeat 13-16 for 18-24 months til everyone that wants a book on this technology has purchased it
  18. Get started on Programming Windows Forms 3.0 in C#,” repeating steps 1-17 after all of the chapters have been submitted for review

I figured Mike has had about 12 hours to enjoy being done,” so it was high time to crush his spirit. : )