« June 2007 | Main | August 2007 »

July 23, 2007

Critical? I'll Give You Critical...

Step 1: Read the following security bulletin from Microsoft.

Step 2: Figure out...WHAT THE HECK YOU'RE SUPPOSED TO DO?!?

This stuff annoys me a great deal, especially when it comes from Microsoft. It's a critical bulletin, and includes the advice "Microsoft recommends that customers apply the update immediately." Which is great, except it's completely non-obvious what you are supposed to do to apply the update. It even has a FAQ which doesn't help.

It gets better, because if you actually figure out where you should click, that page gives you two choices for download, and explains "Download the files most appropriate for you." The two choices are Windows6.0-KB929916-x64.msu and Windows6.0-KB929916-x86.msu. Ri-i-i-i-ight.

Since I could barely figure this out, I'm not sure how most of our customers are supposed to figure it out. As an added bonus, when I selected the x86 version (having previously picked ou the Vista-specific .NET 2.0 link on the first page), it told me "This update does not apply to your system." Not something positive like "This update has already been applied" or "You do not need to install this update." Given the tricky path that you had to navigate to get there, I suspect for many people the implication of "This update does not apply to your system" will be that out of the 24 choices on the first screen, or else out of the two choices on the second screen, they picked the wrong one.

Posted by AdamBa at 09:09 PM | Comments (2) | TrackBack

July 19, 2007

The Cool of the Evening

"He [Johnny Sain] used to say a pitcher had a kind of special feeling after he did really well in a ballgame. John called it the 'cool of the evening', when you could sit and relax and not worry about being in there for three or four more days; the job was done, a good job, and now it was up to someone else to go out there the next day and do the slogging. The cool of the evening."

- from Ball Four by Jim Bouton

One of the most different parts about my job in Engineering Excellence is the teaching. For example, yesterday and today I had a course on "Development at Microsoft for Expert Developers", 3 hours yesterday and 4 1/2 today. I enjoy the teaching but it is still tiring to be in front of people for long stretches of time. So I always feel a sense of relaxation when I'm done. You thank the students, they file out, you clean up the name tents, recycle the unused handouts and leftover polystyrene cups, put the chairs back in order...it's usually just you in the room and you're putting things back in order, plus you've just finished teaching, and for a few days you won't have another class. Sometimes I linger in the tidied-up room for a few moments just enjoying the calm. I was discussing this with another person on my team and he said he had the same feeling whenever he finished a course.

In general we have good students in our courses, who want to be there, are engaged, and recognize that the more they pay attention, the more they get out of the course. Nonetheless there can be problem students, which is why there are books for trainers with titles like Dealing with Difficult Participants, which another trainer just sent me a copy of. It talks about archetypes like The Preoccupied, The Domineering, The Know-It-All, The Skeptic, and The Sleeper (one of those probably covers a unique-to-Microsoft persona, The Laptop and Wireless Network User). Any one of them can soak up a lot of your energy and also detail others in the class. If you were in my Experts class the last few days then fear not, you were a good class. But I did have a problem where an Architect I had invited to do Q&A had to cancel at the last minute due to a personal emergency. Luckily I found a replacement on short notice, so that went well. And I just sent out the post-class email, so I'm pretty much all set (I still have to add the attendees to a post-class alias, but that won't take long). Next week I'm teaching a different course all week...but for now I can enjoy the cool of the evening.

Posted by AdamBa at 11:41 PM | Comments (2) | TrackBack

July 18, 2007

Microsoft Awards

There's something new at Microsoft in the last couple of years: the proliferation of awards that everyday employees can win (which is followed closely by the proliferation of posters announcing the awards programs, that everyday employees can observe in the halls).

For a few years we have had the Engineering Excellence awards, which are for tools or processes that improve the way we engineer our products (things like Watson and Prefix win those). Then there are the Trustworthy Computing awards, which are similar but relate specifically to the Trustworthy Computing pillars.

