Why Windows Vista Shouldn't Crash In 10 Seconds Or Less
My recent blog post, <a href="http://www.informationweek.com/blog/main/archives/2007/06/how_to_crash_wi.html">How To Crash Windows Vista In 10 Seconds Or Less</a>, provoked a firestorm of responses, mostly from people calling me an idiot for daring to suggest that <a href="http://www.informationweek.com/software/showArticle.jhtml?articleID=200000329">the operating system shouldn't tank</a> if you persist in holding down the Windows key and the letter "E." That sequence will open up Windows Explo
My recent blog post, How To Crash Windows Vista In 10 Seconds Or Less, provoked a firestorm of responses, mostly from people calling me an idiot for daring to suggest that the operating system shouldn't tank if you persist in holding down the Windows key and the letter "E." That sequence will open up Windows Explorer windows ad infinitum and in short order your system will stop responding.Most of my correspondents came back at me with one variation or another of the following: "Well, if you hold down your accelerator, you'll crash your car, so what do you expect if you do something stupid like that ... you idiot." (Again with the name calling.)
My original post pointed out that holding down the Windows key and the letter "E" can send Vista into its death throes. (click to enlarge image) |
Aside from the obvious and irrelevant fact that a PC is not a car, I can tell you in two words why such a sentiment is wrong: error traps. This means that good software design should account for unintentional but potentially dangerous actions and render them harmless.
In the situation I described, it's a relatively simple matter to write code that says: "If keystroke W + E is held down for time > N sec, ignore all commands after the first Y, until keystroke input stops; then reset counter."
This type of minimal forethought is applied all the time in avonics systems. All professional programmers (open source developers?) know what I'm talking about. Heck, even Windows uses this technique at times.
For example, in Windows XP, when you click "shut down" from the start menu, a box pops up in the center of the screen asking you to confirm your choice ( "Shut down, restart, stand by") before proceeding. That's to prevent an unintentional keystroke from being carried out.
Interestingly, Windows Vista doesn't implement this delay. It'll shut down on the first start menu click. One could argue that Vista's designers figured they'd get rid of that annoying second step, because when you click "shut down" from the start menu, that's usually what you want to do. However, if it was really a conscious design choice, you have to wonder why Vista's User Account Controls ask you to confirm every last little stupid click.
Many of the people who responded to my original post raised criticisms that don't seem to account for this whole idea of error traps in software.
For example, someone who calls himself "DTE" wrote:
"I have an even easier way to hose a vista machine - it only takes 4 seconds.... Hold down the button on the front of the case - it looks like a circle with a little line through the top - for 4 seconds - The machine totally shuts down!!!!! I swear!!!!!!!!"
My response to this is, if you're pushing down on your "power" button, which takes physical effort, for a prolonged period of time, this is an intentional act that the system is properly responding to by shutting down. Note that it doesn't turn off if you just tap the button.
Here's a tougher one, from "root":
" 'Your system will stop responding' is different from 'your system will crash'."
He's referring to the fact that, in the Windows+E key situation I describe, Vista will sometimes stop responding and correct itself, rather than completely lock up and crash. He's correct. However, from what I can tell, Vista stops responding not because of any built-in, input-command error-catch, but because it's got too much to do and is on the verge of locking up. A well-tempered design, using the principles of good industrial and avonics software, would obviate such difficulties.
I'd also make the point that Microsoft expends so much effort on complicated but little-used code, like that which supports the floating tool bars in Word, that it's certainly not beyond its capabilities to add catches so that Windows is less likely to be disrupted by unintentional command inputs.
Because if you don't catch the easy stuff, you end up with annoying and disruptive repetitiveness. What similar problems have you seen in Vista? What similar problems have you seen in Vista? What similar problems have you seen in Vista?
About the Author
You May Also Like