Hello, WordPress, hello Logos Hope

I use WordPress at work, it’s the engine behind fr.om.org, transform.om.org and most of the other sites that we run for clients.

I’m in two minds as to whether I like it or not. Some things are great. For users (content authors, the people writing blog posts or static pages), it’s fine. Easy to understand and use. For writing plugins and templates, it’s… Well, kind of messy and ugly, but doable. For instance, rather than have 1 HTML template “base” file, with a block saying, “put posts here, and wrap each one in x,y,z”, you have a header.php which has only the start of all the HTML, and a footer.php which closes it all, and a content.php, a content-post.php, and so on, and you have to keep them all synced up. Also, since it’s designed for running on old PHP, it doesn’t use namespaces or other ways of keeping code clean, so all functions in all plugins and all templates are all global scope, so to avoid bumping in to each other, you have to name all your functions stuff like, “madprofs_teapot_plugin_get_resource() and similar. Then at the same time, WordPress has multiple global functions of its own, some called things like, the_post(), others like wp_get_cached(), (so prefixed with wp_), and others in other styles. Messy.

Still, it gets the job done.

So when I wanted to update and clean up the [email protected] blog, I thought I’d just stick with blogger. It works, it’s what I already had. But then, accidentally, while trying to update it, I lost the entire design, and putting it back together was this awful mess of Google-XML/HTML confusion, I thought, “you know, stuff it, I’ll just use WordPress.” So I span up a site on the server (in about 2 minutes), pointed the blogger importer at brummieatsea.blogspot.com, let it chug away for a few minutes, and here we are.

I’m just using a very simple built in design for now, (with my own background), but it seems to work. I now don’t have to worry about Google turning off blogger like they did with Reader and GoogleCode, and since I use WordPress at work, I understand what’s going on pretty well.

That all said, we’re now on the ship, trying to settle in. We have a really nice cabin. Jet lag wasn’t fun, especially with the baby, but we’ll get through it. Yesterday Becky drank a big milky drink by accident – we thought it wasn’t cows milk but plant based, and last night and tonight David has been awful – screaming for ages and refusing to be comforted or to sleep lying down in his bed. So that does seem to confirm that maybe it is a lactose intolerance at the moment – hopefully he’s back to normal in a day or so.

Work so far is just cleaning the various venues. We’ve not even begun to start installing new equipment or doing anything really technical. We’ve got the lights out of their bags and air-blasted them all, cleaned many surfaces and TVs and vacuumed and dusted. It’s going alright. Still sooo much to do.

For Becky and David things are a bit odd still, it’s quite odd not having a fixed job to do, not knowing what to do most of the day, not having cornerstone to visit, not really knowing many people yet, and so on.

Anyway, we’re here, the flights weren’t bad at all. We couldn’t check in online due to some weird computer bug, but at the terminal while we were checking in we asked about getting a bassinet for David to sleep in, and they said they could get us one, but the lady recommended us instead to not get one, as he is quite big, and had a seat booked, and instead found us a row of four seats with no one else on the row, so we could make a bed for David there, which gave us all a lot more room. So on the second flight, both mother and baby could actually lie down and get some proper sleep, and arrive not looking like zombies.

I now have this weird mental image, after that last sentence, of a zombie “madonna and child” (very un-)orthodox icon…

That aside, we’re here!

It’s been a while.

So. It’s been a while, blog.

9 months ago our son was born, and he kind of took priority over writing.  I’m sure you understand.

Anyway, the reason for this post is that once again, the brummie will soon be at sea! This time with Mrs. Brummie, and Baby Cumbrian.  I don’t know if Becky will object to being Mrs. Brummie, as she’s actually from Yorkshire, but whatever.

So we’re heading out to the Logos Hope again for 3 months.

Becky and I were on board for 3 months just over 2 years ago, helping with the A/V and Events teams after the 6 months dry-dock in Subic Bay.  This time, the ship has just come out of several months in dry-dock again, this time having the generators replaced.

I’ll be working with the A/V team again, doing training and helping getting everything back on track and working again.  We’ve bought some new equipment, as most of what’s there now is from the original install 6+ years ago, and is in need of some serious overhaulage.

