Windows 8.1’s user-hostile backup story

Update 16th Sept 2013: What follows is a rant written after upgrading to 8.1 and seeing my automated backups just stop working and the backup restoration function also removed. An afternoon was wasted faffing about with the new File History feature which still refuses to backup files not on my system drive and deliberately ignores files in the SkyDrive folder, preventing you from having a local backup. I now use CrashPlan which behaves like Windows 7 and 8.0 used to be able to back up files.

Windows 8.1 is now released to manufacturing and those with MSDN or Technet Subs can download it now.

I have the RTM version now set up on home and work machines and have been running the Preview versions on both my Surface RT and Surface Pro. Windows 8.1 has some glaring errors.

SkyDrive integration now built in, removes features compared to the old Desktop client

You no longer have to install the SkyDrive app separately as it is now built into the OS. Windows 8.1 makes a concerted effort to force you to use SkyDrive.

image

The above is a screenshot of a screen displayed during the upgrade process. Can you see the error?

“automatically backed up to the cloud”

This is nonsense – if you delete a file from your local machine, it will be deleted from the cloud. This is NOT a backup. Live mirroring is NOT a backup. If a sync goes wrong – your file disappears completely. There is no backup.

Edit: Turns out SkyDrive has a “Recycle Bin” for deleted files, but it removes files once it is full or after 30 days. So, you might randomly be able to get your file back. Version History also only works for Office documents.

imageimage

On the left is Windows 8’s SkyDrive integration after installing the SkyDrive Desktop app. On the right is Windows 8.1’s built-in SkyDrive integration. This is now a system-level folder and doesn’t even have the syncing icons available. This folder is now virtualized and you aren’t guaranteed that the actual file will be present. Opening the file will sometimes download it from SkyDrive.

The “Windows 7 File Recovery” backup system has been removed in 8.1

Windows 8.0 actually contained two backup systems, the new “File History” and the awesome old backup system from Windows 7, threateningly renamed “Windows 7 File Recovery” as a warning that this will be removed. Lets compare the systems:

Windows 8 File HistoryWindows 7 File Recovery
Files in Libraries and desktop onlyAll files in all locations supported
No system image supportFull system image support
No progress barProgress bar

File History is Microsoft’s attempt to copy OS X’s Time Machine, except Time Machine actually backs up all your files and lets your restore the entire OS partition, just like Windows 7 did! At least you had the choice in 8.0 to use the old system. In 8.1, Windows 7 File Recovery has been removed completely, you can’t even restore your old backups!

Edit: You can create a System Image in 8.1 (Click “System Image Backup” on the File History screen) but this doesn’t work on an automated schedule, so is not an automatic backup.

It gets worse. File History is even more useless in 8.1.

“File History” no longer backs up your SkyDrive folder in 8.1

Microsoft really don’t want you to have a local backup of your SkyDrive files. Take a look at this:

image

Above: Windows 8 File History

image

Above: Windows 8.1 File History

No problem you think? Just add your SkyDrive folder to a Library and it should back up? Nope – all the SkyDrive files are ignored completely, even if you manually add them to a Library.

The response from Microsoft on this is beyond tragic (from here):

image

Your files “are protected by the cloud in case user lose/damage their device”. What about protection from user error or viruses or badly written programs? If your files get corrupted the corrupted files will sync to the cloud and then sync to all your other devices.

Conclusions

It appears that Microsoft are desperate to push SkyDrive, even at the expense of the computing safety of their customers – customers you’d hope were being educated about safe computing. Now I am on 8.1 I am personally stuck with no built-in backup system. My experience with File History has been awful – it appears to even ignore an additional Library I’ve created to include non-library files. I literally cannot get it to back up files on my computer, it is useless. I am going to have to go with a third-party backup system like CrashPlan now.

Windows 8.1 was Microsoft’s chance to undo the wrongs of Windows 8. Users are now faced with the prospect of upgrading and being faced with no backup solution, or even worse their existing backups just stopping working with no warning.

Sort it out Microsoft.

Edit: Some excellent discussion on this over at Hacker News: https://news.ycombinator.com/item?id=6388431


Why I won’t be returning my Microsoft Surface RT

