bma's blog

[ Home | RSS 2.0 | ATOM 1.0 ]

Mon, 26 Mar 2012

ORGCon 2012

On Saturday, I attended ORGCon 2012, the Open Rights Group’s conference. I signed up fairly late on, mostly because I had nothing better to be doing that day, and I’m pretty glad I did.

It was also interesting to compare Lessig’s talk with Cory Doctorow’s opening talk; while Doctorow was interesting, Lessig was making a deeper political point: that rather than focus on one campaign after another (Software Patents Directive, Digital Economy Act, SOPA, PIPA, ACTA, ad infinitum), we should also attack the root cause: a political system that allows people with money to get their way. He’s also a noticably better speaker; Doctorow noticeably read from notes, while Lessig appeared to do the whole thing from memory, or at least did a better job of hiding it. (His slides were pretty cool, too.)

posted at: 14:02 | path: /2012 | permanent link to this entry

Mon, 13 Feb 2012

Reading

One advantage of the weather being rubbish (and, admittedly, of me being lazy) is that I have plenty of time to read on the train: thirty or forty minutes in each direction, although it tends to be interrupted by changing trains and so on. So, this year I'm aiming to work through some of the books I've been meaning to read for a while; an ebook reader makes that rather convenient.

I started off by reading The Girl With The Dragon Tattoo, after seeing the new film (I'd already seen the earlier Swedish film). I'd have to say that in some ways it's better than the films; I quite enjoyed the slight tangential subplots every so often, which wouldn't really have translated well to film and so were replaced. I did find his habit of adding irrelevant technical details quite annoying. I don't care about the specifications of the protagonist's iBook; I'm not even sure I care that it's an iBook unless it's relevant to the plot or the character.

After that I read Tinker Tailor Soldier Spy, once again after seeing the film. Although I did love the film, again I have to say I preferred the book. In the film, it was at times hard to follow the subterfuge, and particularly the reasoning that lead the protagonist to uncover it. Perhaps it's just because I'd already seen the film, but I didn't have any such issue with the book. On the other hand, Le Carré has a nice way of not spelling out the conclusions; when the protagonist receives information, which obviously relates back to an earlier event, the reader can work out this connection without the author having to add "it were the butler what done it!".

There were noticable differences between the book and the film, mostly in terms of the order in which events were explained (the film, for example, starts with an operation that goes badly wrong, whereas in the book the details of this are kept secret and only uncovered later). There were also additional scenes of a Christmas party at MI6, apparently as a device to establish the relationships between some of the characters. Either way, both were thoroughly enjoyable.

After that, I decided to go for some more le Carré: The Spy Who Came In From The Cold. Another enjoyable read, though it felt somewhat lighter than Tinker Tailor (at least, I finished it in half the time; a disadvantage of the Kindle is that it's hard to judge how long a book is in absolute terms). Interesting perspectives on the Cold War and early-Sixties Berlin, and multiple layers of plotting and secrecy. It was quite fun during the last few chapters, when everything was going wrong, to try to work out why it was going wrong (I think I got it about half a page before the reveal). My only complaint is that the ending is a little abrupt.

So far I've been averaging a book every two weeks; I want to see if I can improve that average by the end of the year.

posted at: 10:46 | path: /2012 | permanent link to this entry

Wed, 14 Dec 2011

Cycle rides

I've tended to be quite lazy about cycling since I moved to London; at best I've cycled two or three times a week (just between home and work), and there have been periods when I've gone weeks without cycling (which does, admittedly, give me an opportunity to read more, which I don't otherwise find time for very often).

In an attempt to remedy this, I've been challenging myself to cycle to work every day. After a couple of months in which I'd only been cycling once a week, if at all, last week I managed three days again --- one of the days I missed due to going go-karting after work, and the other because I was so sore after the go-karting. I want to keep it up all winter, because I know if I stop it could easily be spring before I start again.

A big problem has been oversleeping: if I don't have time to wake up properly before I leave the house, I don't feel safe cycling in traffic, so I take the train --- and end up being even later, as cycling is significantly faster than public transport. Another reason to try to fix my sleeping pattern, I suppose.

I've also been trying, from time to time, to go out for longer rides at weekends.

The Greenway is an okay ride (unless you're riding into the wind, in which case it's terrible), but the Greenwich side was disappointing --- there was quite a lot of walking along the side of dual carriageways in order to get to cycleable paths.

posted at: 13:29 | path: /2011 | permanent link to this entry

Wed, 12 Oct 2011

Tracking Packages Not Installed by Puppet

I use puppet to manage my servers (and my laptop), primarily because it's what we use at work. However, I have a bad habit of just doing things manually rather than through puppet; since I've recently begun moving my website to a new host I thought I'd try and track this a little better.

FreeBSD has a helpful tool, ports-mgmt/pkg_cutleaves, for listing and removing packages that are not depended upon by any other packages. So, I generated a list of packages installed by Puppet:

< /var/puppet/state/state.yaml awk -F'[\\[\\]]' '/Package/{print $2}' | sort > /usr/local/etc/pkg_leaves.exclude

Then pkg_cutleaves -lx gives a list of everything not installed by Puppet and not depended upon by anything else.

For Debian, it was a little harder, since I'd never had cause to use the relevant tools before. With some help from Server Fault, I got a list of manually-installed packages with the following script:

1
2
3
4
5
6
7
8
#!/bin/sh
set -e
all_installed=$(mktemp)
auto_installed=$(mktemp)
dpkg --get-selections | sed -n 's/\t\+install$//p' > ${all_installed}
</var/lib/apt/extended_states awk -v RS= '/\nAuto-Installed: *1/{print $2}' | sort > ${auto_installed}
comm -23 ${all_installed} ${auto_installed}
rm -f ${all_installed} ${auto_installed}

Then marked everything as being automatically installed:

get-manually-installed|xargs apt-mark markauto

Then, similar to the FreeBSD method, marked all the packages installed by Puppet as manually-installed:

< /var/lib/puppet/state/state.yaml awk -F'[\[\]]' '/Package/{print $2}' | xargs apt-mark manual

Alternatively, to get a list of only manually-installed packages not installed by Puppet:

1
2
3
4
5
6
7
8
#!/bin/sh
set -e
manual=$(mktemp)
puppet=$(mktemp)
get-manually-installed > ${manual}
< /var/lib/puppet/state/state.yaml awk -F'[\[\]]' '/Package/{print $2}' | sort > ${puppet}
comm -23 ${manual} ${puppet}
rm -f ${manual} ${puppet}

Debian should be somewhat easier to maintain than FreeBSD, as anything installed by Puppet will be marked as manually-installed

P.S.: Yes, I'm aware that this is basically the worst way of parsing yaml ever. Sorry. Also note that the name in puppet will be the namevar, so if the namevar isn't the package name (e.g., package { 'meaningless_string': name => 'real_package_name' }) you lose. Sorry.

posted at: 12:37 | path: /2011 | permanent link to this entry

Sun, 18 Sep 2011

Bus Lanes

There seems to be a trend of allowing motorcycles to use bus lanes; Plymouth began shortly before I started cycling, and it seems to be the norm in London too. I actually find motorcycles more offputting than buses or taxis when I'm cycling (though I have other complaints about taxis). Buses and taxis will generally overtake a cyclist properly, moving well to the side (traffic permitting), and so they don't present any real threat; conversely, motorcyclists tend to try to share the lane with cyclists, which means they're passing relatively close and often at full speed. There's not much that's more offputting than the sound of a speeding motorcycle approaching from behind in an otherwise empty lane. (That's quite aside from their tendency to use cycle lanes and advance stop zones, even more frequently than other drivers do.)

My objection to taxis, particularly black cabs (in London) is more political. In central London, inside the congestion charge zone, cabs make up a significant proportion of the traffic anyway, and I don't see any particular reason that they should have special privileges — it's not like they're any better for the environment than any other car. For most journeys, people should be using trains (mainline or underground) or buses, and the only people driving or being driven should be those who aren't able to use public transport — not simply those who are too lazy. (Conversely, I see no reason why blue badge holders shouldn't be allowed to drive in bus lanes, since the reason they're driving is that they're unable to use public transport.)

posted at: 16:52 | path: /2011 | permanent link to this entry

Made with Pyblosxom