During the Subic Bay drydock 2 years ago, none of the A/V gear was packed away properly, which is part of why everything is in such bad condition now.  At least now, since then, it’s become part of A/V culture to do a serious pack down at the start of every dry-dock.  All of the lights on the truss get plastic bagged, all of the lighting dimmers get unplugged and tagged out, the desks get bagged and covered, etc.

In some ways, I’m extremely excited about going back again.  For the last couple of years I’ve ended up doing more and more I.T. work here, making and maintaining websites for transform.om.org, fr.om.org, omnivision.om.org, omnitube.org, and video.om.org, as well as a few internal projects (including stuff-management and streetsign).  It’s kind of interesting, some days, but also pretty frustrating too.  I feel I’m more of a creative ideas person, rather than a server-maintenance guy, so the initial creation of websites or programming projects is kind of fun, the on-going maintenanace and bug-fixing drives me to despair (not to mention having to work in PHP with WordPress…).

I love the ship’s work, I love doing events (especially the school visits and other kids events and actual theatre type events), and am quite excited about not having to do I.T. stuff here for a while.

It’s really strange to think that when we get back from the Logos Hope in 3 months time, it’ll be 10 years since I started this blog, when I first went to Doulos for 3 months….

Anyway, time for dinner, and I need to go play with our son.  I’ll try and post something a lot more regularly this time.  Writing is theraputic, and I suspect I’m going to need it…

LVM snapshots for a resetable machine

I have ended up maintaining a few websites which we are hosting on a machine off in Germany somewhere.

I want to get everything automated, so I have less work to do if something goes wrong.

I’m using ansible, which is wonderful, and have a nice set of playbooks I’ve written which take a raw CentOS install, and install everything, (php-fpm, nginx, etc…) set up the virtualhosts, install wordpress & joomla and all that for the sites that need it, etc.

Until today, I’ve been using a virtualbox on my local computer to test on, and it works great.  I haven’t bothered with vagrant, as I tried it for a couple of days, and it crashed my whole computer twice, so I gave up.  With virtualbox, it’s almost as simple.  I have a virtualmachine which I can spin up, install stuff on, and then when I want to go back to a fresh machine, it’s a matter of turning it off, and clicking ‘restore snapshot’ to the snapshot I made when it was clean installed.

It’s practically instant, and just works.

However, running a virtualmachine on my primary work computer all the time does make everything else somewhat sluggish.  So I’ve scrouged an old computer that wasn’t doing anything, and am now using that instead.

In order to get snapshots and restore points going well, here’s how I did it:

  1. Install CentOS, leaving a bunch of free space on the LVM primary group.
  2. Make a snapshot when it’s first installed
  3. Restore (merge to) that snapshot whenever I want it back to original settings.
  4. Reboot

To make & restore the snapshots, I’ve written the commands as scripts so I don’t have to remember the lg-whatever stuff. (vg_localtest is the name of the volume group I set up for the HD when I installed):


lvcreate –size 100G -s -n original_snapshot /dev/vg_localtest/root


lvconvert –merge /dev/vg_localtest/original_snapshot && reboot

It works great so far.  One improvement I’m making, since I one time forgot to make a snapshot, and so couldn’t restore to a blank slate without re-installing the whole thing (which, admittedly, only takes half an hour or so):

I’m adding ‘snapshot_make’ into a boot script, and then modifying it to remove itself from the bootscript once it’s made the snapshot.  That way as soon as the machine reboots into it’s original snapshot, it will automatically re-create the snapshot.

This looks like:


lvcreate –size 100G -s -n original_snapshot /dev/vg_localtest/root

sed -ine ‘/snapshot/d’ /etc/rc.local

and then /etc/rc.local will look like:

#… whatever it has

“Matthew’s Blog”

For the last few months, some friends and I have been working in our spare time on a 12 part video series, “Matthew’s Blog” – a video blog from the point of view of the Apostle Matthew (although he doesn’t know it yet).

He starts off as a young, arrogant tax officer, which is where we meet him in the first Episode:

I hope you enjoy!  Please join us as it leads up to the climax at Easter this year on facebook.com/matthewsblog !

Merging directories with the magic of Python.