I’ve picked up a Microsoft Surface RT from the “temporary” New York Times Square Microsoft Store. While the purchasing experience was a bit of a mess (untrained sales staff – I ended up having to type my own details into their POS terminal as I’m not quite sure the guy knew how to type), I managed to make off with a properly boxed (I skipped getting the staff to unbox it and walk me through the “Out of Box Experience”) 32GB Surface, Type Cover and VGA adapter.

The device

This is an amazing piece of hardware. I’ve dabbled in and out of portable computing ever since the original Windows Tablets in the form of the HP TC1100. The TC1100 was ahead of its time – a full version of Windows in a tablet with a decent attached keyboard that went together to make a case. However, the hardware was pretty bulky – fans and a display too far away from the glass, making touch, even with the included stylus, inaccurate.

This really looks like something out of a Bond film. The tapered edges and kickstand both apparently go off at 22 degrees (I haven’t measured), looking deliberate – as if designed by actual designers. I would not be surprised if some ex-Apple guys worked on this device. The battery is said to go 10 hours of mp4 video – more than enough for a long haul flight, and I can personally attest to the quick charging of the Surface up to around 50% in about an hour. The camera is at an angle to compensate for the slant when using the kickstand. Portrait mode looks slightly ridiculous, but I can’t imagine using it in portrait when just sitting the device landscape in your lap works so well.

The Type Cover is like nothing you’ve seen before – forget the comedy Bluetooth “keyboard covers” for iPad users desperate to do a bit of actual work on their devices – this is genuinely a pleasure to use. The small multitouch trackpad is great, but strangely defaults to inverted scrolling like OS X Mountain Lion. My only gripe is that they still have the Caps Lock key – I will have to delve into the Registry to switch this to a Control key. Yes, I did say Registry…

The software

Windows RT is installed by default and is the most fascinating part of the device. Many pundits have long called for Microsoft to abandon backwards compatibility and build a new operating system – if they did, it would look something like this. Windows RT is Windows 8, but without the backwards compatibility legacy. The full Windows desktop is here – the Command Line, PowerShell, Windows Explorer, Paint, Notepad, VPN connections, BitLocker – the works. The only difference is that WinRT only allows Microsoft-signed applications to run on the desktop. Visual Studio 2012 can build ARM applications but this is blocked by Microsoft – bypass the block with a registry setting and the compiled binaries are blocked by Windows RT. I suspect this is because the device is subsidized and they hope to recoup revenue from the Windows Store apps, but it might just be a ploy to force developers to build Metro-style applications. The thicker, heavier, noisier Surface Pro is due soon and will run the full x86 Windows 8 Pro, bringing legacy support with it.

If the Surface RT is meant to be used as a main or only machine, this is going to cause problems. In the Microsoft Store, non-technical members of the general public were already asking if they “could use their iPhone with it” – yes, they can, but only to charge and download photos. iTunes will not install. Firefox will not install. Even some Windows Store Metro apps will not work – notably Google’s suite. If you or your company uses Google Apps, steer clear from Windows RT until Microsoft or Google budge and allow Google Drive syncing. There could be serious backlash due to Windows RT – if enough customers kick off a storm, Microsoft might remove the signature check when running ARM binaries, allowing third-parties to treat Windows RT like a first class citizen.

In reality though, a Surface RT is not going to be your only machine. It absolutely shines as a Remote Desktop thin client – you can have Visual Studio running on your 12-core beast machine in the office and just remote in to use it. Flash is built into the browser, allowing stuff like Adobe Connect to work without a problem – the web browser version being much better than the iOS version, which still hasn’t been updated to support retina or iPhone 5 long displays. One thing you can’t do is share your screen with Adobe Connect. Full desktop-class Web Apps such as Google Docs work fine in Metro IE10 and without any browser chrome, could be mistaken for a “native” application.

Games from the Windows Store run quite badly on Surface. Jetpack Joyride has a pretty bad frame rate when lots of sprites are on the screen. Hopefully there is room for improvement in drivers, but don’t expect iPad 4 quality graphics. You cannot see pixels when sitting back and typing thanks to ClearType, but the resolution is nowhere near the iPad Retina display.

You might have a few favorite Windows applications that won’t run on Windows RT. I was worried that I would not be able to live without Windows Live Writer, but it turns out that Word has had a great blogging tool since version 2007, and it is even better with 2013.

