Monday, January 21, 2008

Try this instead..

Two timesavers when Windows misbehaves:

(This is obviously just some random person's opinion, and not advice from any major software company.)

Logoff/Logon, instead of rebooting

Windows occasionally gets into a weird state where, well, things just stop working - the start menu doesn't launch some apps anymore, clicking links in Internet Explorer doesn't work, context menus stop working, etc.*

Instead of rebooting Windows to get things working again, try logging out and logging back in. When Windows (and the apps that plug into the Windows shell) get into some weird state, you don't need to reboot; a logoff shuts down the Windows Explorer, and a logon loads it again.

The system services in Windows generally don't get into too weird a state. So they can just keep on running during your logoff/logon.

Recreate your profile instead of reinstalling Windows
On your home machine (not a domain-joined machine):
If your Windows installation is in a terrible state (too many application installs and uninstalls, weird application crashes at weird times, file associations that don't work anymore, etc):

Instead of wiping and re-installing Windows**:
Back up all your files
Log on as a different user on the machine
Delete the user profile of your user (in Computer Properties, Advanced Settings)
Log on as your old user account
All your files will be gone (you did back them up, didn't you?) but you will have a clean registry, and as far as all applications are concerned, you are a new user.
Restore your files

The Windows registry consists (simplifying here) of two parts: HKLM (machine settings) and HKCU (your user settings)
When Windows gets into a weird state, you can mostly fix all the issues by deleting HKCU (by deleting the user profile), instead of reformatting the disk (which, obviously, gets rid of HKLM and HKCU)
You lose some settings in some apps (because you start off with a fresh HKCU) but you were going to reformat and reinstall anyway. And you don't need to reinstall all your drivers. Again.

(Translation for Unix types: This method is about the same as deleting all the .* files in ~, I guess.)
*My Macbook gets into the same state sometimes (I get unejectable CDs, for some reason). The same logoff-logon approach works there too.
**Don't do this if you rely on certificates in your user cert store, for things like EFS. This method makes bad things happen in that scenario, I think.
And some applications (some games) don't like this method. But things like Office just keep on working.

Thursday, January 17, 2008

Who copied who?

(Or is it Who copied whom? I never can tell.)

I always found the sheer amount of human effort in the Microsoft-copied-Apple interweb flamewars really funny.
First, the accusations: Microsoft stole X. And then Apple-copied-Microsoft responses. And the PARC history lessons. (Somebody should come up with the equivalent Godwin's Law for PARC and Windows/Mac OS flame wars.)

The OS-engineering world is pretty small. A surprising number of Windows employees have worked at Apple in the past. And vice versa. Are these guys stealing?

(The same happens at Boeing, apparently: A large number of Boeing engineers have also worked at Airbus. And the other way round.)

Another interesting note: Apparently, we hire an external company to do some of the Windows icons. A lot of those designers use Macs. (The Vista icons were a bit too Maccish for my tastes, which is why I asked around.)

Anyway: You-won't-believe-me time:
One of the Windows 7 features I came up with is also in Leopard. It is in this list.

(No, for obvious reasons I'm not going to say what the actual feature is. I like my job.)

I came up with the feature idea, designed it, prototyped it. My devs coded it (against the rules, very early in the first Win7 milestone, when we were supposed to do code cleanup and maintenance) and checked it into a side feature branch. A month later, the Leopard feature list is announced.

I swear I had no idea that Apple was working on the same thing in Leopard. How could I? Apple runs a pretty tight ship.

I'm pretty sure Apple had no idea about my feature. (Seriously, it is not the most headline-grabbing thing in that 300 list. It is a pretty handy feature, though.)

So, who copied who?

Tuesday, January 15, 2008


Due to a freak snowstorm (in Seattle!) I spent most of the day on the couch - no commute to work for me today.

Which means I spent most of the day looking at the Macworld announcements (A Tablet PC is a great device for web-surfing on the couch. Highly recommended.)

My opinions:

Time Machine: Meh.
For $300/$500, I fully expect somebody to come over to my house every day, to backup all my computers. After giving me a foot rub. I wasn't expecting a boring-as-a-box-of-bandages Airport Extreme box with a hard disk in it.

Seriously, with a name like Time Capsule, I was expecting the device to look like this:
That's the robotic turret from Portal, in case you didn't play the best game of 2007. And 2008, probably.

Is it just for backup, or can I use it as a regular hard disk? (I'm guessing yes, as that's how Time Machine disks work today.)
Can I backup/access files across the internet? Doesn't look like it.
Windows Home Server does allow you to do that, but it also suffers from overpricedness.
Oh, and "server-grade" hard drive? That's a pretty woolly statement.

I'd still like one, though. But I wouldn't go to much effort. I'd pick it up if you dropped one off at my doorstep.

$20 Touch Upgrade: WTF?
There has to be some legal reason for the upgrade fee. Maybe some technology in the bundle has a licensing fee. Can't think of what it could be, though.

Macbook Air: Hmmmm
This is either the new Cube, or sheer genius.

Crunchgear hits the nail on the proverbial.

Dumping the DVD drive is a risky move. Yes, they are bulky, and are not used very much. But walk around any airplane/train, and you'll see a huge number of people with laptops watching movies. (The general public seems to have horrific taste in entertainment. Seriously, why is CSI: Miami popular?)

Here's a hint, Apple: Not all those people are going to rent a movie off iTunes for a four-hour flight, like you cheerfully propose (See "Ahead of the Curve"). I can borrow a movie from my roommate's DVD collection. For free. For more than 24 hours. People generally pick the easiest and cheapest solution available to them.

Like ripping your CD collection? Not on your Air, you don't.

So, this is not for the general public. Probably. But the Air will be the new status symbol. Unlike the Cube, you can cart it around with you, to show everybody your newly purchased Good Taste in Technology.

The Remote Disk feature is typical Apple: A innovative idea in theory, woolly in practice:
Can I rip CDs? (Probably not)
Watch DVDS? (No?)
How fast would a software install be, via Remote Disc/wireless network? (Slowish, I would guess.)

I expect CEOs to love the Air. And support techs to hate Remote Disc.
They should really include the USB DVD drive as a standard item.

AppleTV: Must buy
I'm buying one of these. Although; The Xbox 360 has had the same thing already. Kinda. But I trust Apple to (a) get content from every studio, and (b) do a better UI.

Though, the watch-a-movie-within-a-minute statement by Jobs is pure bullshit. We have a lot of people who crunch numbers like that, and the average consumer is not going to get that.

The fact that the average ( consumer can now easily get HD content via their Internet connection (via Apple, or Microsoft) means that HD-DVD is dead. As is Blu-ray.
Check Craiglist Seattle for a cheap HD-DVD player tonight.

The registry

Just finished reading the comments in my 'Big changes' post; there are some interesting comments about the registry in there.

Could the registry be replaced? Sure, in software, pretty much any change is possible.
In practice though...If you were to replace the registry, you would end up with something that pretty much looks exactly like the registry.

Go take a look at all the programs on your hard disk that use the registry APIs in [consults wikipedia] in advapi32.dll. (There is a way to dump the APIs that a binary uses with link.exe; wish I could remember the command right now.)

Pretty much every executable file uses the registry, and expects keys to be in certain places in the registry. The APIs for getting/setting stuff in the registry are not going to go away for the next 10 years.

What about making a brand new son-of-registry, with new APIs, that new apps will use?
This will fix a bunch of problems (because you would be able to sidestep the mistakes you made while designing the current registry; add more metadata to keys to not roam, etc)

...but it would be decades before application developers will use it. (Because nobody is going to target their apps to Windows 7 only; they would wait before Windows 7 was the oldest OS out there before relying on that API. A lot of our external application developers only use APIs that have been in since Windows 2000. Sigh.)

I don't think...

...I've ever been this insulted.

Take a look at the 'marketing' coming out of the Microsoft marketing guys in the past couple of years. Not the brightest bulbs in the box.

Saturday, January 12, 2008

Big changes

In almost every Windows OS release so far, we've changed something major in the OS subsystems, to improve the Windows infrastructure. And that generally screws up application or driver compatibility:

Windows 95
Long file names - Application developers had to fix their applications to support long file names. (A good thing, though: What is in 1NTINPRS.AVI?)

Windows NT
Driver developers had to write drivers for a new driver framework because of the hardware abstraction layer. Actually, most of them just stayed away, and supported Win9x only.

Windows 2000
A major annoyance for driver developers, who could ignore the NT driver models up to this point. Win2k ran on NTFS, and had locked-down permissions - developers couldn't install their application's files in \windows\system anymore.

We were telling corporations to set up their users as non-admins on their machines, and for the first time, corporate users in were logging in without admin rights, breaking all sorts of enterprise apps.

Consumers just sailed past, on to:

Windows XP
Installed on NTFS on default - breaking lots of applications that were used to the wide-open, unsecured world of FAT32.
We were telling the dads (or moms) of the world to run as administrator, and set up non-administrator accounts for everybody else in the household. Pretty much nobody did that - they all just logged on as Administrator. A situation that almost every bit of spyware exploited.

Which brings us to the OS everybody loves to hate (that isn't actually that bad) - the fustercluck known as:

Windows Vista
This time round, punch-drunk from all our security issues, the Windows team said: Fuck it, let's just lock it all down:

AUC: All your applications will run as non-administrator, even if you have an administrator account. No excuses. We've been telling you that you should do this since 1999.

A new graphics driver infrastructure: We had to protect the system from video driver crashes, as graphics card companies care only about performance, not stability.

Session 0 Isolation: No system service can directly create a UI. Lots of drivers and antivirus apps broke, but we fixed up a major security design flaw in Windows.

At this point, I can't think of any subsystem in Windows that needs a major change. *

Of course, with every new Windows release, subsystems are tuned up and cleaned up, but as far as I can see, it does not seem like there is a major bit of architecture that we need to change radically (as far as you application and driver developers are concerned). 

And that would be a good thing - your applications and drivers should then hopefully just keep on working in Windows 7. (And it does seem that we got bit in the ass a bit too hard with all the Vista appcompat issues.)

*as far as I can see. Who knows, a SuperUAC might be in the works. They might remove all security feature from the OS. They might make the UAC prompt pop up every five minutes. They might require driver writers to rewrite their drivers in Cobol.

In this Slashdot post...

...about Firefox in large corporations:

Only this comment is worth reading.

I used to read Slashdot every day. Now it is more like once a year.

iPhone and Exchange and Microsoft

This is interesting - Apple is hiring people to work on Exchange support in iPhone...

This will, obviously, make the iPhone much more palatable to your corporate IT department...

(This is interesting, because it probably means that Apple has been listening to their corporate customers, for once. It this keeps up, Windows is screwed.)

...but keep in mind that your IT department now has their grubby fingers on your iPhone. From what I've heard, most corporations won't allow employees to sync their phones with Exchange servers unless they support the Exchange 'remote wipe' protocol - If your phone gets stolen (or you left it in a cab after an evening of deal-making and sake) your IT department can wipe it remotely. Yikes!

I don't trust my IT department with that kind of power. But I can understand the corporate security dilemma.

The other interesting thing about Exchange on iPhone is that is validates my opinion that Microsoft employees have been living in a fog for a while:

Every Windows Smartphone owner I know, outside the company, hates their phone - they got lured into buying one on the appealing prospect of having their phone be their digital butler - It sounds great to have a device that wakes you up in the morning, reminds you of meetings, gets your email from anywhere, and allows you to browse the web from the back of the cab (Googling Sake+Strippers+Manhatten)

Instead, what they got it a phone from a shitty also-ran cellphone manufacturer, with a generic Windows OS, tied to a cell company that nickel and dimes them to death. With a alarm clock that works half the time. With an email setup process that is horrendously difficult. With a web browser that is close to useless.

Every Windows Smartphone owner I know, inside the company, loves their phone - because the average Microsoft employee loves to dink around with something until it mostly works.

The alarm clock problem? Jonny Q. MSEmployee researches the problem, downloads the new firmware or Beta Windows Mobile OS off company servers, and great! the problem is fixed.

The email setup problem? Jonny Q. MSEmployee loves tinkering and investigating until he figures out how to get it to work.

The crappy web browser problem? Jonny Q. MSEmployee updates the OS, gets a new browser off the internet, etc, etc.

Jonny doesn't mind all this effort (it's fun! look how much better my Windows Smartphone is now!) but the average consumer? Not so much.

This disconnect has a lot of Microsoft employees thinking that their Smartphones are actually good, and a viable competitor to the iPhone. They are not.

Friday, January 11, 2008

Another one?

We're building yet another UI platform?

According to, we have:

  • Windows Presentation Foundation (WPF) - A managed UI platform. Bloated, slow. We spent a bunch of time in 2006 trying to reduce the working set and startup time.
  • Silverlight - A rewrite of WPF in unmanaged code; small, fast, excellently written. But probably too little, too late to make WPF and XAML relevant to the internet.
  • Windows Forms - A workhorse: a bunch of enterprise apps run on this .Net 1.0 and 2.0 technology.
  • Win32 - The oldest one. Ancient technology. And no developer wants to work with this.
  • Media Center Markup Language - Written by the MC team; flashy. But it doesn't do a lot - just enough to draw the MC UI. You can't use it as a UI platform for all of Windows.
We actually have another one - DirectUI - an internal-only UI platform that is used in XP and Vista to draw control panels, and bits and pieces of the Windows Shell. It was a pre-XAML version of XAML. As far as I know Windows 7 will still have it.

This means that we have 6 teams that work on the same thing - a bit of code that draws the user interface for applications on the screen.

If we were a sane company, we would have the following (from oldest to newest):

Win32 (the oldest one)
Windows Forms (the replacement, to make programming UI better)
(A flashy and fast) unmanaged WPF for Silverlight and Media Center

Wednesday, January 9, 2008

Want your Windows Vista bug fixed?

Do you hit the same annoying Windows Vista crashing bug day after day?

Please, please, please click the 'Send information' button when you see this crash dialog.


If in the very unlikely event that you are the first person to encounter and report this bug, a new entry in our bug database is entered automatically.

If anybody else encounters the same bug, and reports it, our automated crash reporting system finds the correct bug in our database, and then updates a counter. (Basically, there is a field in the bug that indicates that X people on the internet have encountered this bug.)

If you don't report the crash, that counter is not updated.

Why is that important?

Our ship room (a bunch of guys who decide which bugs should get fixed and added to SP1, and which bugs are too minor to be fixed) rely a lot on this counter. If the counter reaches more than [redacted], we fix it.

So, every time you encounter any crash - hit that 'Send information' button. Please.