We finally got the last projects out of that monstrosity ‘Final Cut Server’, but one project at the end was a nightmare to export, and we weren’t sure which files from the end actually were in a different version of the project that we already had.

We essentially needed to merge two different versions of projects directories, making sure not to lose any files, and we didn’t want to lose the organization of the files.

Here’s a quick python script I wipped up to make it quicker.

With the 4000 odd files in the project, it took under a second to run, and it turned out we only had about 20 files which hadn’t already been merged.  Much simpler to sort out.

The script took about 10 minutes to write and test. This is why you should learn to program.  Hacking stuff like this up is easy, and saves *so* much time.

(Yes, you probably could do this with a couple of lines of perl or BASH, but what the heck.)

#!/usr/bin/env python

from subprocess import Popen, PIPE
from os import stat
from os.path import basename, abspath

def run(*command):
    found = Popen(command, stdout=PIPE)
    return found.communicate()[0]

def files_in(dirname):
    return [x for x in run('find', abspath(dirname), '-type','f', '-print0').split(chr(0)) if x]

if __name__ == '__main__':
    from sys import argv

        sourcedir = files_in(argv[1])
        destdir = files_in(argv[2])
    except IndexError:
        print 'Usage:'
        print argv[0], '  '
        print 'Where you want to check if files in  are also in '
        print '(but perhaps with a different relative path)'

    print '---------------------------------------------------'
    print '{0} files in {1}'.format(len(sourcedir), abspath(argv[1]))
    print '{0} files in {1}'.format(len(destdir), abspath(argv[2]))
    print '---------------------------------------------------'

    destnames = {}

    for destfile in destdir:
        destnames[basename(destfile)] = {'size': stat(destfile).st_size,
                                         'path': destfile }

    for newfile in sourcedir:
        base = basename(newfile)
        if base not in destnames:
            print newfile, 'is NOT in the new dir'
            destfile = destnames[base]
            if stat(newfile).st_size != destfile['size']:
                print '{0}({1}) differs from {2}({3})'.format(
                      newfile, stat(newfile).st_size,
                      destfile['path'], destfile['size'])

Ergonomic things.

I get wrist pain in … well, obviously, my wrists.

Man, that was a bit of a daft start to a post.

Especially when using a mouse, but also when I have to do a lot of typing.  I do touch type, but not ‘formally’, with perfect  full-hand position, and so on.

Anyway, to try and make things better, here are some of the things I’m using

Microsoft Natural 4000 Keyboard

One of the weird things about keyboards is that essentially, we still use the exact same design that was needed for swinging arm typewriters. Stuffing all the keys as close together as we can, in orderly rows, so that the arm can hit the paper in the same place every time.
Actually, though, our hands would be a lot happier somewhat spaced apart, and at an angle, rather than trying to line up next to each other.

I have been using one of these Microsoft Keyboards for over a year now at work, and although it’s not perfect, it is a lot nicer than regular cheap and nasty keyboards, and a lot cheaper than some other Ergonomic Keyboards.

I currently have it at home, as, since this is a bit of a quiet time at OMNIvision, I thought I should finally get around to learning a more sane keyboard layout than QWERTY.  I’m learning Workman, which is a little obscure at the moment, but to me makes sense.  We’ll see if it takes off at all in the future…

Kensington Trackball

 The thing which makes my wrists hurt the most is using a mouse, so I’ve been playing for a while with using the popular alternative to mice: trackballs.  This one is really cool, in that it has a built in scroll wheel.  That’s normal on mice, but for no apparent reason, is kind of unusual on trackballs.

I’m not 100% sold on trackballs as the answer, I think probably as big a part of it as anything is having to reach way over to the side and grip at an angle.  So I try to keep the trackball in the middle of the desk, and I have it also on an angle using an old empty CD spool.

Wowpen Joy