Office 2013 RT

The first thing you should do with Surface is run Windows Update. This updates the Preview version of Office RT to the final version. Microsoft plan to deliver incremental functional updates, giving another reason to get a Microsoft Surface and not another Windows RT ARM device. Other manufacturers could cause delays to updates like Windows Phone 7 has been plagued with – carriers and device makers literally stopping you from using the latest version of the software running on your device (if MS do a Windows Phone 8, you should get it instead of any third party offering).

Office 2013 starts up very quickly. Saving to SkyDrive or the local drives just works. This really has full compatibility with Office files. The only glaring omission is Outlook – however, Exchange accounts are fully supported in the Mail application and Gmail works great in IE10.

Why I’m keeping it

I can actually do something productive with this device, unlike the iPad which has been reduced to a wife-pleasing YouTube machine. It has a great built in RDP client for when you need to use software that does not run on WinRT. It has a USB port which works with actual mice, USB drives and even my Kensington PowerPoint remote. If the space runs out, I can just insert a Micro SD card and expand the storage capacity. The Surface fills a useful void between an iPad and a MacBook Air – something that you can just throw in your bag without a laptop bag cover but can still get some work done on. Word, PowerPoint and Excel come free with Surface RT – these separately would be $30 or so on an iPad as iWork but here you get the real deal. I really am sick of lugging around proper laptops when I could just remote into a beefy machine under my desk. With LTE tethering in Japan, this is becoming a reality.

Only buy a Surface RT if you know what you are buying and can live without full legacy application support. As a thin client for real world web applications, it might make some people very happy indeed.

 


Working on an online MS Money replacement

I am finally fed up of having to install Microsoft Money and set up syncing of the data file, so I’ve decided to try and build a web based version. Mint.com does not support non-US markets and apparently does not even support adding your own transactions that have not been downloaded from a bank. “Private Money” is the codename and it looks a bit like this at the moment:

Capture

The stack:

  • ASP.NET MVC 3 as the application framework
  • Entity Framework 4.1 for ORM
  • NInject for a modular design with dependency injection
  • MigratorDotNet for database versioning with some tweaks to get it to work over different modules
  • jQuery and jQuery UI for some nice buttons, animations and AJAX loading. MVC 3 has great support for unobtrusive javascript with jQuery which is a dream to use.

I am planning on replicating the parts of MS Money that I use the most, mainly the transaction logging, reports and cashflow chart (which should be fun to make on a canvas element). Visually I am going for the Windows Live/Metro motif.


Thoughts on ASP.NET MVC3 Update and Entity Framework 4.1

Microsoft have now released an update to ASP.NET MVC3 imaginatively called “ASP.NET MVC3 Update”. This update upgrades NuGet, bundles Entity Framework 4.1 with all new templates, adds HTML5 template support and splits the jQuery libraries off into NuGet packages so they can be upgraded individually.

The bundling with new MVC projects is a sign that Microsoft has selected Entity Framework as the “chosen” ORM layer from now on. Linq2SQL is not flexible enough when dealing with pre-existing database schemas and third party solutions such NHibernate are difficult to get pointy-haired boss approval. EF 4.1 adds “code first” support where you define a very simple CLR object and it will automatically create the database tables for you. At first your eyes will light up thinking “finally! Rails’ ActiveRecord for .NET! Blessed by Microsoft!” until you find several missing pieces:

  • No migration support. The only option that EF provides when the “code first” objects behind your schema change (for instance, you add a new property) is to drop the entire database and start again. Rails has had this for years.
  • No code first support on real databases. That’s right, code first only works on SQL Compact file-based databases. This is fine for development but you can forget about just dropping the files onto a clients webserver and have it create your database for you.

There are a couple of ways around the limitations. I am having great success with a combination of MigratorDotNet and Entity Framework to provide an ActiveRecord style schema migration path. Hopefully I can write about this soon.


That upgraded WPF 4.0 Text rendering again

Just to hammer the point home about how important it is to upgrade to .NET 4.0 if you are using WPF, here are some comparison screenshots of the text rendering in WPF 3.5 and 4.0:

wpftext.png

Pay attention to the difference between the text rendering on lines 2 and 3.

