Auckland and Big Day Out

I had a fascinating conversation with a lieutenant commander of the New Zealand Navy on the airport shuttle on my way to the North Shore. The discussion ranged from World War Two battles; unmanned drones making automated strikes against human targets and the Geneva Convention; neural networks (my research); Network latency and how it effects combat management, both for the military and in World of Warcraft; computer security, leaked diplomatic cables and Bruce Schneier’s research on the human weak-points of cryptology and secrecy. It was brilliant.

I’ll say this for Big Day Out. It got wet.

The rain started bucketing down during Shihad’s complete rendition of The General Electric.  Down in the pit it didn’t matter much. I had planned far enough ahead to have my cellphone and wallet and stuff in ziplock plastic bags — but I had no other protection for myself whatsoever. I got saturated.

It was very considerate of Rammstein to dry us all out, using flamethrowers. Seriously, I’ve never seen so much pyrotechnics, rockets, and firewords being detonated on a stage with a fabric roof in my life. The Rammstein performance included, amongst other things. Starburst firewords being fired straight down at the stage (and the band members) from the ceiling; Face-mask flamethrowers being worn by both guitarists; rocket fireworks launched from crossbows at the sound tower, where rockets were fired right back at the stage along guide-wires. Oh, and of course they were playing during all this too.

The best moment of their show had to be when someone from the crowd apparently managed to get up on the stage, running around and waving at the crowd. The lead singer waited till he turned his back and nailed him with the flamethrower, setting him alight. He ran off in apparent fear and alarm, and it wasn’t until he ran back again, still on fire, that it was completely clear that it was staged. I had certainly hoped so from the moment he was set ablaze though. As much as they must be tempted, bands probably shouldn’t be allowed to napalm their fans, as a rule.

And of course, Rammstein weren’t even the headliners — half way through the set I made my way over to the other stage to get in a good spot for Tool. It was a perfect performance, with an awesome and sureal light/lazer show which was brilliant, if not as ridiculously over-the-top as Rammstein’s.  Tool (I thought) finished their set with Lateralus, their 10 minute magnum opus, only to then break into Third Eye, their thirteen minute massive closer to Aenima, completely destroying what energy I had left. I started making my way to the exit as they were finishing to try and get a bus before hypothermia really set in, only to have to turn back when they started playing Stinkfist, they’re real final song of the evening. It was maddening and awesome at the same time.

Other highlights from my day included:

  • Shihad’s perfect rendition of The General Electric. They played the whole album through, giving me a massive flashback since the last Big Day Out I went to (2000) was just after they released it. Still one of the greatest albums ever. Oh man, one of their roadies totally screwed up during their last song, and Jon had to finish it without his guitar, and Phil stormed off in a huff. Bet someone got fired two minutes later.
    Actually, I got to have a chat with Shihad earlier in the day in the signing tent. I thanked them for doing the Killjoy tour, and explained that I had been waiting 15 years to hear them play ‘For What You Burn’ again. Jon was suprised and said they’d never actually played it live. But I knew better, I heard it for the first time when they played it at The River Inn in Takaka back when I was fourteen. This must be how Star Trek fans feel when they correct the writers on some trivial point — that is, like an asshole.
  • Seeing the John Butler Trio live was amazing. I’ve never heard anyone play the guitaThe lead singer for Airbourne playing his solo from the top of the tower having just skulled a bottle of wine.r the way he does. I have a 12-string Maton guitar (his signature instrument), seeing him play makes me ashamed to even try playing mine.
  • Airbourne and Wolfmother, between them, played all of their songs that my band covers (in other words, about half our set). It turns out they play them pretty well too. I suppose. The singer for Airbourne is fucking insane (See picture).
  • Yes, I skipped the Deftones to see Andrew WK. Deftones are awesome, but Andrew is just plain fun. Plus, he had a crazy bald bass-player playing a G&L, so they get even more cool points right there.
  • Rammstein again, Du Hast in a stadium is just mind-blowing.

