Today while attempting to switch off my monitors, I accidentally hit the toggle button for my computer's power, immediately turning it off. Whoops. That's alright, NTFS is designed to be resilient in the face of power loss, so I turned my computer back on. After BIOS did its thing, Windows 8.1 ran some sort of "automatic repair" on my computer and attempted some operation. (Before asking me, and without telling me what it was!)
Automatic Repair couldn't fix the "problem", and so it dumped me into the repair mode UI. Since I was fairly certain that nothing was wrong with the machine, I chose the Continue (try to boot normally) option, which is under the advanced tools menu for some reason. After sitting at a black screen with high disk utilization for a few minutes, Windows came up as normal with only the expected event 51 entries in the Event Log.
So all that was a really long-winded way of saying that everything was fine.
I really wish more programmers would account for the fact that power failures can happen at any time, and that it shouldn't be an earth-shattering catastrophe if the program or machine doesn't go down gracefully. I understand that there are certain critical operations that cannot be continued if power is lost in the middle, but surely an attempt can be made to continue with whatever state was saved to disk before panicking and displaying scary messages to the user.
No comments:
Post a Comment