I can emphatise with Microsoft. Their operating system is used on most personal computers around the world and, partly as a result, they’re an incredibly huge target for nasties. Making sure this huge userbase is patched and updated must be an incredible challenge.
Auto restarts though? Not cool.
This evening, I was putting the finishing touches on a C# assignment. While I’ve long since relegated Windows to sparingly used virtual machines on my Mac and Linux boxes, I still harbour a soft spot for Visual Studio. Going back to the ancient versions of Visual Basic (VBENV300 anyone?) and Visual C++, the interface brings back happy memories from my childhood.
I’d also say, Eclipse, NetBeans and Xcode have improved over the years, but Visual Studio is still possibly the best IDE, if you can tolerate Windows font rendering. Did I just lose some hipster cred?
But I digress. While typing away, quite literally on the last few lines of a current project, the Windows 7 virtual machine rebooted to perform a system update. Without warning, my environment began melting around me, first with Notepad and a few other utilities, then finally Visual Studio. No questions whether I wanted to save my work, no confirmation message boxes. Just ZAP, off like a puff of smoke.
People on Twitter saw what happened next. After the machine rebooted, Visual Studio asked if I wanted to restore my unsaved project. Having seen how terrible restore features are on Microsoft Office, LibreOffice and too many other applications to mention, I should have known not to click yes. Yet, I did.
After that, the fun really began. When I tried loading my botched project, cryptic error messages appeared. I tried moving my Visual Studio directory in the hope of creating a fresh environment, to no avail. I tried launching the solution file directly from Windows Explorer, which crashed Visual Studio.
Of course I had backups and a commit history, but not for the last hour of work I’d done at the coffee shop I was sitting. Though I was wounded, perhaps that would help to restore my hipster cred. If I wanted to be a hipster, how mainstream.
Suffice to say, the volume of results from a search indicated it was a common problem. Fortunately, StackExchange had the answer, which suggested I clear my cache and reboot Visual Studio.
So what’s the take away from all of this? First, don’t trust document recovery in anything. It almost never works, and invariably makes things worse. If you’re on a notebook, turn auto reboot off on Windows.
That reminds me, I need to figure out how to turn auto reboot off on Windows.