Tell you what, though. The rain sucked. Ankle deep in mud and dripping wet and had two hours of bus rides before getting home to a hot shower. Luckily, someone was selling illicit Tool shirts near the gate, so I fished out some cash and was able to buy a dry(ish) shirt to put on for the ride home.

Oh well, tomorrow I fly to Brisbane, I’m sure I’ll be free of mud and rain there, right?

Right?

Kiwi PyCon in bullet points

In November my coworker Nick and I went to Kiwi PyCon in Waitangi. The conferences I get to go to are the no. #1 perk of my job. The university is big on continuing training and education, but since nothing that’s offered internally is usually of much use to me I instead always ask to go to some of the conferences around the place. Since 2008 I’ve been lucky enough to attend each linux.conf.au.  Which is also in fact where I’ll be headed next week.

While sitting in on talks at conferences I try hard to keep my laptop in my bag. Instead I pay attention to the lecturer and take notes in my notebook.  Since I spent so many years as a university student, my notes are almost entirely indecipherable and useless.

What I usually end up with that, is the occasional quote and a huge list of project names/buzzwords that I needed to follow up on later. I’ve decided to translate as much of my bullet points from Kiwi PyCon 2010 into this post. Both to make it easier for me to refer back to later and for people doing similar stuff who find some of these links useful.