At home, I tried for a while using another trackball I got on ebay, as it was cheap, as it was second-hand.  It also wasn’t very reliable, so it ended up being more frustrating than helpful.  I then looked at Vertical Mice – mice which are designed to keep your hand in the ‘handshake position’ more naturally than the twisted flat position of normal mice.
A lot of vertical mice, like ergonomic keyboards, are pretty expensive.  However, on ebay there were a lot of these incredibly named ‘WowPen Joy’ mice.  The name itself is enough to put you off.  Anyway, I thought I’d try and see how one was.  It’s actually very nice.  It is kind of small, but still works fine with my big hands, I just use my middle and ring fingers to click, not index and middle.
Yes, I think it’s helping.  But still sometimes my wrists are painful, so much that I have to stop mousing or typing at all for a while.  I need to work on my posture, I think.  I’m considering trying a standing desk at work for a few months, as whenever I sit I do tend to slouch, no matter how many times I try to remember to sit up properly.
I also use “Time Out” computer break software on my work machine, which is really annoying, but almost certainly a good idea. Every so often it jumps up on my screen and tells me to stretch, and take a 10 second break from the keyboard, and then every 45 minutes or so, tells me to take a 5 minute break, which I use to do some cleaning, make coffee, go hang out with someone, or get one of the other non-computer jobs done that I need to.  Sometimes, if I have nothing else really to do, then:

Contact juggling

I keep a contact juggling ball around, and play with that during the micro breaks, which is supposed to be good for muscles and stretching…

So why, you may ask, am I writing all this boring waffle about keyboards and so on.  Well, partly, because it is kind of interesting to me. Partly it’s because I do find it easier to get started writing about factual/techy stuff – maybe that’s part of being an INFP, extroverting my TJ side, I dunno.  I have some more philosophical thoughts which I can relate through all this geeky ergonomic clobber. I’ll post it soon.

Super fast review of the past few months.

Foolishly, perhaps, we thought this year would be a quiet one.
A couple months on the ship at the start, then back in the UK until August, Teenstreet in Germany, and then back home for the rest of the year.

There’s a quote regarding the fallibility of apparently structurally sound plans of humans and rodents which might be appropriate around here.

When we finished our time on Logos Hope, we were in Bangkok.  Our organisation was holding a conference there at that time, so we helped out with the A/V techie arrangements for that.  When that was over, Becky headed home to Carlisle, and I went North for a week or so as cameraman, filming and visiting with one of our teams in the region.

After I got back two weeks later to the UK, We had a couple of weeks ‘normal work’, before I had to go to Ireland to run sound for an Event in Cork, as one of our other Sound Engineers needed to go back to Korea for surgery.

After getting back to Carlisle, we had about two weeks before we’d scheduled a couple of weeks in Cyprus, to take the Christmas break we’d missed on the ship, and take some time off, in lieu.

Two days before we were due to leave Cyprus, my Grandmother in Birmingham passed away, quite suddenly – although not totally unexpectedly – and so we returned to the UK with my parents and brother for her funeral.

We were then in back to Carlisle for a few weeks, before travelling over to Germany for Teenstreet.

While we were at Teenstreet, the arrangments came together for a filming project my Dad has been planning for a while in Cyprus, so instead of coming back to the UK, we headed over to Cyprus again to help with that, myself doing the sound recording and Becky the shoot documenting and general assisting.

We’ve since been back in the UK for just about three weeks, and so wondering what’s going to happen next.

Right now we have our friend Ant, staying with us, and he inspired me to start blogging again.  This may not be the most exciting post in the world, but it at least starts to cover the great gap of the last several months.

You should check Ant’s Thoughts About Job.


With a post title like that, I kind of want to write a long piece about how we put people in boxes, or false expectations, or something.  But alas, the subject is somewhat more prosaic.  Actually, it’s not prosaic at all.  It’s kind of boring, actually.  Prose rather implies some kind of textual content, I feel, which this post doesn’t really have.


I’ve been making labels for things.
Perhaps it will make them feel more judged and unloved.
Perhaps it will simply make things easier for new AV operators to understand…

Documentation, and how balanced audio cables work.

I finally had a bit more time this morning to write a bit more in the A/V manual.  There’s lots of bits and pieces of documentation on board, but no comprehensive single getting started manual.  So I’m writing one, bring together bits and pieces from all over the place, sorting out what documentation there is, updating schematics, etc.

Anyway, here’s the rough version on the article I just wrote about how balanced sound cables work.  It’s pretty much my standard explanation of Balanced Audio, and aimed at people coming to A/V from a non-techy musical background, rather than for Electronics Engineers.
You may find it interesting.  Then again, you may not.