More recently (or maybe I only noticed recently), we had the Circle of Excellence awards, which are somehow related to sales and marketing (which I know are two different things, but I don't pay attention enough to know which the COE are for). This year we also started the TCN (Technical Computing Network) Awards, which don't come across as vastly different from the EE Awards, except they're supposed to be more prestigious. Meanwhile at the upcoming Company Meeting they are going to announce the first Bill Gates award winner, which is for I'm not sure what, but I think is supposed to out-prestigify the TCN Awards (hey, it's Bill, right)? And I was wandering around Building 121 when I saw a poster for another award...I forget the name but it was in the same general category of awesome-things-done-by-employees that the other ones fall into.

All these awards are hard to win, because of the competition; the one I know the most about are the EE Awards, and when we say to the winners that this is a rare honor and they should be proud, it's true. The submissions that don't win are all great stuff, and the winners are even better.

A cynic would say that these awards are like a lottery: your actual chance of winning is low, but the possibility keeps people going at a cheaper price than other incentives. This would imply it was the last flowering of decadence before the empire crumbles and all that. I'm not actually that cynical. In the case of the EE Awards, certainly, all the ones I've seen started out as people doing something cool to help them do their job better, and eventually turning into something that helped lots of people do their jobs better (scope and impact are some of the key criteria for an EE Award). So it's not that I disagree with the number of awards handed out; it's the number of kinds of awards that exist that strikes me as dubious. Surely we could (as an example) combine the TCN awards with the Bill Gates award, and give out a few more of one or the other. Then they could really become prestigious, rather than just be labeled as such out of the box. Or combine the EE and TwC awards, since they are both handed out at the EE/TwC Forum and I doubt most people in a Microsoft hallway have a sense of how they are different. Because otherwise they risk being like local Emmys, where it's more unusual for someone not to have one than to have one. Which would defeat the whole purpose of the awards.

Posted by AdamBa at 09:43 PM | Comments (5) | TrackBack

July 15, 2007

We Ran the Span

The new Tacoma Narrows Bridge is opening this weekend. Today they had various festivities, the first of which was a 5K run across the bridge (and then up to the toll plaza, and then back), starting at 8 am. So at 5:30 this morning I hopped out of bed, grabbed two of the kids, and off we went to Tacoma to participate in the run, which was billed as "the one and only."

The race, as a race, was pretty bad; the bridge was so crowded (they had over 10,000 "runners") that you could only run in fits and starts, the bus service to and from the start was disorganized (they moved a lot of people quickly, but were very bad at ensuring fairness of who got on the bus vs. who waited in line the longest), they for no apparent reason had the bib pickup a 5-minute walk in the wrong direction from the bus dropoff, and they ran out of food at the end. Even the t-shirts were uninspired. BUT as a "tell your grandkids" event of course it was great. The bridge, I have to say, is quite nice; although it doesn't look like the current one (the towers are concrete, for one thing), it "echoes" the look of it, as they say.

In the entire Sunday Seattle Times I could find nary a peep about the new bridge. I mean come on, a new $1 billion suspension bridge, possibly the last long-span suspension bridge to be built in the U.S. (since they are being elbowed aside by [shudder] cable-stayed bridges), opens in the next town over and they don't even mention it? The Tacoma News-Tribune (which I suspect is a better paper than either of the Seattle ones anyway) of course is all over it. They had a front-page article on it, plus a special section talking all about it. And they are coming out with a book about the construction.

I was poking around the News-Tribune site and they have a cool PDF of where the pieces of the original 1940 bridge (aka "Galloping Gertie") are lying on the bottom of the Narrows (here's a more detailed one talking about the marine ecosystem that has formed around the remnants). And here's a story about people trying to be the first to drive across the new bridge, an event that will happen at an unknown time between now and tomorrow morning.

Posted by AdamBa at 07:19 PM | Comments (2) | TrackBack

July 11, 2007

Is an Object-Oriented Square a Rectangle?

I was in a course recently and someone said that it was wrong to have a class hierarchy where you had a base Rectangle class, and then you had a Square class that inherited from Rectangle.

Now, I know that in general people went too hog-wild with inheritance when they first started using object-oriented programming. The canonical wisdom from the Design Patterns book is that if you have a class for an encryption chip and then you have different kinds of encryptors, rather than have a base EncryptionChip class and then have AesEncryptionChip and Rot13EncryptionChip and etc, all of which inherit from EncryptionChip, you should instead design EncryptionChip to contain an Encryptor class which does the actual encryption (this is know as containment or aggregation). That way you can construct an EncryptionChip with the specific Encryptor you need, but the specific Encryptor doesn't need to know anything about the EncryptionChip (as opposed to a subclass, which does need to know about its parent class). In OO terms they are more loosely coupled, which means it's easier to make changes if needed. If you design the Encryptor class so that EncryptionChip only deals with an abstract base class, and the concrete Encryptors inherit from that base class, then you have the design pattern known as the Strategy.

But in the case of Square inheriting from Rectangle, I don't see what is wrong. I suppose you could have the Rectangle class have a member that did some sort of ValidateSize() function, which for the Square would fail if the x and y dimensions were unequal, but that seems over-designed. Anyway, the argument against Square inheriting from Rectangle was not about the internals of implementation, but rather about the external behavior that this Rectangle-that-is-really-a-Square would present to the world.

The argument specifically relates to the Liskov Substitution Principle. The LSP informally states that if S is a subtype of T, then objects of type T in a program may be replaced with objects of type S without altering the program. In this specific case, if Square is a subtype of Rectangle, then objects of type Rectangle in a program may be replaced with objects of type Square without altering the program.

At first glance this doesn't seem like a problem for Square. After all if you are using a Rectangle somewhere and you replace it with a Square (which inherits from Rectangle and thus supports at least the same public interface) then everything should work. And this seems "right", because in a mathematical sense a square IS a rectangle, so an object-oriented design rule that disallows a Square from being a Rectangle would seem to indicate a bad rule.

But, the Liskov argument against Square : Rectangle is that if you were to set the parameters of something you thought was a Rectangle, and you happened to set x != y, then it would work for a base Rectangle, but not for a Square (since the Square presumably fails in some way in that situation). Thus, designing Square to inherit from Rectangle is wrong because a Square CANNOT be substituted for a Rectangle.

I'm not buying it. First of all, as I said, a square is a rectangle. But also, if you dig deeper into Liskov (meaning you read the Wikipedia entry), it defines it formally as:

Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a subtype of T.

And to me there is nothing in there that disallows Square from inheriting from Rectangle. Everything that could provably be true about a rectangle is certainly true about a square. I don't consider "Well, x and y MAY be different" to be a provable property--a rectangle says nothing about the relationship between x and y, so there is nothing for a square to contradict.

Further, if you look at Liskov from a Design by Contract perspective, it states that preconditions cannot be strengthened in a subclass, and postconditions cannot be weakened. Which is fine: in moving from Rectangle to Square you are strengthening a postcondition (by adding one that says x must equal y).

The book The Pragmatic Programmer also briefly touches on Liskov, defining it (on pp. 111-112) as:

Subclasses must be usable through the base class interface without the need for the user to know the difference.

I don't see a problem here; you would certainly be able to use a Square through the Rectangle base class. I mean, your Rectangle.SetXY() method might fail, but any method you call might fail; if some code handed a Square off to other code that was using it as a Rectangle, it's presumably because they wanted something to fail in that situation (while allowing that other code to remain loosely coupled to themselves). The Pragmatic Programmer also says (in reference to Liskov and DBC) "A subclass may, optionally, accept a wider range of input, or make strong guarantees." Which is exactly what a Square is doing, making stronger guarantees.

So, my conclusion is that the Liskov argument, in this situation, is wrong, and (at least from that perspective) it's perfectly fine for Square to inherit from Rectangle. The amazing thing, of course, is that all this is so unclear, so many years after object-oriented programming came about.

Posted by AdamBa at 12:11 PM | Comments (5) | TrackBack

July 08, 2007

The WPA Remodel, Week 8

It's been four weeks since my last report, which means we should be about halfway there.

The team is doing okay, we got a little bit better at calling into our daily Scrum meeting but then have slipped back. With the EE/TwC Forum and then the July 4th week, it will take a couple more weeks until we see how the team is working now. Our manager is coming back from sabbatical in 4 weeks, which might change the dynamic a bit (although he will also have no office and will be wandering around campus as his meetings dictate, just like the rest of us).

I also got to don a hard hat and visit Building 21 to check out the construction progress. They had all the permanent walls framed and sheetrocked, but there were no lights on. The upshot was that the team areas, which are where the windows are, looked bright and large, and the interior places, where offices will be, looked dark and dingy. I almost felt sorry for those poor managers who will be constrained to the inside spaces (there are also more permanent walls than I thought there would be, which means less light getting to the interior, since the permanent walls are solid while the demountable ones are frosted glass). Construction is still right on schedule, targeting mid-September move in.

In my search for spaces to alight on main campus, I discovered Building 121. This is one of the old Spacelabs buildings. Building 121, first of all, has a cafeteria that is large enough to put Building 1 in--not the people, the whole building. And they serve pho every day. Then when you go upstairs, facilities did a nice job with the building (I'm not sure how much they remodeled it). It has interesting colors--when you hear that the third-floor hallway has one wall painted in dark brown you might think it looks funny, but it actually turned out well. They also put in several flexible spaces: there are "phone rooms" (small rooms with a desk/phone and a sliding door) and "phone booths" (even smaller, no door). Then they built a couple of "work suites" which have 10-15 desks in a common space. Snazzy wall graphics also. They are evidently for people on short-term visits from other Microsoft sites, but we were given cardkey access to one of them during the remodel. It's a nice place to work and there's been nobody else there when I dropped by. Say what you will about Microsoft, but they know how to make the trains run on time.

Posted by AdamBa at 12:22 PM | Comments (0) | TrackBack

July 07, 2007

07-07-07

Today is July 7, 2007, which of course abbreviates nicely as shown in the title. For some reason I like to post blog entries on days like today as proof that I did actually take note of their awesomeness, as I was experiencing it.

I can still remember the time, gosh it must have been about thirty years ago, when my father pointed out to me that it was 7-7-77.

In other news related to this date, it would have been Robert Heinlein's 100th birthday (nice how the slashdot URLs happen to have the date in them in 2-digit format, so they encode "07/07/07" for all stories posted today), which means he was also born on 07-07-07.

And Boeing is planning to introduce their new airplane, the 787, tomorrow, on 07/08/07.

Posted by AdamBa at 03:16 PM | Comments (2) | TrackBack

July 02, 2007

Switcheroo

In the last few months, I have heard the following from people inside Microsoft:

  1. Microsoft does a bad job with dependencies between groups; we need to stop treating them as adversarial I-win-you-lose situations where my backup plan is just a schedule hiccup away from being invoked, and instead commit both teams to succeed or fail together.
  2. Microsoft needs to stop developing products just because they are technologically cool; we need to think about whether a market exists for a product.
  3. Microsoft teams need to stop focusing only on a single competitor, and instead think about the customer experience as a whole; we can't display our organizational chart when the user puts in a flash memory card.

These are related; if you want to create a consistent experience across products then you have to take the customer's viewpoint, coordinate work between multiple groups, and not focus only on a specific competitor. And I agree to some extent with all of these. The problem is, at various times in our recent history, people have been adamant about proposing the opposite view. People who argue for the views above often flash a quick mea culpa smile about, "I was the worst offender back in the day, but now I've seen the light and reformed." But even today you could make reasonable arguments opposed to those:

  1. When you have a dependency, the other group may have different business goals and may fail to deliver for legitimate reasons; if you don't have a fallback plan then your customers will suffer due to internal Microsoft issue they care nothing about.
  2. Microsoft needs to be a technological leader; this has always been one of our strengths and we need to leverage it. If we wait for our customers to tell us what they want, we will never create new markets.
  3. When a competitor is laser-focused on a specific segment of the market, we need a Microsoft team that is also laser-focused on the same segment of the market; if we allow that team to be distracted by trying to integrate with other Microsoft teams, then our size winds up hurting us.

I think Microsoft goes through periods where we pick one or the other extreme of these. Cynically (but probably realistically), this depends on what competitor is foremost in our sights right now. When Google was kicking our tail in search, it seemed evident that out search needed to have some independence from the rest of MSN; when Apple ships a product like the iPhone, then connected experience jumps to the forefront. The problem for Microsoft is that we don't seem to have corporate DNA that keeps us proactively working one way or the other; we switch reactively. When you veer back and forth you wind up tuning your resources (your people, most importantly, since in my mind everything comes down to hiring and retention of good people) to the problem at hand, and then when you veer back you may not have the right team in place. How many people threw themselves into a beautifully planned cross-team development cycle and then had their careers derailed when the dependency pulled out and they had nothing to ship? So maybe people with that vision left Microsoft, and then when you need to compete with Apple you don't have anybody around who can pull that off. Then you finally put that kind of team back together and the laser-focused people get disgruntled, and then you need laser focus and the larder is empty. You get the idea.

Just looking at Microsoft's current crop of competitors, you can tell that some of them are the type that will inspire laser focus, and some of them are the type that will inspire broader cross-team cooperation. Tivo, iPod, OpenOffice, Linux, Skype, Wii, Oracle, IBM (which is my own random list I pulled out of the air, not any official internal list of our competitors)...you can run down the list and check off Focuser, Broadener, Focuser, Broadener...should be an interesting ride to say the least.

Posted by AdamBa at 06:04 PM | Comments (0) | TrackBack

July 01, 2007

Forty

Do you know that "forty" is the only number in English whose letters appear in alphabetical order? Although I read that on Wikipedia, so maybe it's not true. In French, the words for two and five have this property. Then I guess it gets hopeless since the teens end in "ze", and the tens end in "te". But wait, hold the phone, one hundred (or at least "hundred", which is all you would typically say) in French is also in alphabetical order. Fascinating.

Forty is also the age I turned today. Me and Pamela Anderson, who were both born on July 1, 1967. This happened to be Canada's 100th birthday. Because of this I got to ride in a parade when I was ten; I presume that over on the west coast Pamela also derived similar awesome benefits from her birthdate. I recall that in that year, 1977, they picked a kid from each of the provinces who was born on 7/1/67 and toured them around the country doing something or other. I wasn't the representative for Quebec, which is not surprising since 1) I wasn't French and 2) I wasn't "really" Canadian and 3) I wasn't born in Canada. I did play ice hockey, if they were looking for symbolism.

So, I'm embarking on my fifth decade, but I'm not that old. I was at Microsoft the other day and somebody that I hadn't seen since 1990 recognized me and said I looked the same as I did back then.

Posted by AdamBa at 10:05 PM | Comments (1) | TrackBack