20 November

  • “Seven Programming Languages in Seven Days”
    (I’ve no idea what this means — if it was a talk, I missed it. Sounds interesting though)
  • Look at “Chef” as a python-puppet-type thing.
    (Chef is a system similar puppet, which we use heavily at work. I think when writing this I thought Chef was written in Python, but it’s actually Ruby, like puppet)
  • I should join the NZ Python society.
  • Jacob Kaplan-Moss
    • “DevOps”
    • “We’re all ops people now”
    • “D.R.Y. Grunt work is for chumps”
    • Everything goes in SCM
      (including stuff like deployment scripts and server-provisioning)
  • Cardinal virtues of DevOps:
    • Don’t Repeat Yourself -> Larry Wall’s “Laziness” -> Automation!
  • Fabric“: python tool to execute code on multiple systems at once.
    (This has already become my number one take-home great new tool from the conference, apart from the fantastic WingWare conference pens, of which I took about a half dozen)
  • Jacob likes Chef for configuration management.
    (We’re already MASSIVELY invested in our puppet infrastructure, so probably not changing anytime soon)
  • Lazy tools
    • “Eventually consistent” databases.
    • “Queues are huge”
  • Celery” is a queueing framework worth investigating.
  • Impatience
  • “You should be empowering other people to do your job for you.”
    (Written down because it reflects pretty much my no. #1 philosophy on what my job is)
  • Look in to OpenTSDB.
    (A conversation with Anthony Baxter gave me this hint).
  • Freeing the cloud:
    • (WRT to web-services) The condition that triggers the GPL doesn’t trigger.
    • AGPL gets around this.
    • Talk was about creating and AGPL gravatar replacement.
    • libravatar.org
  • Useful sounding gedit plugins: “code comment”, “class browser”
  • “distribute” is the new “setuptools”
  • “buildout” is the one I’m interested in.
  • Lightning talks
  • Presentation software
  • modpython is dead.
  • Flask is a micro-framework
  • Automated testing:
    • It makes code-sharing easier
    • the more test cases the stronger your code
    • xunitpatterns.com
    • hudsun” for continuous integration
  • What makes a good unit test?
    • …easy to run
    • …easy to write
    • …easy to maintain
    • A good unit test needs to be obviously correct.
    • Every test ought to get a fresh copy of the database.
    • Note to self: I can use addCleanup() to clean up the database in FRED.

21 November

  • Anthony Baxter – Pythonic APIs
    • Mistakes in APIs:
      • Over Ambitious
      • Don’t make a framework — I only want one piece.
      • Don’t answer a problem with “I would use framework X”
        (I do this all the time)
      • Reinventing the wheel
      • Templating language (NO!)
      • ctypes is in the standard library!
    • So how to build an API?
      • have a use-case
      • have multiple use-cases
      • don’t overdesign
      • never use getaddr() and setaddr()
      • be very careful with duck-typing
      • Testable APIs
      • duck-typing + testable APIs = happy
      • Anthony likes mox
      • don’t bother with _ or __ methods (“we’re all consenting adults”)
    • How to make your API popular
      • Documentation!
      • How do I use your code?
      • readable examples
  • “from future import division”
  • Don’t block the GUI
  • testtools” — test runner and library
  • templating: “mako” “jinja2
  • Demystifying unicode:
    • Use unicode for all character data that isn’t byte data.
    • in python 2 use codecs.open()
    • You can use unidecode for transliteration.

There was more, but I think most of it was random notes and not things that I will need to refer back to any time soon.

Content delivery networks and DNS

“Lisa needs braces!”
“Dental plan!”
“Lisa needs braces!”
“Dental plan!”
“Lisa needs braces!”
“Dental plan!”

I just had one of those moments when all the clues have been laid out before you, but it still takes you forever to put 2 and 2 together and get anything other than 2 and 2.

For the last six months, I’ve been railing against my crappy home Internet connection. That’s no surprise for anyone who lives in this country, but I just couldn’t believe that in 2010, I still couldn’t watch even a single Youtube video without having to pause, and come back in 10 minutes to watch it after it had buffered.

It turns out I had been shooting myself in the foot, or rather, they had been shooting me in the foot.

A while back, Google announced their DNS service.  It’s fantastic, because finally you didn’t have to look up your ISPs DNS server addresses every time you are setting up a computer on the net, and can just use Google’s easy-to-remember addresses of “8.8.8.8″ and “8.8.4.4″.  I started using it right away, because I was also moving between ISPs (from Xnet to Orcon) and it meant that things would change over smoothly. The only cost I thought would be that DNS lookups would have a slightly higher latency than if you used your local ISP’s servers.

However, it turns out there’s a bigger catch: content delivery networks use DNS requests to work out where in the world you are, and redirect you to their closest server. If you use a non-local DNS server Youtube, Akamai, and a whole bunch of others will send you all the way around the world to a far far away server when you are downloading stuff, instead of to a much closer (and usually faster) server. This is not what DNS is designed for, and it’s an ugly hack, but apparently it’s been going on for a while now, I just never worked it out.

This is stupid and annoying, and I can say that because one of the guys who helped create DNS thinks the same. The moral of the story though is that you can be better off using your local ISPs DNS servers instead of ones such as OpenDNS or Google Public DNS. At least under these circumstances.

Welcome to my cloud

I have been playing with Modern Technology. As a freebie from attending the Kiwi PyCon in Waitangi in November, I was given a $50 credit for Amazon Web Services. The timing was perfect because I’ve been needing to play with it for ages anyway. About six months ago I had a crack at setting up a pilot Ubuntu Private Enterprise Cloud on some old hardware, with pretty much zero success. The learning curve is pretty high just on the side of using cloud virtualisation, much less having to administer it yourself without prior experience.

So using Amazon I can get a feel for running virtual machines using the EC2 interface before having to learn how to administer the host machines myself. Which is handy.

This also means I can finally decommission the poor little old Pentium 3 that has been sitting in my basement, humming forlornly to itself, for almost nine years.  It has served me very well, and I think it deserves the right to finally die in peace.

So, now what I have is eastman.net.nz, a virtual machine running on Amazon’s EC2 network using the cheapest available configuration.  And I’ve also enabled  Google Apps to handle the email side of things, so I no longer need to run my own mail server in my basement, limited by my crappy New Zealand DSL connection.

I’m also trying to put all the clever system-administration tricks I’ve learned over the last 10 years or so into practice here.  The idea will be to automate as much as I possibly can, so that the system will basically administer itself. I’m using a combination of Fabric and Puppet to automatically provision and configure the server.  Basically so that I never have to log in personally and issue a single management command. In practice, I’ll have to cheat, but not very often. I’ll write more about that setup in another post sometime. Honestly it’s pretty cool, if you’re in to that sort of thing.