adamjames dot github dot io "Still a better TLD than .blog"

The Internet's Own Boy

I recently got the time to sit down and watch The Internet's Own Boy.<!-- more --> It's a biography of Aaron Swartz that also charts recent Internet history with regard to the censorship (SOPA and PIPA in particular) and Free Culture. It's a well-made film that explains the viewpoints and motivations of the people involved very effectively, whilst also giving a good grounding in the wider topics and not assuming any existing knowledge on the part of the viewer. It's a great movie and I recommend you take the time to watch it. It's free and was released under one of Aaron's own Creative Commons licenses (as is the content of this site), so I'm free to share the whole thing with you below. Keep some tissues handy.

Russian dolls in software development

It's been some time since I last posted. Five days a week, I spend 09:00-17:30 working on the next release of my employer's closed-source product, with a two hour commute each way. Add to that the time taken to eat, sleep and keep up with the rest of my life and you leave very little time except some sliver of evenings and weekends for anything else. <!-- more -->When it comes to software, I struggle to come up with ideas for something interesting and useful that hasn't already been done to death.

Occasionally I get a flash of an idea. This would be great if not for the fact that the next thing to inevitably happen is that I then get mired in a swamp of tangential decisions and "best practice". Want to work with Ruby? Great! First, you should set up a Virtualbox VM for your development. No, scratch that, you should use Vagrant! Maybe if you're lucky, there's a pre-prepared box you can use. Ah wait, now Docker is all the rage, use that instead. It's so much better! But remember, if you're on a Mac, don't use the tiny Docker shim-vm installed by default, because there are problems with it (hopefully you found this out before you ran into one of them.) You have to set up your own VM if you want to use Docker on OS X.

Okay, you got that sorted? Now install Ruby. And no, you can't just apt-get install ruby, you need to use rvm or rbenv to keep things clean, and you need to handle gem dependencies too. Make sure to use bundler for that. You'll need to install a package manager for OS X to use most of these third-party tools and keep things clean, so go get Homebrew before you do anything else, then use it to install everything - but don't forget you'll need the XCode CLI tools (a rather large download in itself) before anything will work. Oh, you already installed some of this stuff outside of Homebrew's environment? Oh well, messy OS for you! Don't forget that you set it up this way, or you'll make your system messy at some unforseeable point in the future, and break the sandboxing that this stuff made super easy for you.

sigh.

Maybe, when I've discovered a way to build an isolated, clean development environment that doesn't drive me insane, I'll get to writing something useful.

One day.

Jekyll for Android

This is a test post, published using Jekyll for Android.<!-- more --> I'm also using it to test post categories; although they might not appear until I get chance to set up a plugin-compatible publishing environment (something like this) locally.

Windows 7 development in VirtualBox and the curse of IO-APIC / Guest Additions

When creating a Windows VM for development, it might seem obvious to install a 64-bit version of Windows.<!-- more --> However, this results in Virtualbox enabling I/O APIC (Input/Output Advanced Programmable Interrupt Controller) emulation. This is required when using a 64-bit version of Windows or passing multiple CPU cores through to your virtual machine. Disabling it will result in Windows refusing to even load the installer. So you enable it, install Windows (looks a little slow, but hey; it's a VM, right?) and go on your merry way.

After a while though, you begin to notice that the slowness seems unreasonable. So you look around. You might find a ticket describing the slowness. You find somewhat-related instructions for Windows XP, but they're hit and miss too. So you try to disable I/O APIC, only to find out you can't. Even editing the config file manually doesn't do it. So you try setting it read only and making the change, only to see Windows crash when the kernel can't find CPU features it needs because they've vanished from underneath it. You look around some more, finding out that fixing the problem means swapping out the Hardware Abstraction Layer that sits between the Windows kernel and the hardware, maybe even about sysprep /generalize, which allows you to move a Windows system image between machines of any architecture and have them re-initialise themselves on the first boot (if you're interested, this is a feature intended for systems administrators and OEM's who want to deploy a standard OS image across a heterogeneous set of hardware.) You try it out, but the machine becomes completely unresponsive even after leaving it overnight to churn away; and crashes. Your machine is destroyed.

The solution to this is to install a 32-bit version of Windows in your VM, which does not require I/O APIC emulation. Enable everything you like, except I/O APIC support - and only pass in a single CPU core for use by your VM. You'll get a usable machine (at least twice as fast) and it's a damn sight better than having something that doesn't work at all.

If you find that Windows fails to boot after installing the Guest Additions without Direct3D support, hard power-off and make sure that 3D acceleration is turned off in the VM's options (leaving 2D checked) before rebooting. The machine should come back up without any issues aside from a minor complaint about not being shut down properly. You should now find that all Guest Additions features (Shared Folders, USB support, standard 2D acceleration...) work fine. Aero transparency won't work, but Windows is much more responsive without it turned on anyway.