Line 2 shows the new Display formatting mode available in WPF 4.0. This renders the text the same way as the rest of Windows – the shape of the font is distorted so that lines fall on pixel boundaries. For small text this should be used for consistency with the rest of Windows or users will most likely complain that your text looks “blurry” (even though it is technically rendered correctly). Large font sizes or high DPI screens can stick to the standard WPF rendering mode.

Line 3 shows what Japanese Windows XP users will see if they use your application as they don’t have Meiryo installed. In WPF 3.5, Asian text is a mess at small font sizes because WPF 3.5 does not support bitmap fonts – instead it scales down the large vector font data in the font file. WPF 4.0 supports bitmap fonts so that Japanese text now is rendered the same way as the rest of Japanese XP.

It is worth being reminded that it took Microsoft themselves to dogfood WPF 4.0 when developing Visual Studio 2010 before these problems were solved.


Evernote has no patience, drops WPF over fixed issues

Much noise has been made about Evernote’s new Windows client. For version 4, they dropped WPF/.NET and released a C++ native application.

They were pretty damning with their reasoning:

Evernote 4 is a major departure from Evernote 3.5 in every way. While 3.5 added tons of great new features, there were some problems we simply couldn’t fix: the blurry fonts, slow startup times, large memory footprint, and poor support for certain graphics cards were all issues that the technology behind 3.5 (Windows .net and WPF) was incapable of resolving. As a result, we ended up chasing down platform bugs rather than adding the great features our users wanted.

So we decided to start over from scratch, with fast, native C++ that we knew we could rely on. As you’ll see, the results are amazing. This new version will set a foundation for rapid improvement.

Evernote 4 is designed to give you a great experience on any computer that you use, whether you’re on a netbook, a five year old Windows XP machine or a super fast top-of-the-line Windows 7 computer.

On our test hardware, Evernote 4 starts five times faster, and uses half the memory of Evernote 3.5.

 

You cannot make statements like “issues that the technology behind 3.5 … was incapable of resolving” without providing more information on the problems they faced and the solutions they tried. For all we know, their Windows client development team could have tripled in size to get the native version out the door.

Evernote 3.5 was a textbook example of reasons to immediately upgrade to .NET 4.0 if you are building WPF applications. Visual Studio’s UI layer is now in WPF, presumably after fixing all these issues.

“The text is blurry”

This is fixed in WPF 4.0, which can render text almost exactly as Windows does if developers request it. The standard behaviour is a DPI-independent accurate representation of the font on the screen (the same way OSX renders text and also the reason why text is “blurry” on Macs).

This is a one-line fix in .NET 4.0, just apply TextOptions.TextFormattingMode=”Display” to your root XAML element. Asian text will also now use bitmap fonts so customers on Japanese XP machines will now get consistent text rendering between your app and their vintage OS (of course Vista/Win7 should be using Meiryo).

“The download size is too large”

The runtime for .NET 3.5 is 65MB or so. .NET 4.0 has reduced this to a 28MB download. Ironically, the Evernote 4.0 installer is 40MB – most likely larger than bundling the .NET 4.0 runtime in the installer of 3.5. Users with .NET 4.0 already installed would have got an even smaller download as the installer would not download the runtime.

Evernote 4.0 appears to include Chromium (the Chrome web browser base), Foxit Reader’s PDF libraries, SQLLite and libxml which could be replaced with the built in Web Browser control, XPS rendering, SQLCE and built in XML libraries of .NET 4.0.

“It uses too much memory”

If your application has hundreds of threads and handles complex local operations, it will require memory. Evernote’s statement about version 4.0 using “half” the memory of the managed 3.5 version is pretty damning considering that the application is not very complicated.

While you may never be able to match the memory consumption of a “native” application in .NET, there are some things you need to know to improve your memory use:

  • Use .NET 4.0 as it has background garbage collection
  • Keep your visual tree small (no endless nested Grids in XAML)
  • Virtualize your ItemControls! This might be the most important issue. You cannot bind a XAML WrapPanel to 1000 images without Virtualization and expect scrolling to be smooth or your memory consumption to be low.
  • Use the ThreadPool and Background Workers instead of manually creating threads. ThreadPool-based tasks intelligently carry out the number of simultaneous tasks based on the number of processor cores you have. Allowing your code to create and infinite number of threads is a recipe for disaster as each thread needs its own stack space of at least 1MB. Ideally use .NET 4.0s new parallel programming and async functions.
  • Read the correct memory numbers in Task Manager (Private Working Set).

