August, 2005

  • The Old New Thing

    A ticket to the Windows 95 launch

    • 23 Comments

    A limited number of seats at the Windows 95 launch were available to the product team, so there was a lottery to see who would get one of those tickets. The remainder of the team would be standing on bleachers hidden behind the stage, to be unveiled at the grand climax of the product launch festivities.

    I happened to have been a winner in the ticket lottery, but the fact that there weren't enough seats for everybody created some degree of grousing among the have-nots. As a show of solidarity, I forewent the special VIP pass and ticket, instead taking my place in the crowd of red, blue, yellow, and green T-shirts waiting backstage and giving the pass and ticket to a colleague who really wanted to be in the tent.

    While I waited in the staging room to be positioned for the grand finale, I was somewhat surprised to see my colleague in the room with me. She gave me back my unused VIP pass and ticket, saying, "It didn't feel right being out there in the tent. This is where I belong."

    I probably have the only unused ticket to the Windows 95 launch.

    While standing on the bleachers behind the screen, we could hear everything going on. When Jay Leno disappeared backstage to head off to his next scene, he emerged between the two sets of bleachers. We silently waved at him, but he was obviously focused on his job and didn't have time to schmooze with us.

    It was very hard staying quiet for so long backstage. Our presence was supposed to be a surprise; any noise would give us away. There were moments where whispers got out of hand and people had to wave frantically (or—heavens—shush!) to restore quiet. I thought for certain one of our out-of-control moments had let the cat out of the bag, but from talking to people afterwards who were in the tent, I learned that nobody noticed a thing.

    Our only instructions from the director were "Wave, clap, and cheer!", keeping up the energy until the last of the crowd had filed out. Everything beyond that was improvised. Somebody started up a cheer, with half of the bleachers shouting "Windows!" and the other half responding "95!" I'm sure there were other things we did to maintain the excitement, though I can't remember any of it now. I just remember that after a while I got tired of smiling and clapping but kept it up because I was on the aisle next to all the attendees, and that's show business!

  • The Old New Thing

    Buying an entire Egghead Software store

    • 22 Comments

    During the development of Windows 95 (which released to the public ten years ago today), application compatibility was of course a very high priority. To make sure that coverage was as broad as possible, the development manager for Windows 95 took his pick-up truck, drove down to the local Egghead Software store (back when Egghead still existed), and bought one copy of every single PC program in the store.

    He then returned to Microsoft, unloaded all the software onto tables in the cafeteria, and invited every member of the Windows 95 team to come in and take responsibility for up to two programs. The ground rules were that you had to install and run the program, use it like a normal end user, and file a bug against everything that doesn't work right, even the minor stuff. (Of course, you had to provide the program to the person investigating the bug upon request.) In exchange for taking responsibility for ensuring that Windows 95 was compatible with your adopted programs, you got to keep them after Windows 95 shipped. If you did a good job with your two, you could come back for more.

    The cafeteria was filled with Windows 95 team members, browsing through the boxes upon boxes of software like bargain-hunters at a flea market. And there were the inevitable "What'd you get?" comparisons afterwards.

    I picked up only one program, an English/German automatic translator. It ran fine but produced pretty bad translations. (Not that the quality of the translations was in any way the fault of Windows!)

  • The Old New Thing

    Why are icons multiples of 8 pixels in width?

    • 20 Comments

    Icons are all multiples of eight pixels in width. It's not just because computer people like powers of two.

    Back in the early days of Windows, video cards were monochrome or, if you were lucky, 16-color. These were all planar video modes, the mechanics of which were discussed earlier. Now imagine copying a bitmap to the screen where both the bitmap and the screen are planar. If the starting coordinates of the destination was an exact multiple of eight, then the bitmap could be copied via block transfer instructions. On the other hand, if the destination was not a perfect multiple of eight, you had to do a lot of fancy bit shifting to get it onto the screen.

    This is the source of the CS_BYTEALIGNCLIENT window class style. With this style set, the window manager will try to position the window so that the x-coordinate of the client rectangle's upper left corner sits at a perfect byte boundary of video memory. If you were running at a 1bpp video mode (monochrome or 16 color), this meant that the x-coordinate was a multiple of eight. By positioning the window this way, a bitmap copied to the upper left corner of the client rectangle would be copied via fast block transfer instructions.

    If you look at dialog box dimensions from Windows 95 or earlier, you'll find that they are nearly always a multiple of 32 DLUs in width. Since four horizontal DLUs equal one average character width, you had to keep your dialog width a multiple of 32 to ensure that the final dialog size was a multiple of eight.

    Keeping bitmap widths such that they represented exact byte boundaries was important for performance on the machines of the day. Copying blocks of pixels around was typically performed in three major steps: A thin vertical strip from the left edge of the bitmap to the first byte boundary, then the bulk of the bitmap up to the last byte boundary, and finally a thin vertical strip from the last byte boundary to the right edge. If you kept your eyes open, you could actually see these three stages of drawing occurring. (Like I said, machines of the day weren't all that fast.) Keeping things byte aligned and at byte width meant that the two thin vertical strips had zero width and therefore could be optimized out.

    Of course, in today's world of 32bpp displays, all these old considerations are largely irrelevant.

  • The Old New Thing

    How do you convince developers to pay their "taxes"?

    • 68 Comments

    The Tablet PC team have a tough task ahead of them at this year's PDC: They have to get people to care about power management.

    The reason why this is tough is that power management is rarely a deal-maker. If a user is evaluating, say, personal finance software, how much weight are they going to place on which program consumes less battery power? That's probably a third- or fourth-level tiebreaker. No amount of power management is going to overcome the fact that your program's interface is harder to use than your competitor's. Nobody ever said, "Oh, yeah, I switched my word processor from X to Y because X was chewing too much battery power." When a battery doesn't last very long, users tend to blame the battery, not the software that is draining it.

    Power management falls into a category some development teams call "taxes". It's something you do, not because it actually benefits you specifically, but because it benefits the software landscape as a whole. Other taxes include making sure your program plays friendly with roaming user profiles, Fast User Switching, Hierarchical Storage Management, multiple monitors, Remote Desktop, and 64-bit Windows.

    Of course, not all development teams in the world are so diligent as to pay all their "taxes". I suspect most cheat on their taxes, and some of them just don't pay any at all.

    So here's my question to you: How do you convince developers to pay their "taxes"? (Should developers have to pay taxes at all?)

  • The Old New Thing

    This might be for real, even though it comes out at 7am

    • 37 Comments

    One of our researchers IM'd me yesterday to let me know that someone she interviewed mentioned that some people suspected that I wasn't real because most of my posts are published at the same time every day.

    I dunno. The evening news comes on at the same time every day, but I'm pretty sure they're real. Maybe I should be more suspicious.

    If I were real.

  • The Old New Thing

    Justifiable assault with folding chair

    • 23 Comments

    Everybody's lunchtime conversation a few days ago was the riot at a used laptop sale in Richmond, VA. [Local coverage.] What got me was this fellow Jesse Sandler:

    "I took my chair here and I threw it over my shoulder and I went, 'Bam,'" the 20-year-old said nonchalantly, his eyes glued to the screen of his new iBook, as he tapped away on the keyboard at a testing station.

    "They were getting in front of me and I was there a lot earlier than them, so I thought that it was just," he said.

    Because if somebody cuts in front of you in line, you are perfectly justified in assaulting them with a folding chair. That's one of the guiding principles this country was founded on.

  • The Old New Thing

    How many floppy disks did Windows 95 come on?

    • 36 Comments

    Thirteen.

    In case you were wondering.

    And those were thirteen of those special Distribution Media Format floppies, which are specially formatted to hold more data than a normal 1.44MB floppy disc. The high-capacity floppies reduced the floppy count by two, which resulted in a tremendous savings in cost of manufacturing and shipping.

    (I'm sure there are the conspiracy-minded folks who think that DMF was invented as an anti-piracy measure. It wasn't; it was a way to reduce the number of floppy disks. That the disks were difficult to copy was a side-effect, not a design goal.)

    (For comparison, Windows 3.1 came on six floppies. Windows NT 3.1 came on twenty-two. And yesterday, one of my colleagues reminded me that Windows NT setup asked for the floppy disks out of order! I guess it never occurred to them that they could renumber the disks.)

  • The Old New Thing

    Let's just make up some dollar values and print them as fact

    • 35 Comments

    Everybody is going nuts over a patent decision regarding the iPod interface, but that's not what I'm writing about (so don't ask me for my opinion). Rather, I'm reacting to the claims being made by many people that Apple will have to pay Microsoft $10 for every iPod.

    What I want to know is where this amount "$10" came from.

    Multiple people are confidently reporting a sawbuck as the amount in question. GeekCoffee attributes it to AppleInsider.com, but a search of AppleInsider turns up no article where they assigned a monetary value to the issue. A site called TrustedReviews repeats the $10 price tag with no source. ("You don't need a source. Just trust us!") MacNewsWorld even puts the amount in its headline, although the article gives no justification for how they arrived at it. Sky News helpfully converts the amount to £6 but again provides no source for this value.

    Are people just making up stuff and publishing it as fact? Or is there some root source for this $10 amount that I'm missing and which nobody is bothering to cite? (My suspicion is that one person took a wild guess and everybody else decided to run with it.)

  • The Old New Thing

    What are the access rights and privileges that control changing ownership of an object?

    • 11 Comments

    Changing the ownership of an object (typically a file) is not difficult in principle: You call the SetNamedSecurityInfo function with the new security descriptor.

    The hard part is getting to that point. (Thanks to John, a colleague in security, for correcting an earlier draft of this entry.)

    If you have WRITE_OWNER access on an object, then you can change the owner of the object to yourself (or to any SID in your token that has the SE_GROUP_OWNER attribute): you can take ownership. However, you cannot change the owner to somebody else: you cannot give ownership to another person. Doing that would allow you to violate quota restrictions.

    Imagine if this were possible, that you could change the ownership to something that you aren't a member of: Your account is at its disk quota. No problem, you just find somebody who isn't over quota (like Fred in Accounting) and take some of your biggest files and set their owner to Fred. This causes the disk space to be charged to its new owner Fred, without Fred even knowing that it has happened to him. If you put the file in a directory that Fred doesn't have access to, poor Fred will start getting "You are over disk quota" messages and have no way of finding this evil file that you charged to him. It's like stealing somebody's library card and checking out books with it.

    In order to set the owner to somebody else, you need to assert SeRestorePrivilege, which by default is assigned to administrators and backup operators. Backup operators need to be able to set the owner to somebody else because restoring its security descriptor is an important part of the process of restoring a file from backup.

    But what about SeTakeOwnershipPrivilege? That privilege is assigned to administrators, and it lets you act as if you had WRITE_OWNER access (but not SeRestorePrivilege) to everything. With SeTakeOwnershipPrivilege, you can take ownership of any file, but you can't assign it to somebody else.

    And then there's the mysterious CREATOR_OWNER SID, described in a Knowledge Base article as well as in a blog entry by Larry Osterman. The important thing to remember is that granting CREATOR_OWNER SID to an object after it has been created doesn't actually grant anything to the creator or owner. Read the linked articles for more details.

  • The Old New Thing

    What I'll be doing at this year's PDC

    • 6 Comments

    I will be heading down to Los Angeles the Friday before the PDC in order to visit friends and relatives and to check out the King Tut exhibit at the Los Angeles County Museum of Art. The last time Tutankhamun came to the United States was back in the late 1970's. I was an elementary school student and a few of my classmates were lucky enough to have obtained tickets to the exhibition; they gave it rave reviews.

    I will show up at the Convention Center when the PDC proper begins on Tuesday. I am officially scheduled to be in the Fundamentals Lounge from 11:30am to 2:30pm on Tuesday, then again on Thursday all day after my talk. Unofficially, I plan to be in the Fundamentals Lounge pretty much the entire time, though I may step out every so often to check out the exhibitors' booths and hands-on labs, to eat, or just to tease the people in the other lounges.

    What this means for you is that if you have something you want to discuss with me, you can just drop in the Fundamentals Lounge and there's a good chance I'll be there. No need to make an appointment. Don't be afraid to approach me; if I didn't want to be disturbed I'd have stayed in my hotel room! If I'm not around, you can call the main Microsoft switchboard +1-425-882-8080 and ask for me, and the call will be forwarded to my mobile.

    As for my talk, it will be in the style of a lecture, so there will be no slides. Slides will be provided in the handouts for completeness, but I won't use them. I'm told the talk will be recorded, and it is my understanding that the post-conference DVD will contain copies of every talk, so those of you who attend will be able to re-live the excitement in the comfort of your very own cubicle. (And to pre-empt the inevitable follow-up question: The PDC team own the recording of my talk, so don't ask me if I can make a copy available. It's not mine to give out.)

    One consequence of giving a lecture-style talk is that I will be using a Tablet PC as a sort of electronic chalkboard. There's one catch, though: I don't own a Tablet PC myself. I'll try to borrow one from a colleague for my talk, but in the worst-case scenario, I may get up on stage and ask to borrow one from an audience member. (Downside of loaning me your Tablet PC: You can't take notes on your Tablet PC during the talk. Upside: You get a copy of all the notes and diagrams!)

Page 2 of 5 (42 items) 12345