Moving to a multi-VHD Windows installation to separate work and personal data

I had been thinking about setting myself up with a way to work from home in a disconnected fashion. Most of the places I’ve worked at in the past required me to remote into the work desktop, which is a good idea if both sides have 100% uptime on their network connection and no issues with them being affected by adverse weather. Which in reality means that the connections tended to be unstable if the weather dictated that one really, really wanted to work from home on a particular day because snowfall was horizontal, for example. My current employer is more enlightened in this matter so my suggestion of locking all the necessary tools and source code inside a VM that would allow me to work from home even if the Internet connection was unavailable at either end was given the go ahead. Given that my desktop here is plenty powerful for most development tasks (it’s an older Intel Mac Pro with dual Xeons), this should be an idea solution.

Only, with the VM software I was trying out, the virtualised disk throughput was lacking a little. The product I’m working on uses Qt and it took a day to build the commercial version of 4.7.4 inside the VM, with one of the Xeons allocated to VM duty. Oops. Some more digging pretty much confirmed that the main issues was the disk throughput or lack thereof. At this point I came across Scott Hanselman’s article on how to boot Windows off a VHD. My understanding is that Bootcamp only supports booting of a single Windows partition so this sounded ideal to me – just put a VHD with all the tools and the source code on the boot partition I already have, then boot from the VHD if I need to. Donn Felker’s blog entry on booting off a VHD on a Bootcamp’d Mac added the one missing piece of information, namely that one should ignore the warning from the Windows 7 installer that the disk (VHD) you’re about to install on isn’t support and that there might be driver issues. Just go ahead and do it anyway.

After the installation and dropping all the tools on the VHD – I’m getting a little too familiar with the Visual Studio installer by now – Qt built pretty much in the expected time and the project itself can also be build within a reasonable amount of time. My guess the build is 5%-10% slower than on the work machine, but the work machine is building on an SSD and obviously hasn’t got a virtualised hard disk to deal with either. On the other hand my own machine has the benefit of 8 real cores.

Why all the effort? I don’t like mixing work projects and my own stuff, for starters. If I can lock work into a VM or at least some kind of a sandbox, there’s less of a chance of accidental cross-pollination between the two and no licensing headaches either. The latter is especially important to me as there are some software licenses that are “duplicated” in the sense that I have both a work and a personal license. And of course there’s the little detail that the work VM data can simply be destroyed by deleting the VM/VHD if it proves necessary.

Even though I did originally intend to only set up a single VHD for work purposes and keep all the personal software and data on my main disk, I’ve ended up creating a second VHD specifically for a couple of car racing simulators that I use (iRacing and rFactor). I’m not a big gamer but I do like track driving in the real world and using the simulators tends to help with familiarising yourself with a track, plus it helps in the off season, too. iRacing had a bit of a problem with the various bits of security software I have installed on my main Windows and given that I had a spare license anyway, it made sense to put it in its own “virgin Windows” sandbox. No issues since. Well, none related to the software…

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in General Programming | Leave a comment

Another good reason to keep source file sizes small

Merging a file between SCM branches that is several thousand lines in size and has significant changes in both branches is a good way to have an unpleasant day, even if the SCM that’s being used has good support for cross-branch merging.

Yes, I know, ideally one tries to make sure that two branches don’t diverge that far but that’s not always possible, especially if there are significant changes to the design that affect the merge.

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in General Programming | Leave a comment

Useful collection of Qt debug visualizers for Visual Studio

I had to reinstall VS2010 at work and because I clearly didn’t think this all the way through, forgot to save my autoexp.dat file before removing the old installation. And of course I didn’t realise what had happened until I had to dig deeper into some Qt GUI code that wasn’t quite working as expected, and of course I was prompted with the raw data.

Fortunately a quick search on Google led me to this page Human Machine Teaming Lab | Knowledge / Qt that contains a very comprehensive set of visualisers. I’d highly recommend them if you’re doing any sort of work with the Qt libraries.

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in C++ | Tagged , | Leave a comment

Useful list of C++ static analysis information

Just came across a link to this link collection that I think will be useful to C++ programmers:

Everything about C++ source code static analysis

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in C++ | Leave a comment

Scope creep doesn’t only affect software projects…

Let’s just make a small change to the requirements, I mean, what could go wrong?

BBC – Peston’s Picks: Aircraft carrier costs to rise by at least a billion (again)

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in Fun stuff | Leave a comment

In case you need to generate a file with the date in the filename in Windows

I just had the pleasure to do exactly that in a batch file. This link to MS support shows a nice way of taking the date apart and make it part of the filename. However in order to get it working with a US date on Windows 7, I had to change the %date variable parsing as follows:

    %date:~-4,4%%date:~4,2%%date:~-7,2%

This will create an ISO-style date format out of a date in US locale settings.

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in General Programming | Leave a comment

Very nice and concise blog post about Boost.Test

If you’re looking for a quick introduction to Boost.Test that covers the main features you’re likely to use, I would recommend looking at this blog post:

a little madness » Blog Archive » C++ Unit Testing With Boost.Test

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in C++ | Tagged , | 1 Comment

Emacs 23.3 released

See here: Emacs development

Time to check if the Windows builds are already available, methinks.

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in Emacs | Leave a comment

Visual Studio 2010 SP1 has been released

For those who are using Visual Studio 2010, the service pack has now been officially released:

Visual Studio 2010 Service Pack 1 General Availability – Visual C++ Team Blog – Site Home – MSDN Blogs

Edit: The download like doesn’t seem to work for me yet, given that it’s only gone General Availability today it might be worth checking back a little later.

Edit again – we have a general availability download link: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=75568aa6-8107-475d-948a-ef22627e57a5&displaylang=en

SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in C++ | Leave a comment

If your VS2010 C++ build is constantly rebuilding a project that hasn’t changed…

Check if you’re seeing the following output in the build pane:


InitializeBuildStatus:
  Creating "<project name>.unsuccessfulbuild" because "AlwaysCreate" was specified.

I’ve just fixed a bunch of these errors in one of our solutions here and all of these were caused by one of two issues:

  • The project file referenced files that were no present in the source tree
  • A custom build step either was supposed to generate a file but didn’t, or the file ended up in the wrong place
SociBook del.icio.us Digg Facebook Google Yahoo Buzz StumbleUpon
Posted in C++ | 2 Comments