“The application is slow to start up”

Managed applications do not have to start slowly. A new application from a VS template will start up instantly – it is when you start adding references to other libraries, interop hooks and modules (for composite apps) that startup time starts dropping. Perhaps the most important thing to do is use NGEN to generate a native version of your application at install time, instead of waiting for the JIT compilation when the user launches the application. The application will slow down when loading modules for the first time if they have not been pre-compiled. There is some great information on improving start up times on MSDN, as usual.

In general, try to show some part of your application immediately. A splash screen might be okay for application start up times of less than a few seconds, but there is no reason why the main window can not be displayed and relevent data start loading in the background. This is mainly a perception issue. If you only show your main window after loading all data that your application could possibly need ever, of course start up will appear to be slow.

Did Evernote even try .NET 4.0?

The .NET development community is waiting for some sort of postmortem from the Evernote team. Most of the above problems would have been solved by upgrading to .NET 4.0 and running some decent profilers on the executable.

Rewriting your application natively will no doubt use less memory and start up faster, but it will also look worse, take longer, be more expensive to develop and your UI will break when high DPI screens start to be used. Portability is not a reason: if you want an application to work on Windows/Mac/Linux/iOS/Android, you write a web application.

If you want an example of an amazing WPF 4.0 application designed for the Windows platform, check out MetroTwit.


Free Cloud-based online Microsoft Money using Dropbox

I have used Microsoft Money to manage my finances for coming up 6 years now and still find it the best personal finance app around. The last version in the UK was 2005 after Microsoft cancelled the product and let Quicken take the market. Microsoft then discontinued the international versions in the wake of Mint.com and other Yodlee-based web applications. Mint.com appears to be the most successful of the bunch and was bought by Quicken to replace their terrible Quicken Online.

Microsoft Money was fantastic because it:

  • Supported multiple currencies properly (I need GBP, USD and JPY with the ability to transfer between accounts)
  • Had seperate business accounts and expense tracking
  • Amazing reporting features
  • The invaluable cashflow graph which I still have not found in any competing product, web or client based

The last version was released in 2008 and this was the first version to contain product activation. Thanks to the product’s cancellation, Microsoft has quietly released a “Sunset” edition of Microsoft Money – a full copy of Microsoft Money Plus without the product activation entirely for free so users won’t have to worry about installing Money after the activation servers have gone down. The bank synchronisation is not included but this was only supported for US bank accounts anyway.

With the fantastic Dropbox, you can sync your Money data file between all the computers you use (even Mac OSX running Money under Parallels). The Money data file is very small (6 years of transactions here total 10MB).

The combination of MS Money and Dropbox gives you the best of both worlds:

  • Cloud storage and backup
  • Nobody snooping on your data, datamining your purchase habits (see Mint, Wesabe etc)
  • Instant UI response times because Money is a local app
  • Access your data from multiple locations – just install the free Money edition and Dropbox

Need mobile access? Just add LogMeIn to your iPad or iPhone.


No native Japanese text in Windows Phone 7 … yet

The first preview version of the Windows Phone 7 SDK is out and it doesn’t support Japanese (or non-Latin) text in the English ROM. This is a huge disappointment.

image

One of the major advantages the iPhone has over almost every other smartphone platform (and the major reason I bought mine in the first place – I needed Japanese language support) is the built in support for non-Latin languages and their input methods. This allows Apple to provide one single worldwide firmware edition.

Previous versions of Windows Mobile have required users to hack in Japanese fonts using the registry and rely on some awful third party hacks to get Japanese IMEs working. I seriously hope that before WP7 is finished, Microsoft just install worldwide fonts and IMEs like they started to do with Vista. There is no excuse. We are unlikely to get low-level access to the registry this time around to hack the support in ourselves to non-Japanese ROMs.

One of their slides is supposed to imply that the Metro theme “Celebrates Typography”

image

– more like it totally ignores it. I suppose screens of square boxes fits the “Authentically Digital” principle.


XNA2.0 Dependency checking

