Saturday, December 31, 2011

Predictions for 2012

It's hard to know what's going to happen even three months from now, but I'm going to stick my head up and make some predictions about what will happen over the next year. Let's see what I get right!


The little known "Year 2012" problem causes problems with the Pontiac Aztec's onboard computer. There is much celebration as every Pontiac Aztec in the country blows up simultaneously.

Romney continues to lead in the Republican nomination fight, with a gay sex scandal causing upcoming rival Rick Santorum to drop out. Ron Paul continues in second place, though nobody thinks he will win anyway so who cares?


Apple releases the iPhone 5. Considered "snappier" than the previous iPhone, it comes with the ability to make phone calls, surprising pundits who were unaware of this lack of standard functionality present in all featurephones before now, a surprise that followed voice dialing, multimedia messages, tethering, and the ability to install apps. Reportedly the iPhone 6 will include the ability to send text messages, and the iPhone 7 will be able to take pictures.

Romney continues to lead in the Republican nomination fight, despite the Republicans  rallying around Joe the Plumber, who subsequently drops out after photos emerge of an "accident" involving a small pipe and something slightly too large stuck inside of it.


Nobel Peace Prize Winner Barack Obama declares war on Brazil after it is reported that Brazil is made up of foreigners, some of whom are Muslim, and after John Bolton claims that the country is attempting to acquire Nuclear weapons.

Liberals are divided between those sure that Obama has good reasons to be starting another war and who wouldn't do it if it wasn't the right thing to do, and those concerned Obama might be in the pockets of big coffee.

A surprise surge by serial killer Charles Manson threatens to knock Romney off his front runner status in the Republican nomination, until Manson's views on State's Rights ensure his rapid downfall.


With the war in Brazil causing coffee prices to be at all time highs, Nobel Peace Prize Winner Barack Obama invades Colombia. Liberals are divided amongst those who argue we should trust Obama's judgement on such matters and not question him, for fear of having some Republican war monger win the next election, and those who call for more tea drinking in order to wean America off of its addiction to coffee.

The Simpson's Montgomery Burns temporarily challenges Romney's lead in the race to the Republican nomination, but most Republicans unhappy with the contest reluctantly withdraw their support after hearing that Burns is a cartoon character and not real. This is despite last minute from Glenn Beck who claims that rumors Burns is "not real" are liberal media lies, and that he has "hundreds of hours" of video evidence, including a major feature film, showing Burns in person.


Nobel Peace Prize Winner Barack Obama announces the war in Brazil is over after President Rousseff is captured and waterboarded for several weeks. Obama announces a "complete" withdrawl of troops that will leave only a "skeleton force" of ten million soldiers in the country. Liberals are divided between those who praise Obama and feel vindicated, and those who roll their eyes and shake their heads in frustration.

Republicans coalesce around surging candidate Dennis Miller, until they realize they don't think he's funny either.


The new Facebook Phone is announced, which differentiates itself from other phones by transcribing everything the owner says, regardless of whether the caller is on a call, and posting it to the Internet.

Republicans express relief after little known Presidential candidate Margaret Thatcher leads Romney by two points, despite the fact that she's not a natural born citizen (or a citizen at all.) After being accused of hypocrisy given the Republican's "birther" movement, Republicans argue that they're not hypocrites, you're a hypocrite. Touche.


The iPad 3 is finally released. At 20", it's the largest tablet ever released, can only run three apps, and weighs over a ton. It sells one billion units in the first week. Other tablet makers, who have tried to focus on, you know, usefulness, give up.

Nobel Peace Prize Winner Barack Obama announces a new war with France, with rave responses from Dick Cheney and many liberals. Meanwhile, the Republican nomination race intensifies with "Barry O'Bama" temporarily leading Mitt Romney, with over 90% of the vote, until it's discovered that Barry is, in fact, Barack Obama, wearing sun glasses and a hat.


Texas and Alaska both secede from the union. To the surprise of both, the rest of the nation reacts in celebration, until Nobel Peace Prize Winner Barack Obama invades both, pointing out both states have oil. Liberals are strongly divided like never before, with a small minority feeling that we must trust Obama's judgement, and the rest utterly bewildered.

Mysterious candidate "Ron Mitmey" challenges Mitt Romney for the Republican nomination, but even Republicans can tell it's Mitt Romney pretending to be not Mitt Romney.


With time running out, Republicans race to find a Presidential candidate they all like. Discovering the constitution makes no mention of Presidential candidates needing to be living, top Republican scientists attempt to re-animate the corpse of Ronald Reagan, who immediately starts campaigning on deficits not mattering, banning black people from owning guns, and on how Hollywood Celebrities make the best Presidents.


Realizing his support has plummeted, Obama immediately runs a campaign against himself, saying "Vote for me, Barack Obama, and not that guy who's currently President - isn't it George W. Bush? I think it is. Yeah, he's the President." Meanwhile, the re-animated corpse of Ronald Reagan beats Mitt Romney for the Republican nomination.


In a surprise upset, Paul Krugman is elected President. Virtually every incumbent in Congress is defeated, even Joe Lieberman who wasn't even supposed to be up for election. Realizing it's the end, the entire government is transfered over to the newly elected two months early, and by the end of the month, a strong stimulus, the worldwide withdrawal of troops, and the legalization of drugs has resulted in peace and prosperity across the world.


Unfortunately the world ends.

Monday, December 26, 2011

Got a Kindle Fire

Generally liking it, but I have to admit my major objection to it right now is that there's no Google. This means you can't, for example, install software you legitimately bought on the Android Market, unless you buy it a second time on the Amazon App Store. Not good.

Also meant I had to do some fancy sideloading to get Google Music installed - as Google Music has my entire music library, and Amazon Cloud doesn't (maybe the latter would if it (a) supported more formats and (b) had an automatic Ubuntu uploader like Google Music does.) And what's with it only having 6G of storage? Where did that come from?

Plusses - perfect size, not too big (I've used 10" tablets before - they're not portable and anyone who tells you otherwise is a fanboi), not too small; UI is pretty decent for the most part. Battery life seems to be excellent, better than my Android phone indeed.

