Holy cow, I wrote a book!
Most people probably haven't noticed this,
but there was a change to the requirements for file type handlers
that arrived with Windows XP SP 2:
Paths to programs now must be fully-qualified
if they reside in a directory outside of
the Windows directory and the System directory.
The reason for this is security with a touch of predictability
Security, because one of the places that
the SearchPath function
searches is the current directory,
and it searches the current directory before searching standard
system directories or the PATH.
This means that somebody can attack you by creating a file like
say "Super secret information.txt" and
creating a hidden NOTEPAD.EXE file in the same directory.
The victim says, "Oh wow, look, super secret information, let me
see what it is," and when they double-click it, the trojan
NOTEPAD.EXE is run instead of the one in the Windows directory.
Requiring paths to be fully-qualified
removes the current directory attack.
Predictability, because the contents of the PATH environment variable
can vary from process to process.
Consequently, the relative path could resolve to different programs
depending on who is asking.
This in turn results in having to troubleshoot problems like
"It works when I double-click it from Explorer, but not
if I run it from a batch file."
what program he got
out of the back of a pick-up truck.
Last year, we learned that
the ANSI code page isn't actually ANSI.
Indeed, the OEM code page isn't actually OEM either.
Back in the days of MS-DOS, there was only one code page,
namely, the code page that was provided by the
original equipment manufacturer
in the form of glyphs embedded in the character generator
on the video card.
When Windows came along,
the so-called ANSI code page was introduced
and the name "OEM" was used to refer to the MS-DOS code page.
Michael Kaplan went into more detail earlier this year
on the ANSI/OEM split.
Over the years, Windows has relied less and less on the character
generator embedded in the video card, to the point where the
term "OEM character set" no longer has anything to do with the
original equipment manufacturer.
It is just a convenient term to refer to "the character set used
by MS-DOS and console programs."
Indeed, if you take a machine running US-English Windows
(OEM code page 437) and install,
say, Japanese Windows,
then when you boot into Japanese Windows,
you'll find that you now have
an OEM code page of 932.
Marymoor Park just keeps getting better.
Just this year, they added
a little Subway sandwich shop,
so you don't even have to pack for a picnic in the park.
(sponsored by MSN).
movies in the park
First Tech Credit Union).
The latest addition is
(sponsored by Dasani).
Show a photo ID and you get a cardkey that gives you access
to one-speed coaster-brake bicycles you can borrow for the day.
Late Tuesday night,
Jenny Lam, the creative director for
this year's PDC,
came by our hallway
and asked for permission to rummage through our offices for "stuff".
They were looking for props to use to decorate a developer's cubicle
in a video they were filming for the conference.
I was able to loan her a framed letter of appreciation and my
pass to the Windows 2000 launch.
I used to have a lot more junk in my office, but I went on a cleaning
binge during our last office move and the really cool mementos ended up
at my house.
If you watch the movie and squint you might be able to make out my name
on the personalized items,
but I wouldn't hold my breath.
My stuff will be on screen for probably a quarter of a second,
and I'm guessing it
won't be big enough to read anything of significance.
(Jenny tells me that
one of the things in the cubicle is a forgery. See if you can spot it.)
They were able to get much cooler stuff from
my neighbor's office.
Among other things, he had a chemical model of
the caffeine molecule.
Incidentally, Jenny puts my Martha number at two.
I've met Jenny, and Jenny was personally interviewed by
I just think that's so neat, being two steps away from The Martha.
Not everything related to the Windows 95 launch went well.
The St. Louis Post-Dispatch reported that
a local CompUSA store found that their cash
registers crashed at midnight,
forcing eager customers to wait ninety minutes before the problem
could be resolved.
A bug in the cash register software which had lain undiscovered because
the store had never stayed open past midnight before!
And there was the
the launch of Mindows 95 in Hong Kong.
Not one to sit by and miss out on all the attention,
Apple responded with its
absolutely brilliant counter-advertisement.
Every Wednesday evening in August of this year,
Marymoor Park will be showing a movie.
Tonight's movie is Bend It Like Beckham.
The movie begins at dusk, and a $5 donation is suggested,
proceeds to be shared between the park and a local charity.
The charity tends to be thematically related to the movie;
for Beckham, for example, part of the money will go
to the Lake Washington Youth Soccer Association.
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!
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),
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
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
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
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
A thin vertical strip from the left edge of the bitmap to the first
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
Of course, in today's world of 32bpp displays, all these old
considerations are largely irrelevant.