After a lot of trial and error using Process Monitor and Virtual PC, I have finally sussed out exactly what XNA2.0 games on Windows need to run. The requirements are slightly different to XNA 1 games.

Direct X runtimes

There are four files that need to be installed in the system32 folder for XNA to initialise properly. They are:

  • xinput1_3.dll
  • x3daudio1_3.dll
  • d3dx9_31.dll, and
  • xactengine2_9.dll

The first three can be placed alongside the application exe and then load fine, but xactengine2_9.dll does not load this way for some reason, and has to be present in the system directory. Distributing these files alongside the application breaks the DirectX EULA, so they have to be installed using dxsetup.exe.

To check the presence in your XNA game, just put this code in Program.cs before game.Run() is called:

bool HasAllPrereqs = true;
// check all the required files, if any missing, return false
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\xactengine2_9.dll")) HasAllPrereqs = false;
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\d3dx9_31.dll")) HasAllPrereqs = false;
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\x3daudio1_2.dll")) HasAllPrereqs = false;
if (!System.IO.File.Exists(System.Environment.SystemDirectory 
    + "\\xinput1_3.dll")) HasAllPrereqs = false;

If HasAllPrereqs is false after those lines, exit the application before it crashes horribly when XNA tries to initialise.

Visual C++ 2005 SP1 runtimes

Even a fresh Vista install doesn’t have these. They are provided when updating Visual Studio 2005 to SP1, or installing SP1 of the .Net Framework 2.0. However, Vista comes with SP0 of .Net 2.0, meaning 99% of machines you come across will be lacking what XNA 2.0 needs. There is a 2.5MB standalone installer on the MS download site here which installs what you need even on .Net 2.0 SP0 machines. .Net 3.5 installs Net 2.0 SP1.

So if any of the following are installed, we safely have the right Visual C++ 2005 runtimes:

  • .NET Framework 2.0 SP1
  • .NET Framework 3.5
  • Visual C++ 2005 SP1 Redistributable

By looking up the product codes in the registry, we can also check at runtime if we have the runtimes (again, before game.Run()):

[DllImport("msi.dll")]
public static extern Int32 MsiQueryProductState(string szProduct);

…goes before the main application entry point, and

bool vccOK = false;
// check for VC++ 2005 SP1 redist (very rare in the wild)
if (MsiQueryProductState(
"{7299052b-02a4-4627-81f2-1818da5d550d}") == 5) vccOK = true;
// check for .NET Framework 2.0 SP1
if (MsiQueryProductState(
"{2FC099BD-AC9B-33EB-809C-D332E1B27C40}") == 5) vccOK = true;
// check for .NET Framework 3.5 (includes 2.0 SP1)
if (MsiQueryProductState(
"{B508B3F1-A24A-32C0-B310-85786919EF28}") == 5) vccOK = true;

If vccOK is still false, exit the application before you call game.Run().


Free pro Microsoft tools for students

image

Wow. Microsoft has just launched “DreamSpark” – a programme that lets higher education students download pro Microsoft development tools – not the cut-down Express versions of Visual Studio, but the full Professional editions. UK Microsoft student champ Ed Dunhill sums it up the best on his blog here.

You get access to:

  • Visual Studio 2008 Pro
  • The whole Expression suite
  • SQL Server 2005 Developer edition
  • Windows Server 2003 Standard (and hopefully soon 2008)
  • The best bit is a whole years XNA Creators Club subscription FREE! This costs £65 normally with no real free alternative to get games running on the Xbox.

This is evidently a battle against pirated versions of the above products and this is the perfect way to do it. To enroll in the programme, your University needs to provide a Single Sign On authentication system to verify you or you need a ISIC card or NUS Extra card. Unfortunately, Oxford Brookes doesnt have a SSO Auth system (and I doubt they ever will – Oxford Uni does though) so I have had to order an NUS Extra card for a tenner to get in. Your status as a higher education student needs to be verified once a year, so students leaving Uni soon should sign up quick. Other than the XNA Creators Club subscription, I don’t think the products have time limits.

Expect Adobe to follow suit soon with their products if they want to get students hooked – although the academic discounts on Adobe CS3 stuff are great (only £400 for the Master Suite, down from £2500…) students will still pirate. Give students free access to professional tools and they’ll get hooked on them and buy them when they are earning a living.