I'm thinking though it's highly likely that the rumored CyanogenMod 9 version for Kindle Fire (that's Icecream Sandwich) will end up on mine, simply because I can't do without teh Google, and quite honestly, I trust Google more than I trust Amazon as far as giant faceless corporations go.

Tuesday, December 20, 2011

Politifact, handwaving, and "Both sides do it"

Both sides do do it.

Democrats complain about abuses of civil liberties outside of office, then go in and do the same thing that Republicans complain about.

Democrats express concern about the unemployed with out of office, and then suddenly don't give a rat's ass when in office.

But that doesn't mean you can simply point at any random fact and say "Oh, both sides do it". For example, both sides lie, but that doesn't mean you can point at a random fact stated by one party and say "It's a lie".

Politifact has decided that Democrats who argue that the Republicans plan to abolish Medicare are lying. It has no basis to make this claim, given Republicans did, actually, plan to abolish Medicare. And Politifact knows that. This is the first paragraph of its attempt to argue that Democrats are "lying" when they claim Medicare is being abolished:

Republicans muscled a budget through the House of Representatives in April that they said would take an important step toward reducing the federal deficit. Introduced by U.S. Rep. Paul Ryan of Wisconsin, the plan kept Medicare intact for people 55 or older, but dramatically changed the program for everyone else by privatizing it and providing government subsidies.

OK, that looks like abolishing Medicare to me. People over 55 will eventually die. For the rest of us, we won't get what we know as Medicare, we'll get its replacement, which is government subsidized private system. Of course, Politifact is leaving itself wiggle room for its attempts to call Democrats liars later on - it says Ryan's proposal is about "changing the program" rather than "replacing it", but, well, what is described is clearly not, by any definition, Medicare.

So, what statements does Politifact claim are lies? Let's look at what riled Politifact:

But more often, Democrats and liberals overreached:

They ignored the fact that the Ryan plan would not affect people currently in Medicare -- or even the people 55 to 65 who would join the program in the next 10 years.

They used harsh terms such as "end" and "kill" when the program would still exist, although in a privatized system.

They used pictures and video of elderly people who clearly were too old to be affected by the Ryan plan. The DCCC video that aired four days after the vote featured an elderly man who had to take a job as a stripper to pay his medical bills.

So, let's see:
  • Democrats didn't mention that some people will be grandfathered in. And?
  • Democrats said the system would be killed, when in fact an entirely different system with the same name will exist. This means they're lying... how?
  • Apparently only young people are affected by changes to Medicare.
Of the three objections, the first is protesting that the Democrats need to explain points irrelevent to their argument. The fact some people are going to be grandfathered in does not mean that the program isn't being abolished.

For the other two complaints, it's Politifact that's lying. Politifact is trying to argue the following:
  • That a system utterly unlike Medicare is Medicare if it has the same name going forward.
  • That people who are young now are not going to get old, and thus it's not legitimate to make a complaint that abolishing (or completely replacing with something else) Medicare will affect people who are going to be old when they themselves suffer the effects.
According to Politifact's logic, the campaigns going forward should show young, healthy people, instead of the elderly, when depicting victims of Ryan's proposals.

I'm not suggesting that no campaigns contained a minor misleading point or two, but that's true of any campaign. To describe, however, the general thrust of the Democrats objections to the Ryan's proposals as "lies", when actually they were fundamentally true and alerting people to a real danger, is hideously wrong.

Of course, even Paul Ryan has walked back the proposals. What we're now seeing is a proposal to offer people a choice of Medicare or subsidized private services. We can argue about the wisdom of such a choice, but there's little doubt that the revised proposal exists because people were concerned about Medicare going away.

In their efforts to appear non-partisan, Politifact has resorted to sophistry and demands parties be actively misleading, both of which are opposite to its supposed advertised purpose. It's difficult to take the group seriously going forward, and that's a shame, because a group that actually fact checks campaign statements, rather than criticizing anything it deems unbeltwayish, would be actually very positive.

Instead, we see handwaving, sophistry, and in some cases the shoring up of actual lies, in an attempt to portray one party as actually lying about an issue. One thing's for sure - Politifact isn't a fact checking organization any more.

Monday, December 19, 2011


The Earth is ruled by FOUR GIANT CORPORATIONS!  The largest, VT&T keeps its people distracted by DEATH MATCHES between CONDEMNED PRISONERS. The CITIES of LOS ANGELAS and SAN FRANCISCO have been turned into a GIANT MEGA PRISON. Meanwhile, people are falling ill DUE TO  A MYSTERIOUS VIRUS and TURNING INTO ZOMBIES! Doctor Ann Ordinary must TRANSPORT a mysterious BABY to the YOOGLE CORPORATION OFFICES in New Seatle. Can this BABY be the KEY TO MANKIND'S SURVIVAL? And does YOOGLE have a SECRET AGENDA?!

(The other two corporations are Microflacid and Ben and Jerry's. No, I don't know how Ben and Jerry's got to be a megacorporation ruling the world either. I mean, they make nice ice cream, but I personally always thought it was a little... well, overrated. I mean, I like their politics, and I'm glad they're successful, it's just, well, not for me. Anyway, they're a megacorporation by the year 2000.)

Sunday, December 4, 2011


So, it's been over a week since I switched to LXC from Xen. I thought I'd post something about my experience with it.

Why did I switch?

Quite simply, I had two problems with my existing Xen set up, neither of which is the fault of Xen. I want to make that clear: I love Xen, I love the concept, it's a great system.

But I'm also a Ubuntu guy, and (problem #1) frankly, Xen is one of those things Canonical has never taken seriously. Getting a Xen compatible kernel usually means downloading it from somewhere obscure, and the repositories are far from ideal. You can't, in a 8.04 VM, upgrade to a more recent Ubuntu simply by using the usual upgrade tools. And I needed to upgrade. Everything I was running, from the version of Ubuntu Hardy (8.04) to the version of Xen was old, had little support, and didn't really work the way I wanted. In fact, bugs in the versions of Xen and Linux I was running meant that if any VM had to do a lot of disk activity, the chances were that one or more VMs would crash.

The second issue was my CPU. It's a 64 bit Intel contraption, but unfortunately it doesn't have native virtualization. This is fine for Xen, if you have operating system support (but I'm running Ubuntu, so I don't) but it's not fine for any of Ubuntu's supported virtualization platforms. KVM, as provided by Ubuntu, requires full virtualization be supported in the CPU. Other options such as VirtualBox likewise require CPU support. I still find it ludicrous that Canonical (and, to be fair, the organizations Canonical relies upon) decided to support KVM over Xen when Xen is clearly more efficient and has a much better architecture for this kind of thing. And yes, I know that KVM pays lip-service to paravirtualization, but in practice you can't use it.

This doesn't leave many options without spending money, and right now I didn't want to do that if it was avoidable. That meant looking at other technologies supported (enough) by Ubuntu, and frankly, there aren't many. After reading about OpenVZ (a common technology deployed by VPS vendors), I decided to give LXC a try.

LXC is essentially a "supported" version of OpenVZ - the latter requiring kernel patches, just like Xen. LXC is pseudo-virtualization. Rather than actually emulate a full computer (virtualization) or provide an infrastructure for multiple operating systems to share a computer and allocate resources (para-virtualization), LXC's approach is to have a single operating system kernel run multiple operating system userlands.

About LXC

LXC's approach is interesting. Services provided by the kernel - file systems, networking, process scheduling, memory allocation, etc, exist once. The kernel hides (or tries to hide, see later) anything that doesn't belong to a process's userland. chroot is used to provide a completely distinct part of the core file system (of course, the administrator can  still give a "VM" - called a container - a disk or partition of its own by mounting a disk and chrooting to it.) Each container is given certain rights such as devices it can access and memory and disk usage quotas (which can be unlimited.)

This approach leads to advantages and disadvantages. The primary advantage is efficiency. If there's one kernel running, there's no need to have a layer arbitrating between competing systems or, worse, emulating hardware so that operating systems "think" they have the run of a system. Better still, resources not in use by one environment aren't wasted as they might be in a virtualization or paravirtualization system if the latter has no specific strategy to handle them.

The major disadvantages are:

  • Each container's "operating system" must support the provided kernel. In practice, this just means "run something recent, and don't try running an operating system that has wild requirements." The standard Ubuntu kernel is able to host all the major distributions, other Ubuntus (including older versions, see below), CentOS, etc. And yes, you can have different containers have different operating systems. It's just they all have to run Linux.
  • LXC is unfinished. As an example, go into a container and type "ls /sys/class/net" and compare it to the output of ifconfig -a in both the container and the "host" system. Both sysfs and procfs have problems with containers, and in some cases, there are actually real security holes - as in you can have a container execute a local script in the host environment. Also there are other little things that don't work, like rebooting or halting containers using the reboot and halt commands.
  • LXC doesn't have the more advanced features offered by virtualizers. For example, you can't take snapshots or migrate running VMs from one computer to another.
The latter is considered a major issue by LXC's developers and is being worked on, but it takes time. 

The concept behind LXC isn't new by the way. LXC is Linux's answer to BSD's jails system, and jails is often seen as a "fixed" version of chroot, a technology that appeared in Unix a long, long time ago. 

Migrating to LXC

I'm bothered by the security aspects of LXC, but for the most part I'm OK using the system, at least in my own environment. There's not a lot worth hacking about my own computer network. Still, I'm looking forward to LXC being finished.

To set up LXC in a Ubuntu 10.04 environment, this is what I did:

1. Installed the latest version

LXC doesn't actually work in the official Ubuntu 10.04 release. You heard that right. It ships with a major bug that causes problems starting up a container if you have multiple volumes mounted. As my /boot is on another partition (2T drive on a BIOS that doesn't support disks that big) mine failed every time with an error about not being able to unmount the root file system.

So the first thing to do is add a third party repository that provides a more recent LXC:

# add-apt-repository ppa:ubuntu-lxc/daily

Networking needs to be manually configured, you don't want Network Manager getting in the way. The easiest way to fix that is to uninstall it:

# apt-get purge network-manager network-manager-gnome

And then there's the installation of lxc and some other important tools:

# apt-get install lxc bridge-utils debootstrap cgroup-bin

2. Configured networking

Networking requires configuration of tunnels, which isn't that hard fortunately. The key thing to understand is that tunnels replace your existing networking configuration. When you configure eth0, for example, you have to do leave as few options (IP addresses, etc) configured as possible. Here's what my /etc/network/interfaces looks like:

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet static
   address 10.0.X.X
   gateway 10.0.X.Y
   bridge_ports eth0
   bridge_stp off
   bridge_maxwait 5
   post-up /usr/sbin/brctl setfd br0 0

At this point you should reboot to make sure everything is working as wanted.

3. Made a space for the containers to live

I decided to create a user "lxc" which I did using the adduser command in the usual way. Under /home/lxc I put my containers. Each container is a directory, and each directory contains the configuration file, file system mounts, and root directory of the container itself, like so:


I'll explain how to create those files and directories shortly, the important bit right now though is that /home/lxc/container-name exists.

4. I was migrating my existing Ubuntu 8.04 Xen systems. To do this:

4.1 Mount the VM's file system

losetup -f /path/to/disk.img
mount -r /dev/loop0 /media

4.2 Copy the contents making sure permissions etc remain unchanged

cp -a /media /home/lxc/endothelial/ ; mv /home/lxc/endothelial/media /home/lxc/endothelial/root

4.3 Modify the VMs to remove anything that'll interfere with the new environment

cd /home/lxc/endothelial/root/etc/init.d
mv  udev  udev-finish DISABLE/

4.4 One more modification - Xen uses /dev/xcv0 for the console, change it to /dev/console

vi /home/lxc/endothelial/root/etc/event.d/tty1

Change the last line to:

exec /sbin/getty 38400 console

5. Create the configuration files mentioned above.

lxc.conf looks like this:

lxc.utsname = endothelial = veth = up = br0 = 1400 = eth0 = (my VM's mac address) = (my VM's IPv4 address) = (my VM's IPv6 address, I'm sure this is necessary but...)

lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 1:8 rwm

lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 4:0 rwm
lxc.cgroup.devices.allow = c 4:1 rwm

lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 5:2 rwm

lxc.cgroup.devices.allow = c 254:0 rwm

lxc.tty = 4
lxc.rootfs = /home/lxc/endothelial/root
lxc.mount = /home/lxc/endothelial/fstab

fstab looks like this:

none /home/lxc/endothelial/root/dev/pts devpts defaults 0 0
none /home/lxc/endothelial/root/proc proc defaults 0 0
none /home/lxc/endothelial/root/sys sysfs defaults 0 0 

6. We want the server to start automatically, so create symlinks in /etc/lxc/auto

# ln -s /home/lxc/endothelial/lxc.conf /etc/lxc/auto/endothelial.conf

7. Start the session

For now, we'll start it interactively. We can always shut it down and start afresh once we know it's working.

# lxc-create -n endothelial -f /home/lxc/endothelial/lxc.conf

(Note, each time you change lxc.conf you need to do an lxc-destroy -n container-name and then do the above command.)

# lxc-start -n endothelial

If everything's set up correctly, your console session should become the container's console and you should be able to log in and all that jazz. To shut down the container, open a different console on the host, and type lxc-stop -n container-name.

In use

The above works for me and I was somewhat surprised by how well it works. Despite the 8.04 images I migrated being completely unaware of the LXC system's existence, they run well with no noticeable problems.

Everything's much faster. I'm sure part of this is that I never had a particularly optimal Xen environment to begin with, but, well, the LXC environment is much more efficient anyway, and it really shows.

Things I'm happy about:
  • Fast, efficient, and reliable
  • Power management is reliable. Xen had a habit of running everything at full blast
  • Migrating back ot Xen should be easy. At worst, I can run LXC within Xen VMs without penalties.
Things I'm uncomfortable with:
  • Not 100% transparent. I don't know what will break as a result. Nothing as yet, but it doesn't help my confidence in the platform. Supposedly Oracle will not install because the LXC APIs tell it there's no virtual memory available - but my view is that's a bug in Oracle, who the hell codes that kind of logic into their systems anyway?
  • Security issues
  • No scope for experimentation with operating systems other than those based on Linux. No Solaris or BSDs for example.
  • I'd like to make containers that have no virtual memory for those few applications that absolutely definitely must be available at a moment's notice - Asterisk for example. This isn't possible in LXC, to the best of my knowledge. Still, Asterisk works pretty well in the new environment, while it crashed a lot under Xen.
The list of things I'm uncomfortable with is longer than the "things I'm happy about", but that's a little unfair. Most of the uncomfortable issues are theoretical. The platform is working very well at the moment, and I hope the developers can get the kinks worked out so I can feel more comfortable about the security of my system while running it.

Thursday, December 1, 2011

Republican presidency? Can't be worse

It's looking increasingly like the Republican nominee for President will be either Mr Romney or, slightly less likely, Mr Gingrich. Romney has been the front runner for most of the campaign (and when not, the man to beat.) Gingrich follows a trail of beaten down nominees of the moment - Bachmann, Perry, and Herman Munster, who have had a few moments in the Sun before it become obvious they were unelectable lunatics.

From the point of view of this liberal, I'm down with either. I wouldn't vote for either, don't get me wrong, but Obama needs to be thrown out at this election, and pretty much the only reason not to vote him out is if the Republicans nominate someone much worse. Given that, I can safely cast a vote for a liberal third party candidate at this election knowing I will not be throwing the country to the wolves by not voting for a lesser-of-two-evils candidate.

Why Gingrich and Romney? Well, I'm sure the former is going to be more controversial, but actually I'd like either to win because I don't believe, at heart, either's evil, and Romney has the added benefit there's a 10% chance or so that he'll completely divide conservatives when he becomes President.

While the knocked down candidates may have been loonies, neither Gingrich nor Romney are. Both are to some degree technocrats, they may rant and rave in public and occasionally say some very extreme things, but in power they try to find academically smart solutions, according to their respective ideologies, to real problems.

Is there any evidence Romney would be worse than Obama on the issues that matter most to me? I don't see any. Obama's far right views on the surveillance state, on torturing whistleblowers, on extra-judicial executions, do not seem to me to be bettered by anything either has said. Indeed, it seems probable that those views both has put in public that appear to show fear of terrorism are as much to do with appealing to the Republican base as anything else. There is a strong chance that Romney would actually be more liberal than Obama, and a slight chance that Gingrich would be too.

Romney would be an interesting President because he's a city man in a party normally associated with country politics. That means he takes some interesting positions not normally widely associated with Republicanism such as gun control. If Romney can engineer a Republican dominated Congress, that could be his - and the Republican's - undoing. Conventional wisdom is that Republicans would never vote for a gun control bill. But the reality is that dominating congress can only be done by taking seats from Democrats, and in general the pro- and anti- gun-control lines are drawn not by ideology but by location and demographics. This is why someone like Guiliani, considered far-right by most liberals, takes the pro-gun control line. And while Democrats are scared to go there, Republicans have no reason to be. A Republican party dominated and controlled by City-Republicans may well pass some laws that undermine key planks of its support for decades to come.

Gingrich's major problem is that he's also somewhat on the slimy side when it comes to politics, he wants power (which is why he keeps running for President despite - this time excepting - always being knocked out at an early stage.) He was extremely successful with the framing exercises of the early nineties and practically made "Liberal" a bad word. He went after Clinton for consensual sexual transgressions and almost brought the country to its knees in doing so despite his own, somewhat worse, private life.

But Gingrich is, at heart, a technocrat. He tries to find free market solutions to real problems rather than pretending the problems do not exist. While Romney's healthcare reforms may have formed the roots of Obamacare, the reality is that they first cropped up during Gingrich's leadership of the opposition at the time of Clinton's health care proposals. The healthcare proposal, which included an individual mandate, never went anywhere, but it was typical of Gingrich's approach, an attempt to craft a system that would leave the majority of the health system in the free market, while creating an infrastructure to ensure it was available to everyone, the goal of any real healthcare reform.

Gingrich is also notable as being one of the early supporters of the Internet, at a time when it was barely heard of outside of nerd circles.

The bottom line is that I don't think either candidate will cause the collapse of America, or if they do, Obama would do it sooner. As such, given a vote for Obama is a support for torture, executive ignorance of the rule of law, unnecessary and blatantly illegal wars, compromises that are worse than doing nothing, and not giving a rat's behind about the unemployed, victims of corporate malfeasance, and general cronyism, I believe that it would be better to vote for a liberal third party thereby allowing either candidate to win, than to vote for Obama.

Saturday, November 26, 2011

Why I switched from Xen to LXC and other regrettable decisions

After playing around a lot with Asterisk I found my closet server was straining under the load. The issue wasn't the hardware, it's just I was running a fairly ancient version of Xen, and I was running that because I couldn't upgrade from Ubuntu 8.04, which was because later versions of Ubuntu didn't properly support Xen (as it was 8.04 barely supported it.)

But it was getting to be a problem. My wife was, understandably, getting upset that all the cool stuff I'd set up with the Asterisk server were somewhat undermined by the fact that after a few hours you couldn't make any outgoing calls. When you did, the entire VM hosting the Asterisk server would freeze for a few seconds, preventing anything from happening.

As an experiment, I made a new VM, and tried to upgrade it to 10.04 using the usual Ubuntu command line tools. This did not work.

I also upgraded the server's memory, but that didn't have any affect either.

So, finally, I bought a big ass drive for the server, and got ready to migrate all the VMs to something that Ubuntu 10.04 would be happy with. And, well, that meant no Xen.

But as it happened, this turned out to be more work than I'd hoped.

A boot up the rear

First problem. Now, I think we can all agree that the PC drive partitioning system sucks. It dates back to the original PC XT, and has nothing going for it. Several efforts have been made to fix the issues with it, or to make something better, including OpenFirmware and EFI, not to mention hacks built upon the existing system like Extended Partitions. The latest attempt to fix the problems is called GPT. It started as a part of EFI, but has started to be supported by more ordinary BIOSes recently because the standard PC system doesn't really do disks over 2T in size terribly well.

So, anyway, the geniuses at Canonical decided to make GPT the default under certain circumstances, including circumstances where it really isn't necessary. If you tell Ubuntu 10.04 to wipe a 2T drive (not a 2.5T drive, that would need it, but an ordinary 2T drive that currently fits within the 2T limit) and put on a fresh Ubuntu install, it will install a GPT partitioning system, and not install a standard partition system.

I found this out the hard way. Now, there is a way around it, for those of us with motherboards more than three years old (I know! We're so behind!) What you do is cat /dev/urandom > /dev/sda (because there's no command to wipe out the GPT partition table, and if you just try to install a normal one using fdisk, then it'll simply be ignored by Ubuntu's installed if there's a GPT thing there too); then you fire up fdisk from the command line, create a new partition table, and create three new partitions, one smallish one (a few gigs) at the beginning, one for your swap partition, and then one big one for the rest of your system.

You then fire up the Ubuntu installer, tell it to format #1 and #3 as ext4, as /boot and / respectively, making #1 bootable, and #2 your swap.

You'll note there's no GUI for this. If you tell Ubuntu to wipe the disk and start fresh, you can't tell it "Oh by the way, please make sure my computer is able to boot from this disk, please?


KVM is not Xen

What's Xen? Well, Xen is a hypervisor. Remember that User Mode Linux thing a long time ago that still exists but nobody uses it? It's a special Linux kernel that's been designed to behave itself so it can run within another operating system. Well, the Xen people went one better and said "Let's make all operating systems run like that, and we'll create a special operating system that's really lightweight in which they can all live." And, well, it works. It's a great idea. And it's what I had on my server.

But Xen isn't universal. Well, actually, it is, because the Xen people recognized early on that not every operating system vendor was going to modify their OSes to play well with others, so they created a special mode for such operating systems that made use of special CPU features, but for Linux, you didn't have to use it. But, nonetheless, people kinda assumed Xen wasn't the way to go because it encouraged rivals to work together, and KVM was born.

KVM simply runs other operating systems under Linux. It's not Xen because those other operating systems don't cooperate, instead KVM simply makes use of features in slightly higher end CPUs to keep the operating systems in line.

Canonical decided to go with KVM and avoided supporting Xen shortly after Ubuntu 8.04 (actually it didn't work very well under 8.04 either.) Unfortunately, however, the very fact KVM needs hardware support means it doesn't replace Xen even if you ignore the major differences in the way they work together.

Unfortunately the cheap CPU in my server doesn't support KVM.

Even if it was, I was already wondering what it would take to migrate my existing VMs. Apparently Redhat is working on a solution, but thus far the nearest I found to a "solution" was a tool called Xenner. I immediately hit a snag (before I realized that my CPU was a piece of crap) as it doesn't seem to take Xen disk images as is, you have to make them more "hard disk" like. Before I had a chance to look for solutions, I found the problem with the CPU.

Other options

At this point, the options were:
  • Try installing Xen server and find some way to make that work after all
  • Look at one of the simpler virtualization solutions like OpenVZ.
OpenVZ isn't directly supported by Ubuntu, but LXC - an OpenVZ spin-off - is. OpenVZ/LXC takes a third approach to "virtualization". Given a fairly common scenario (one that happens to be mine) is to simply run a large number of Linux-based operating systems on a single box, largely to keep different environments from standing on each other's toes and make it easier to experiment, OpenVZ simply runs a single operating system (single pool of processes, single file system, etc), but has the kernel hide this from running processes, who are presented with a sub-view of the running system, Each sub-view appears to each process and user as an independent operating system instance. And the kernel can use quotas and other security tools to limit processes running within a sub-view so they can't take over the entire computer.

Despite the fact Ubuntu nominally "supports" LXC, it's a little messed up under 10.04. To begin with, the 10.04 incarnation actually comes with a major bug that makes the system unusable if you have any major system partitions (such as *cough* /boot) separated from /. Installing from a PPA fixes that issue.

Another is that the documentation is pretty awful. Essentially you're pointed at other people's HOWTOs, that might cover Ubuntu, and which tends to gloss over important details like networking.

What I did was fairly simple:
  • I created directories for each VM under /home/lxc.
  • Each directory contains an lxc.conf file, fstab file, and "root" directory.
  • The root directory was the original VM file system. (I mounted it using losetup, and used cp -a to copy it. Nothing special.)
  • I moved /etc/init.d/udev* and /etc/init.d/check* out of the way as these would cause trouble in the new environment.
  • The lxc.conf and fstabs were cribbed from various blogs. I'd post them, but I'm not sure they're right yet
  • Finally, I set up bridged networking in /etc/network/interfaces. This essentially means everything you'd normally assign to eth0 gets assigned, instead, to br0, and you specify br0 is connected to eth0. 
This, surprisingly, worked. My old Xen 8.04 images are working under a modern kernel, using LXC instead, and actually the entire system feels rather smoother - probably in part because LXC is extremely lightweight.

As if to tell me not to stray too far, Xen gave me a final surprise while I was setting this up. I had to reboot multiple times, switching between the working "old" system, and the new system. At one point I had a shell open on one of my VMs. I then spent fifteen minutes in the new system, before rebooting in the old system so I could access the Internet for a bit.

And to my absolute amazement, the shell session was still alive. When I'd shut down the old system, it had saved the state of the VM, and restored it fifteen minutes later when I rebooted back into the old system.

I love Xen. I really do. Apparently Canonical is rethinking their lack of support for the system. It would be nice to switch back. Perhaps 12.04 will properly support Xen. It's about time they did.

Friday, November 25, 2011

Kerry, Gore, Obama

It would be good to have a time machine and to somehow, without being noticed, distort the results of the 2000 and 2004 elections to see if Gore and Kerry would, like Obama, have betrayed everything they claimed to stand for.

Why I can't recommend Hulu Plus

You have to feel a little sympathetic to Hulu. It's trying (or claiming to be trying) to do the right thing, make TV content legally available online in a way that satisfies the conflicting demands of content creators and people like you and me. To that end, it's produced a fairly pleasant Flash based website that streams a large chunk of what's on TV to any PC webbrowser, supported by relatively short ads, for free.

But there are limitations. Hulu has said it doesn't like them, for example, the fact that the free version of Hulu can't be accessed from mobile devices has to do with the arcane licensing issues Hulu has to deal with.

To that end, Hulu decided to create a premium version that supposedly deals with the licensing issues. People who subscribe to Hulu Plus get more content, and get the ability to see it on mobile devices.

Except... there are two major catches.

The first is we're paying for this service, and it's still infested with ads. Infact, my wife and I counted five breaks during a 22 minute long TV show. To make matters worse, most of the ads are the same, which becomes monotonous after a while. Now, I have no problem in principle with serving ads to free users. But I'm paying for this. Why is this acceptable?

And to those at Hulu who argue that I don't pay enough, who's fault is that? You set the subscription fee. It's not as if there was some negotiation where I said "I'm sorry, I'm willing to buy this, but not willing to spend more than $9 a month." You never even asked. Frankly, even at $9 a month, I don't want ads. But I've never said I'm unwilling to pay more than that.

Ads every four to five minutes is simply not acceptable. It makes the service physically unpleasant to use. The extra content is not desirable if I don't want to use the service to watch it.

The second major catch? The mobile devices thing is crap.

There's an obvious way to implement "Make it available on mobile devices" which is this: stop blocking them. If I'm using a mobile webbrowser with a full version of Flash, there's no reason to stick code in your app preventing me from using it to watch content if I'm a subscriber and if you claim that the entire point of Hulu Plus is to cover that whole "We can't do this due to licensing."

But that would interfere, I suspect, with Hulu's desire to see revenue from "exclusive deals" with tablet makers. So Hulu Plus is only available if a tablet or phone maker has paid Hulu. Again, there's no way around it. You can't even buy the Hulu Plus client. It's either available, if you have a tithed device, or it isn't.

You're asking me to pay what for what? Not going to do it. I pay less for Amazon Prime, get free two day shipping on other stuff I buy, get to borrow books on my Kindle, and don't get ads. The content isn't as full as I'd like, but on the other hand, I can easily chuck a few extra dollars Amazon's way for content that's outside of the free sandpit. And it's worth spending that money because, well, it's actually watchable content. Content I can watch anywhere, even on my mobile devices.

If you want me to buy or recommend Hulu Plus, you need to make it what a sane, reasonable, person would expect it to be. If that means charging a little more, or charging for the Hulu Plus app, then that's fine. That's what you should be doing. Providing half the product that people expect it to be for half the price isn't delivering a bargain, it's just being dishonest.

Friday, October 28, 2011

Tax cuts for billionaires will not solve anything

Since the 1980s, Supply Side economics has been a staple of establishment economic thinking. Cut taxes for the wealthy, goes the argument, and the economy will grow.

Here's the problem. Right now there's plenty of supply. The Federal Reserve has been pumping money into the economy at an astonishing rate. The rich have the lowest taxes in modern history. Large corporations are sitting on piles of cash and are making quite respectable profits.

So... why has the economy not recovered? Well, ask why are large corporations sitting on piles of cash? Why are some banks suddenly asking those with savings accounts to pay maintenance fees on those accounts? Why are interest rates at absurd lows?

The answer is that nobody wants to spend the money. That is, corporations don't want to spend what they have, and banks can't find people to borrow what they have to set up new businesses. And nobody wants to do either because the problem right now is not supply, but demand. Demand is flat. People are worried about their underwater mortgages, and 9-16% of the country is looking for work and unable to spend money as a result. We all want to spend money, but we can't.

The argument for giving billionaires (or even the well off) even more tax breaks is that they'll stimulate supply, not demand. "Why tax the job creators" argue those proposing this point of view. Unfortunately, I can't see how the argument stands up in practice. Leaving aside the fact that business expenses can almost always be written off, the reality is that job creation starts with people affording to buy products and services. The more people who wave dollar bills shouting "I want!", the more jobs get created.

At this stage, our political establishment is obsessed with giving cash to those who don't need it, ignoring the problems of those who do, something that leaves us all the worse in the long run.

Wednesday, October 26, 2011


Not looking forward to the first US Presidential election where I can vote. Largely because it looks like both candidates will be far to my right.

I'm desperately hoping the Republicans will pick a moderate like Romney. Romney is an out of touch conservative, and he has a number of views I strongly disagree with, but I believe he's a good man at heart.

This doesn't mean I'll vote for Romney however. As I said, he's far to my right. Neither will I vote for Obama, such a vote would be unconscionable. To stand as a liberal, and then when in office to promote extremist right wing policies such as torture, imprisonment without trial, extrajudicial executions, and more wars, is beyond forgivable. He will not get my vote even if the alternative is a wacko like Bachmann.

Obama isn't Clinton. Clinton stood as a right wing Democrat, made an effort (albeit a poor one) to promote the policies he stood for, and didn't drift far from what he always claimed to be, certainly never turning into an extremist. Obama essentially prevented the left from having a voice by stealing it, by saying "Oh, you're against the more extreme aspects of Bush's regime? Vote for me, I'll change it!", and then doing exactly the same crap.

So I'll vote, but I'll probably either pick a third party that's genuinely moderate or left wing, or I'll write in a candidate.


Wouldn't I be throwing my vote away?

Well, no. If you feel the same way I do, then I urge you to do the same thing. Obama won in 2008 because he courted liberals, something that neither Gore nor Kerry were willing to do. And Gore and Kerry didn't because, despite real records of liberalism, both were stuck in the Beltway Feedback Loop where it was simply taken as read that liberals were irrelevant and a bad thing.

Gore learned the hard way that this was a stupid move when Nader took enough votes in 2000 to make it obvious that had Gore gone a little to the left on certain key issues, he'd have had enough support to swing the election in his favor. Nader is usually criticized for taking votes away from Gore, but I'm not sure that's true. It's not clear to me that everyone who voted for Nader would have voted for Gore in Nader's absence, it seems more likely that most of Nader's supporters would have stayed at home.

Kerry didn't have a Nader either, but he found himself in 2004 fighting an election against an awful President... and losing. Even in 2004, Bush had lost his post-9/11 lustre, and I couldn't find a single person who had anything nice to say about him, but Kerry quickly gained a reputation, fairly or unfairly, as an establishment hack, as someone who would simply continue in the same mold as Bush even if he said otherwise. And the attitude I sensed from most liberals was that, if they were going to vote at all (and it wasn't clear they were), it was simply to get rid of Bush. And that wasn't enough for many, when it was assumed Kerry would do the same things as his would-be predecessor.

Obama's betrayal means it's going to be harder for some years to find a Democrat who can be trusted by liberals. It'll mean someone will need to have decades of political activism behind him or her, with a track record of promoting liberal causes. There are people who fit that - Pelosi is a name that springs to mind - but I'm not sure they have what it takes to get past the primary stage, and, for example, Pelosi has had enough demonization from the right that she'd find it hard to get broad based support anyway.

Either way, Obama needs to lose. It has to be shown that it's not enough to pretend to be a liberal when you have no power, you have to at least try when you're in office. I can handle Obama failing to push through liberal laws through a hostile congress. I can't handle the continuation of Bush's security state. And I can handle four years of a Republican President if that's what's necessary to prevent it from happening again.

Saturday, October 22, 2011

The bad-ass gun: a detour?

As a follow up to my last post, I'm thinking of taking a little detour.

Here's what's happened since I wrote that. I'm still liking the FAL as the "bad ass" rifle for my heroine although there are problems. Just as the AR-15's ammo is underpowered, I'm wondering if the full 308 is overpowered for what she wants to do. And yeah, there's the 6.8 SPC and 6.5 Grendel and stuff like that, but they both feel like hacks to me, designed more because the AR-15's magazine slot is too short for a mainstream round like a .243 Winchester or .270 Winchester than because they're trying to make it optimal. But that's an aside.

But I also know that what's made me interested in guns to begin with is how they work. It was looking at the description of how the AR-15 worked that made me turn from someone totally uninterested to someone absolutely fascinated pretty much over night.

And then I discovered there's a sizable community of people who build their own AK-47s.

Now, to be fair, "build" in this sense means:
  • Obtain a "parts kit" - basically an old military surplus AK-47 that's been dismantled and had the receiver removed and destroyed. Typical cost these days is around $300-400.
  • Obtain a receiver flat, or more likely, go to a FFL and get a receiver. If the former, convert flat into a receiver. More on that in a second.
  • Obtain a "compliance kit" which is essentially a bag of screws and other miscellaneous cheap AK-47 parts that are made in the US. This is because if you make your own firearm in the US, there's a numeric maximum on the number of parts you can include that weren't made in the US.
  • Put it all back together.
The receiver is the interesting bit. You can either buy a finished receiver, or you can make your own. If you go the latter route, the general concept is:
  • Order a flat online, which can be sent directly to your home. Flats are around $20, and they basically consist of a pre-cut sheet of metal with some holes drilled in it. Usually the flat is 1mm thick, and made of regular steel (carbon steel, nothing exotic.)
  • Measure it up and enlarge certain holes, etc, while the receiver is still flat.
  • You very carefully bend it, preferably using a relatively expensive press (a little under $200), but manual methods exist too. This is probably the part that's most likely to go wrong. It requires four bends, although two may have already been done for you. The two that may have already been done are on the extreme sides of the receiver, to make rails. The other two are bends where you'd expect them to be, to turn the receiver into a kind of squared U shape. 
  • You heat treat it. This involves using a blow torch to make the metal round certain drilled holes glow red, immediately after which you throw the entire thing into a bucket of motor oil to cool off. Apparently. This is probably the most dangerous part of the entire thing. The heat treating is to strengthen those parts of the receiver that will suffer the most amount of stress.
  • Finally, you parkerize the receiver. This can be done using kits on the Internet (price around $40 for bottles of acid and a bath) - you submerge the receiver in the acid for a little while, take it out, and polish it with an oily rag or something. Parkerizing, by the way, is just a way of rust proofing the receiver without using paint or something similar that might interfere with whatever you screw onto it.
Some background: the receiver is the component of a gun that holds all the working bits together. From a legal standpoint in the US, it's actually the gun, while everything else is just a component. As a result, the receiver is subject to more regulation than any other part of a gun. There's no law to prevent you from making your own (as long as legally you're allowed to have a firearm in the first place - and there are restrictions on what you can do with it once you've made it), but if you try to buy a receiver you have to go through the same channels that you would a full firearm.

Now, a receiver flat isn't a receiver, it's fairly close, but as it can't be used as a receiver without a lot of modifications, it isn't legally one yet, or so the law goes. Apparently. I'm not sure this is safe to rely on for the long term future, but at any rate there are no stories of ATF agents raiding distributors of flats.

So... anyway. Uh. Yeah. Well, the making the receiver part bothers me, the rest - not so much. I'm kinda liking the entire concept for these reasons:
  • As I said, it's the semi-automatic rifles that interest me, and they interest me because of how they work. How better to understand and celebrate that than to make one?
  • It's manageable in terms of affordability. I can spend $50 a month buying parts, rather than spending $500+ on a finished rifle.
  • I'll learn enough about the process to understand how possible or impossible it is to build something similar that is more accurate, or that supports a different cartridge.
There are, of course, a lot of negatives.
  • The AK-47 is reportedly a relatively inaccurate rifle. Now, opinion seems to differ on it, with a large number of enthusiasts claiming the inaccuracy thing is overblown, but, still. The point is it's not the rifle my heroine is going to adopt, so I still have to get that one.
  • I'm bothered by the safety aspect. I don't want to end up with a face that looks like Gus's at season finale of Breaking Bad after shooting it.
  • The making your own receiver thing is both very attractive and scary. It's a lot of work, and looks like it'd be easy to screw up. On the other hand, flats are relatively cheap.
  • I'm not a hardware person. I'd like to be, of course, and I'd like to learn. But I'm not right now.
 What do you think?

Sunday, October 9, 2011

Well, shoot.

So now I have the right to, I'm going to buy two rifles. If you've been following me on Twitter, you know that already. Interestingly, if I understand the Wikipedia article correctly, I could have bought one as soon as I had my permanent resident card, but, well, whatever, it wouldn't have felt right (and I'm not sure I trust Wikipedia...)

Why two? Well, there's what interests me, and then there's what's practical. The latter is, in many ways, intended to prevent me from using the former. It's kind of like a newbie buying a motorbike - you really need to start with a low power motorbike, but the chances are what's made you interested was a bike that's anything but. The difference, I guess, is that you eventually can safely transition to the bigger, more powerful, bike, whereas the opportunities to use the "rifle that interests me" are going to be few and far between.

Some time ago I wrote a JE on my change of mind about guns. I'll see if I can convert it and import it into this blog over the next few days. But to hit the salient points:

Before moving here, I was very anti-gun. There's nothing unusual in that, people in Britain tend to be. I didn't see why anyone would want one, other than seeing gun enthusiasts in the rather crude stereotypes that, well, tend to get painted. After moving here, I found I had friends who had the things, and I started to actually think about the arguments in a way I hadn't before, coming to a couple of major conclusions that served to change my view of things.

The first is that everyone has a natural right to self defense. To ask someone in a terrifying situation where they legitimately feel their lives are at risk to be pacifist in the name of civilization and civilized values is unfair and unreasonable, and it's never going to work. In our constitution, this right is not described by the second amendment and no attempt to revoke the second amendment would change this: it's described by the ninth and tenth. A natural right can only belong to the people, never to any government at any level. It's unrelated to any need to have regulated militias or any other such arguments.

The second is that the case against ownership of guns has simply not been proven (and probably never will be.) It has not been shown that the wide ownership of a variety of weapons by law abiding citizens is itself harmful to society, that it creates a substantial danger where once there wasn't. And as a liberal, I can't support a law that bans people from doing something in private for no good reason.

At the time I changed my mind, I viewed the change putting my views on guns more in line with, say, my views on eating lobsters or on using computers to play Farmville. I didn't want to do it myself, but, hey, if others did, so be it.

What changed my mind from being a passive viewer to actually wanting one was looking up what an M16 is, after watching... I think my wife and I had just watched Full Metal Jacket, I'm not sure. Anyway, for some reason I wanted to know what the hell an M16 was, and I read up on it on Wikipedia. And that lead me to finding out it was type of rifle called an AR-15, which is a gas powered rifle. Explosive gas powered rifle I should say, you don't put propane in it.

Essentially, when you fire an AR-15 (like other semi-automatic and automatic gas powered rifles), the hammer strikes the cartridge, causing the chemicals in the cartridge to explode, turning them instantly into high pressure gases. These gases push the bullet through the barrel. A tube in the barrel captures some of the gases and those gases are used to power a mechanism to eject the spent cartridge casing, and insert a new cartridge into the chamber.

I found this fascinating, and started to read up on the different systems used by various semi-automatic guns, and found myself increasingly interested in owning one, and seeing how they work for myself.

And so now we're here.

So, going back to these two rifles. The "sane" one is pretty much already decided. LordBodak recommended a Ruger 10/22. I asked around, and I can't find anyone with a bad thing to say about it. One friend has one, others know of it and like it.

The 10/22 is a semi-automatic rifle that takes a .22LR cartridge. .22LR is relatively inexpensive, and relatively "safe" (as firearms and ammunition go); rather bizarrely the 10/22 was classified in Israel as "non-lethal" at one point, though not for very long. No gun is safe, but what you can do to minimize the effects of accidents is a positive.

I'm liking this gun because:
  • I need something sensible to start with
  • It's a small enough caliber that it's actually allowed in some indoor ranges.
  • It's a semi-automatic, and it's not gas powered - at least, not directly - instead being powered by the movement of the cartridge case after the explosion. Again, I love the idea and it's going to be different to the "interesting" rifle. BTW, this terminology should not be seen as meant to imply I'm not going to be interested in the sensible one!
  • Apparently it has a very low recoil, and it's generally pretty accurate.
  • It has high third party support. You can buy alternative barrels, stocks, you can change the entire look of the gun if you want.
For the other rifle... well, my criteria was this:
  • It had to be something I was interested in.
  • Rather oddly, I had a general idea for a rifle in mind for my heroine in my novel. I wanted it to be her rifle.
Who's my heroine? Well, she's an ass-kicking young superheroine who regularly hides in a forest, and uses her gun there, but occasionally needs her gun for missions and such. So I figured it needs to be a good hunting rifle, accurate, and a bit of a battle rifle too. With that in mind:
  • I ruled out the AR-15. The .223 caliber is something she'd feel is underpowered for precisely what she wants it for. For hunting anything large, you're generally going to want something bigger - which is not to say .223 can't take down something bigger, but... on that note, in the novel she even finds an AR-15 at one point (it's not actually identified though in the novel) and derisively says it's useless for shooting anything but rabbits and people.
  • I ruled out the AK-47/74/etc. I figured she would consider them too inaccurate.
I initially thought the FAL (which uses a 7.62 NATO cartridge) would be ideal, as like the AR-15, it's popular and well supported, has a good reputation for being accurate and dependable, and it uses the aforementioned larger cartridge.

Friends also suggested the M1 Garand and its successors in in the M14 and M1A. The M1A is considered an updated, civilian, version of the M14, which was intended to be an upgraded Garand that could do "anything". The Garand itself was a very dependable rifle used by the US military in WW-II.

The problem here is that the Garand itself is antiquated, and the reputation of the M14/M1A is mixed. It's hard, actually, to get an objective view because at the time the M14 was adopted, and the decade or so it was in use, there were enormous political forces going on within the military about the future of standard issue military rifles. Many of the issues with the M14 were either because of minor issues - such as the choice of wood being used for the stock (which had a habit of swelling in high humidity) - or because it was intended to replace multiple weapons and ended up being a jack of all trades, but a master of none. Or at least, that was the perception.

Other options include modified, larger caliber, AR-15s. These are interesting, and there are apparently two families - the AR-10 based guns, and the DPMS LR-302. Parts for one family will not work on the other, and even within the families the devices aren't considered completely compatible. Of the two, the reviews for the LR-302 seem very positive, but it's a newer design and there's less support for it. Again, prices for new weapons seem fairly high.

M1As, AR-10s, and LR-302s seem fairly expensive, with prices generally being in four digits, regardless of the source of the weapon. By comparison, AK-47s are generally sub-$500, and AR-15s usually start around $600-700, although brand new models are usually in the four digits too.

Which brings me back to the FAL. Pricing for FALs is more in line with AK-47 and AR-15s, with refurbished imports costing around around $700 (Century Arms G1), and new clones being in the low four digits. I'd be happy with a refurbished import.

Friends have mixed views on the whole thing, I don't think they understand that I'm buying something because of the link to the novel, and the fact I want something because of the way it works, rather than because I intend to actually use it for anything but "Wow, it works" type stuff.

I'm thinking my heroine would want a FAL. It's a powerful, accurate, reliable, versatile, well supported rifle that can be obtained for a relatively low cost. But I'm also unsure of myself here, I really don't know enough to be certain that I'm right here. What do you think?

Tuesday, October 4, 2011

Proud to be an American

We had about a week to prepare. I went in for the Naturalization Test on a Tuesday afternoon. We spent about an hour and a half waiting in a relatively comfortable chair in a large, mostly empty, waiting room. I guess not as many people are seeking immigration and citizenship as they were when the building was designed. L said she had full confidence in me. I had full confidence in passing the civics test, but I had no idea whether there was some obscure rule that would come up that would prevent me from taking the oath.

Finally, I was called by an immigration officer. She saw my wife, and then I left my wife in the hall, and the officer and I went to her office for my interview. I was asked to raise my right hand, swear to tell the truth, and then I sat down and went through the application process.

The first part of this involved simply confirming the details on my application. There'd been one change since I filled it in, and I'd filled it in long before I submitted it, but this wasn't counted against me. I was asked to take a writing and reading test, comprising of simple civics questions and answers (this wasn't the same as the civics test itself.) I think the aim of the test, given the level of skill needed, was more to ensure that you can read road signs and fill in forms rather than read a newspaper or anything like that.

The civics test required I answer seven of ten questions correctly. The ten questions are selected at random from one hundred standardized questions, and you're given a book, and a CD, containing all these questions and the right answers, to study before the interview. Some of the questions are easy, others not quite as easy, but on the day I'd remembered the right answers to all of them. Questions include "What is the highest court in the land", "How many US senators are there", "Who is the President", "Who was President during World War I", "Name a right given to every citizen", "Name two of the three rights described in the Declaration of Independence", "What did Martin Luther King do", and, somewhat bizarrely, "Name one thing Benjamin Franklin is famous for." I say bizarrely, because the list of "right answers" does not include either flying kites during electrical storms (or anything related to that), nor "inventing" Daylight Savings Time. Those would be my first two answers...

I answered the first seven questions correctly, at which point the officer didn't need to ask any more questions. I think most of them were questions I'd have known the answers to even before I studied. Now, I know a lot of Americans make the comment to me periodically that most Americans wouldn't be able to answer the same questions. I'm not so sure about that, but even if that's true, there's a difference between knowing the history of a country you're born into, and knowing the history of a country you love enough to want to be a part of.

And she did something on the computer, wrote something on a piece of paper, and then casually put the piece of paper in front of me, but just far enough from me to make it look like it wasn't for me. I passed. She was recommending I be given citizenship. And then, to my utter amazement, she printed out another piece of paper and gave it to me - which contained the date of the oath ceremony. And that date... was one week later.

I found my wife, gave her the form, we hugged, and then I repeated to her the fact I was almost certainly going to become an American one week from now. We left rather excited, to put it mildly, making plans, going to a restaurant we like to celebrate, calling everyone we knew, and generally feeling a mix of shock, relief, and thankfulness.

So the next six days were fairly nuts. I had to go to work as normal, and fortunately there was some urgent stuff that kept my mind busy. My wife was busy ordering everything festive she could find from eBay. My mother booked the first flight from across the Atlantic she could find and turned up on Friday evening. L. and I spent the weekend preparing, getting new clothes and organizing the family. Monday evening I went to Best Buy to get a new camcorder. And Tuesday morning arrived, and we rushed to get ready, and then drove down to Palm Beach for the ceremony, with my mother calling every five minutes not quite understanding that we were actually busy preparing.

Beyond the security people deciding that my wife's tape measure could be some kind of weapon, we had no problems at the INS building. Some people were late, delaying the ceremony by two hours (!), and we spent the time watching some kind of PBS style documentary on the Grand Canyon, while we filled out forms for our new social security cards, passports, and so on. Then the presiding officer's microphone wouldn't work. And finally it started.

What happened exactly? Well, the front three rows were composed of those of us becoming Americans. Behind and two the sides of us were family members, friends, etc, who'd come to wish us well. What happened in what order I can't recall exactly, but we sang the (first verse of the) National Anthem, and then we were all asked to stand as our country of origin was read out. And then asked to hold our right hand up as we recited the Oath of Allegiance. (

What's the oath? It's not the same as the Pledge. The Oath is a more specific statement renouncing allegiance to other countries and pledging to be loyal to the United States of America, including pledging to engage in various forms of military and civilian service if required to.

At that point, we were citizens. We recited the Pledge of Allegiance after that, watched two videos, a Ken Burns style montage of various immigrant themes, and then a message from the President. Finally, a (rather cheesy I thought, but who cares?) video of Lee Greenwood's "Proud to be an American/God bless the USA" which we were encouraged to sing, by immigration officers waving flags.

So that was that. Got a rather nice package of "stuff" too from a mini-American flag to a book on the important speeches and documents associated with the US, and also copies of the Declaration of Independence and the Constitution.

The evening was spent having dinner with my family in celebration. It was a very fun evening.


1. Welcome

I can't tell you how welcoming people are in this country. Virtually all countries have concerns about "immigrants", but the reality is that there's a massive gulf in the US between the advertised fears and how people actually act. The INS have, always, been positive to me, and generally speaking the people I've heard complain about them are the kinds of people who'd make Mother Theresa curse them out. And the INS is only a part of it, they're a fairly fair representation of how Americans see immigration in general. The INS doesn't like seeing people abuse the system, but it's clear to me that they want people who follow the rules, can contribute, and who love this country, to stay here.

One of the first things that happened, repeatedly, to me in the US is that I'd, say, strike up a conversation with a couple in a Restaurant, and they'd ask where I'm from, and I'd tell them, and they'd say "Wow, that's awesome. We're not from here either, I'm from Nebraska and Ethel here's from Missouri."

And, of course, I'd inwardly snort and think "That's not the same thing", but actually that's how most Americans see this country and people from other countries. It's one of the major things I love about America. People are treated as people, not as Americans vs British vs whatever. I'm not going to claim there's no discrimination at all, and I'm sure the poorer your English, and the poorer your bank account, the more intolerant people turn up against you. But overall people treat you as someone who's here, not someone from there.

2. Judgment

It's important to distinguish between the people of a country and the government of it. I don't think we have a particularly decent establishment right now, and that means not merely a government disconnected with the values and interests of its own people, but to a certain extent the steering of people away from viewpoints describing how things should be. If fifteen years ago, someone had said that the government was going to spy on its own people, quite openly send executioners into other countries to dispose of awkward enemies, and - again, openly - imprison hundreds of people without trial, in many cases for merely being in the wrong place at the wrong time, I'd have dismissed it as impossible, knowing what I know of Americans and the values this country stands for.

Before certain individuals react, yes, I know that from time to time, all governments - no matter how strongly their country's people associate their country with peace, freedom, and democracy - do these kinds of things, but normally such acts are covert, or fall apart quite quickly as they clash with the values the country stands for. To use my former nation as an example, the Gibraltar SAS strike became a national scandal as soon as the details become public. Internment was tried in Northern Ireland and then quickly ended when it became obvious that such an open debasement of British values was helping the IRA, not hurting it.

So why has it happened? Because the wrong people are in power, and it's difficult to put a dissenting voice in the media. I honestly don't know any Americans, left or right wing, who are happy with what is going on. They don't see it as where the US should be, even if those who nominally support the government of the day are prone to weak apologetics or denials to hide their embarrassment.

Americans do need to take their government back. That probably involves a large amount of work that's going to take decades, working to take over their parties and ensure the grassroots uses its power that, thus far, its been unwilling or unable to exercise.

3. Our values

We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.

It really is what America stands for. If you don't believe me, come to this country and live here a while. America is a country comprised of a people who believe that they should use their lives and liberties in the pursuit of Happiness, and that they should be a part of a system that promotes life and liberty so everyone can be free to pursue happiness.

Ask an American born here who's never visited another country if this is true, and they'd probably nod their head but not fully understand the meaning in those words. As someone who's come here from abroad, where many seem to be convinced that every duty exists except that in the support of happiness, it's really quite obvious.

Tuesday, September 20, 2011

The Windows 8 "Walled Garden"

From MSDN:

(On the new touch-UI apps for Windows 8) Distributed through the Windows Store. Apps must pass certification so that users download and try apps with confidence in their safety and privacy. Side-loading is available for enterprises and developers.

This is scary. Or should be. The concept of having to defer to someone else for "permission" to install a piece of software is absolutely outrageous, and is one of the reasons why I'm avoiding the iOS sphere.

About the nearest thing to a positive I can think of (well, not a positive so much as a "might not be as bad as..." thing) is that Microsoft's dominant position pretty much rules out the idea they can screen for content, in the same way that Apple does. If Microsoft uses the concept to screen out, say, compilations of political cartoons (as Apple did) then Microsoft is likely to attract the attention of a lot of anti-trust lawyers again, especially if Windows 8 truly ends up having the devastating affect on the market I think it will.

This, again, really, really, really, underscores the need for Canonical and Google to address the situation. I desperately hope both organizations are discussing this internally. Android doesn't stand a chance as long as it remains a stripped down single user operating system, and Ubuntu doesn't stand a chance as long as its primary APIs have no relevance to touchscreens.

Saturday, September 17, 2011

Ubuntu, Android, and Firefox in serious danger

Let me preface this by saying three things.

First, people who know me know I'm a serious fan of free software (as defined by the FSF) and I'm not exactly a fan of Microsoft. With that said, my views towards Microsoft have significantly softened over the past few years as Microsoft has started to become genuinely innovative and has embraced open standards. But Microsoft remains, at heart, a vendor of proprietary software.

Secondly, I do not have access to Android Icecream Sandwich. That said, the hints about what's in it do not really affect what's written here. It's just about possible that Icecream Sandwich is a true universal operating system that's just at home on the desktop as on a tablet or phone, but it's extremely improbable given the advance notice developers would need to make use of that.

Thirdly, while I technically have access to the betas of Ubuntu 11.10, I haven't yet downloaded it. I have followed its development, and Canonical have been fairly open about what it contains. So I don't think it's wrong for me to come to the conclusions that I'm coming to.

So, with that said, let's get to the meat of this journal entry. I think Microsoft's Windows 8 is going to change the way we use computers, and I don't think Android, Ubuntu, or Firefox are in a position right now to be a part of the future.

I spent about fifteen minutes using Windows 8 this morning. I knew roughly what was in it, and it was an interesting experience. Windows 8 has a very different UI from what we're used to. In some ways, it felt like going back to the 1980s when people started playing with GUIs. There were one or two significant problems: the UI, as is, just doesn't work well with a mouse. Lots of things are non-obvious, with hidden dialogs and strange menus.

Still, it does actually work, and you can see exactly how Microsoft intends for it to be used. This is a universal user interface. It'll appear on a tablet - which quite honestly, is probably what Microsoft intends the PC to turn into, it'll be on your TV, your phone, and your desktop - insofar as you still have one.

And by tablet, I don't mean a toy like an iPad or Xoom. I mean something that runs real applications, the logical successors to the ones you run on your desktop, not stripped down versions designed for a stripped down computer running a stripped down operating system. In that respect, this is almost a threat to Apple too, except that I suspect the iMac will run a touch version of Mac OS X in the long run anyway, and I believe Apple is working on it.

The other aspect of Windows 8 that's worth noting is that it's a web operating system. During the 1990s, Microsoft wanted to kill Netscape and spent a lot of time "integrating" IE into Windows to make it appear it was a necessary component of the system. The integration was essentially a sham, Microsoft wasn't ready to produce a real web based operating system at the time, and saw the entire concept as a threat.

That's not true of Windows 8. The user interface is, very clearly, a system built on web technologies, on top of the IE engine, and it's no longer realistic to suggest that users are going to find it useful to have alternative browsers installed.

There are C++ APIs, including an entirely new API unrelated to Win32, but it seems to exist largely as a belts-and-braces thing, a way to ensure that scenarios Microsoft hasn't thought of aren't impossible in the new system.

The combination of these technologies seems to point to drastic changes in the way we're using computers. If tablets are suddenly useful, it's quite easy to envisage people actually using them rather than buying them and ignoring them after a few weeks. Microsoft has been pioneering tablets for the last decade, but hasn't found a winning formula for the systems - but with the advances in UI design of the last few years, it really has a chance to make a workable tablet system.

Would people want these things? Well, the way I suspect it'd work would be something like a bigger version of the Motorola Atrix concept. You'd have a very portable device that contains everything, with the option of hooking it up to a proper keyboard and monitor when you need the comfort of having both. And personally, I love the idea. I've been wanting something like that since the 1980s. I'm not kidding. And I don't see why everyone wouldn't like the idea, given a tablet device that's powerful enough.


Ubuntu has been doing some very interesting stuff on the UI front lately, but it's like they're heading in entirely the wrong direction. By this, I don't mean the usual "Wah! I don't like Unity!!" arguments - as a mouse driven UI it's heading in absolutely the right direction. I'm not saying it's "good" yet, it isn't, there's a reason I don't run it as my primary UI, but I liked where Unity was going.

The problem here is that Unity is very much mouse oriented. The decisions the Ubuntu people are making are mostly revolving around the idea that the user will be using a mouse to control their system. Some features, such as the dock, are virtually unusable in a touch-UI context. Drop down menus? Again, hostile to the touch UI world without major changes.

The issue for Ubuntu though is not merely that their own attempts at building a next generation UI are heading in the wrong direction, it's that they're still locked to the GNOME application base. To build a user interface that works with the future "way of doing things", you need to essentially tell developers "Throw out what you're doing, and move to something else". That's extremely tough, especially for a system built upon goodwill and sharing rather than monopolist control of a major part of the infrastructure.

Nonetheless Canonical needs to change direction, and do it fast. There are things Ubuntu can adopt, the most obvious being to look at Android, especially when Icecream Sandwich comes around, to see what can be incorporated into a next generation UI. And they need to look at how the applications that Ubuntu provides can be rebuilt to work best with a universal UI.


Android, at least, has a - well - tablet friendly UI. It's not a Desktop friendly UI, and moreover, Android is a stripped down operating system. Android doesn't have many of the lower level and middleware layers that are needed to support a full, universal, operating system in the same way as Ubuntu or Windows. It's single user. The file system is awful. There's limited USB and Bluetooth support - indeed, if Google hasn't thought of it in a mobile context, the chances are it's not supported.

Porting proper desktop software to Android is a serious problem. While "any language that can be translated to Java byte code" can in theory be ported, in practice there's just no infrastructure for non-Java Dalvik development. The other option to developers is the NDK, but the NDK - again - is limited, being a C/C++ only thing, with a limited API. The NDK also limits the ability of an app to run on multiple CPU architectures, and it's realistic to suggest that Microsoft's decision will result in a massive influx of Intel based tablets in the near future.

Android is an excellent mobile operating system, and a true competitor to iOS. But it's just not powerful enough to take on Windows. I don't think Android is salvageable. Can it survive anyway, as a phone operating system? That depends on whether Windows Phone starts to make headway in a Windows 8 world. I can't comment on the likelihood of that.


Firefox has a large number of problems right now which makes me concerned for its future. Here are some points that have nothing to do with Windows 8.
  • While Firefox had some minor (but useful) new features added in version 4, this seemed to be at the expense of a browser that uses so much memory it simply becomes unusable on most desktops. Ironically, the reason it's causing your computer to halt and sit swapping for two or three minutes at a time is because they're trying to use memory to make Firefox slightly faster. Mozilla seems to go back and forth in terms of fixing this problem. But it's fair to say Firefox is rapidly gaining an atrocious reputation right now.
  • Firefox is pissing off developers. They teamed with Microsoft to kill the popular Web Database system, introducing the awful IndexedDB specification as an "alternative" (that doesn't even solve the same problems!) Their rapid release schedule is making it harder to ensure extensions work with the system - both upsetting developers of extensions, and developers who rely on extensions like Firebug.
  • Firefox is pissing off system administrators, by proposing release schedules, version update policies, and software update policies, that fly in the face of standard IT practice, and to add insult to injury, with some Firefox developers announcing that Firefox has no place in the corporate environment as a response.
I'm upset about this, because I love the Firefox browser. But I'm using the 4+ versions solely because Ubuntu doesn't give me the option of installing 3.6. Even with the memory issues half fixed, I find myself drifting towards Chrome these days.

Now, let's look forward on this. The Windows 8 UI is simple, it has a web browser integrated into it, and it doesn't really feel like you're using apps any more - eg you're selecting a page in News that you go to, you're not loading IE to look at a web site.

In this environment, you have to be fairly motivated to want to install another web browser, let alone use it. Where is this motivation as far as Firefox goes?

What of Chrome and Safari? I don't think anyone's going to install them under Windows 8 either, but Safari at least has the benefit of being a part of wherever Mac OS X is heading, and Chrome's importance is lessened by virtue of the fact it's just another Webkit browser, albeit a nicer one (in my opinion) than Safari.

What happens from here

I think unless Ubuntu changes direction it's dead in the water. I think it'll start rapidly losing what little marketshare it has from 2013 onwards unless the Canonical people find a way to fix the UI issues so it can run efficiently and well in a tablet environment.

I think Android is going to have severe problems going forward. I can't see how it can be fixed. I think the system may work well as a phone OS, but it may lose the battle if people find themselves drawn to Windows Phones because they work well, and are well integrated with Windows 8.

I think we're going to be seeing the death throes of Firefox in the very near future. Canonical was reportedly considering a switch to Chrome with the last version, I think they'll eventually go in that direction. I think relatively few Windows 8 users will deliberately install Firefox.

On a separate note, I think it'll be interesting to see what Apple is doing. If I had to make a prediction, I'd say it seems likely, to me, that the iPad and iMac "products" will merge in the near future. I think Mac OS X will steadily become more tablet oriented, and once it's ready, a "tablet iMac" will be the next thing that comes out of Cupertino. The iPad will likely be phased out at that point.

What do you think? Anyone else used Windows 8 yet?