Sound is basically vibrations in the air.
TODO: more details, pingpong ball analogy? 

Inside an (SM57) Microphone head.
That is the bit of plastic and the coils!

This translates really easily into an analogue electrical signal: you simply turn the air vibrations into voltage vibrations.  A Dynamic microphone does this by having a small bit of paper (or plastic) which vibrates with the air around it, and pushes against a very small copper coil which, moving inside a magnetic coil itself, generates a very-very-very small amount of electrical current.

 TODO: more pictures.
This gets dumped down a wire, which gets amplified by (you guessed it) an amplifier into a very big amount of electrical current, which then drives a big electromagnet inside a speaker, which pushes another copper coil around, which is attached to another big bit of paper (the speaker cone), which causes the air around the speaker to vibrate – with the same vibrations that the microphone vibrated with, just bigger.
Simple, isn’t it? (well. Kind of.)

Balanced Audio Cabling

The trouble with simply dumping an audio signal down a cable, and picking it up at the other end is that your signal line, and return (usually ground) will pick up noise (say from A/C mains electricity, fluorescent lights, dimmers, mobile phones, etc)  along the way.

Here’s an original signal:

And here’s some noise:


 And the result:

This is a Bad Thing™.
So some clever engineers, back in the deep recesses of time figured out the following:  You could take a signal, and before sending down the wire where it could pick up noise, invert it:

If we add the signal to the inverse, you get a grand result of nothing (e.g. -3 + 3 = 0).
Now, if we throw these two signals down a pair of very similar cables twisted round and round each other like crazy, then they’ll both pick up noise pretty much the same as each other:

Note that 3 (the original) + 1 noise = 4,
while -3 (the inverse) + 1 noise = -2. NOT -4!
This is really cool, because if we add these two signals together, we don’t get 0 anymore, we get no original signal, but you do get the noise (doubled).


So we’ll use our amazing maths skills again, and divide this doubled noise in half. (2/2 = 1).

And we can subtract this 1 noise from the noisy original signal (4-1=3)

Voila! The original clean signal is back again.

  This is (roughly speaking) how balanced audio works.  And since almost all professional audio equipment runs with balanced circuitry, all we need to do is make sure the cables are in good shape, and then everything works magically with hardly any noise.

This is why for balanced cables (XLR/Mic, or TRS jack) you have 3 pins: +, -, and ground.  The ground is connected to a wire-mesh sheath around the other two, to try and keep as much noise away as possible.
(Technically, you don’t need to invert the signal, you could just use an empty zero, but for various impedance, op-amp, techy reasons, it works better if you do.)
Sometimes the ground wire will pick up noise itself, or due to being connected to different grounds at both ends of the circuit (say a piano on stage, and the A/V room sound desk) it will end up with a bit of random leaked current running down itself.  This can show up as noise, so you often use a Ground-Lift switch to disconnect the ground at one end or the other, which can sometimes help.
A DI box takes an unbalanced signal, and turns it into a balanced one, which means you can send a signal a long way without noise.
Remember how the two wires have to be twisted together like crazy?  This is so that if there is some noisy thing (like a flurescent light) nearby, both wires will be equally effected.  This is so important, that for broadcast audio, sometimes cables with 4 or more wires are used.  The + signal on 1 & 3, the – signal on 2 and 4, and then all of these are twisted together.  There are brand names of these cables such as QuadStar, etc.  Usually this is somewhat overkill for regular live sound though, as the cabling is much stiffer and harder to use day to day.

So, what do you think?

A random side story.


An individual with an extremely large head has been seen, dressed in a captains uniform walking around the vicinity of the Hong Kong International Airport.  He seems reasonably calm, although the fixed smile on his face is somewhat disturbing.  We believe he is waiting for some one, or ones, to arrive from destinations unknown.

Please advise.

Plenty of people coming off the plane were very confused.  Still, pretty fun for us.  I was the one with the camera, not the one in the suit, in case you’re wondering.
I think we may have slightly freaked out the bus driver on the way as well…

(Yes, we were picking up friends from the airport.  No, they didn’t know we were going to bring the Captain.  Yes, it was funny.)