magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

Archive for ‘February, 2010’

At a recent ThoughtWorks techy meetup, we recorded a couple of videos for internal use. One of them involved someone speaking to slides. The problem was that we had no projector, and our flip camera wasn’t really up to doing a great job of filming the screen. So the problem I was faced with was the best way to synchronize the audio track from the video to the slides.

What follows is a far from efficient workflow that allowed me to sync the audio track with the slides. The only constraint was my skills, and the fact that I only had freeware software and whatever came with the mac (iLife 08).

0. Convert Flip AVI -> mp4

I’m not sure if I needed to do this, but I figured the OSX tools would play nicer with m4v than with the avi’s from the Flip. I didn’t have the Flip software installed. I used Handbrake to convert the video.

1. Import into GarageBand to rip out the audio track

I probably could of done this via Handbrake, but it was fairly easy to do in GarageBand. I imported the video, selected the video track, and removed it.

2. Convert the Keynote slides to Images

Given that I was in GarageBand, I figured I’d create a podcast, using the Keynote slides as artwork for the podcast. Exporting the slides as JPEG is a simple job – I chose to have Keynote create one image for each stage in a transition. I then imported the JPEGs into Aperture so I could access them via GarageBand’s media browser.

3. Add the artwork to the podcast

You’ll need to make sure the Podcast track and the media browser is visible. Then, it’s a simple matter of dragging in the relevant slide in sync with the audio track. The UI is pretty intuitive.

4. Export the podcast

Now it gets trickier. At this point, GarageBand thinks we have an audio, rather than video, podcast. I tried exporting into iTunes, but just got an audio track – I’m sure the artwork would show up on my iPhone, but I want a movie for uploading to our internal video hosting service (we have Google apps, so get Google Video).

What I ended up doing was exporting to iWeb, exporting out the resulting Podcast site, then grabbing the resulting quicktime movie. This quicktime movie was almost what I wanted – a video, with the audio track from the flip, with synchronized slides. But I wanted to do a couple more things – namely I wanted to split the presentation into two parts (5-10min videos are easier for people to digest than a single 20min presentation), and add some additional titles.

5. Split and add titles

Luckily, iMovie can handle this. I’m fairly sure it was able to directly import the quicktime movie. Adding the titles is a little fiddly, far worse is the simple task of splitting the movie itself. I hope to try iMove 09 soon to see if this is improved.

It was at this point I realised I had an issue – namely that the artwork you embed in podcasts via GarageBand is limited to a square, 300×300 pixel dimensions. This led to some clipping of the slides. If I have to use this workflow again, I’ll make sure to export square slides from keynote in the first place.

6. Export and upload

Which is finally where things got easy.

Notes

  • The GarageBand project was massive. The two resulting videos from iMovie were less than 15MB – the GarageBand project which just contained the slides and the audio track was over 450MB.
  • I’d love to find a better option for syncing the artwork – being limited to 300×300 pixels is a pain, especially when I’m uploading to a video hosting service capable of much higher quality widescreen playback.
  • I like the power of iMovie, but I dislike the UI intensely. I’d love to be able to increase/decrease clip selection using the keyboard for more control.
  • For some reason Google Video too ages to process the two small videos – significantly larger videos uploaded afterwards were available within a few minutes. It is possible that the small, squashed size of the movie gave the transcoding a problem, or it may just of been a transient glitch, but I ended up having to wait overnight for them to finally be available.
  • I’d love to know of a better workflow using free/cheap software, so please get in touch if you have any ideas!
Advertisements

I’ve been invited to speak on colleague Chris Read’s track at QCon London this March. The track itself is chock full of a number of experienced proffesionals (including two ex-colleagues) so I fully intend to raise my game accordingly. We’re lucky enough to have Michael T. Nygard speaking too, author of perhaps the best book written for software developers in years in the form of Release It!

The track – “Dev and Ops – a Single Team” – attempts to address many of the issues software professionals have in getting their software live. It will cover many aspects, both on the hardcore technical and on the softer people side. Hopefully it will provide lots of useful information you can take back to your own teams.

My talk – From Dev To Production– will be giving an overview of build pipelines, and how they can be used to get the whole delivery team focused on the end objective – shipping quality software as quickly as possible. It draws on some of my recent writing on build patterns, and a wealth of knowledge built up inside ThoughtWorks over the past few years.

My experience of QCon SF last year was excellent – I can thoroughly recommend it to any IT professional involved in shipping software. If you haven’t got your ticket already, go get them now before the prices go up!

I’ve recently been working on a Clojure application that I hope to open source soon. It’s been my first experience of using Clojure, and is almost certainly one of the most thought provking things I’ve done in a long while. One of the things that is still causing me issues is how to go about TDDing Clojure applications – or rather functional programs in general.

My natural inclination – for many reasons – is to use TDD as my process of choice for developing my code. Beyond its use as a design tool, it’s having a saftey net to catch me if I screw something up. It allows me to be a little more brave, and drastically reduces the cycle between changing some code and being happy that it works. I’m used to that saftey net – I feel lost without it.

Stuart Halloway said during his Clojure talk at Qcon SF that despite being a TDD fan he finds it hard to TDD in a new language, and I get exactly what he means. A big part of it is that you’re getting to grips with the idioms, capabilities, libraries and tools associated with your new language – and a lack of this knowledge is going to impact on your ability to write good tests, let alone worry about implementing them.

Typically, when learning a new language I try and write a small application that has a real world need. BigVisibleWall was my attempt to learn Scala – but it had a real goal. With BigVisibleWall, as with my current Clojure project, I started by implementing the system by just writing the production code. I’m pushing the limits of my knowledge constantly, attempting to understand the size and shape of the solution space that I find myself in with this new tool. Once I got BigVisibleWall working with a small set of features, I broke it down and rewrote it TDD style – at that point, I had enough Scala (and I mean *just* enough) to be able to do this without it feeling like I was wading through treacle.

I consciously decided to follow the same pattern with my Clojure project. Code the main logic, get it running, then break it down and rewrite it piece by piece using TDD. But then I hit a problem – Scala and Java are similar enough languages that my programming style didn’t have to change much from one to the other. Therefore the way I structured the code and thought about TDD didn’t have to shift much. In both cases I was driving the design of an Object Oriented system. With Clojure though it wasn’t just the language which was different, it was so many of the underlying concepts were different. Put simply, I really don’t know where to begin.

My first instinct is to start decomposing functions, passing in stubs to the functions under test. But this just feels like I’m trying to shoehorn IOC-type patterns into a functional program. But what am I left with – testing large combinations of functions? That feels wrong too.

So what about you lot out there in blogland? Any other OO types trying to make the switch and encountering the same issues? Or any FP practitioners for whom TDD is second nature? Or does TDD just not fit with FP after all?

I’ve been working on a couple of spare time projects, both of which I hope to release more formally in the next few weeks. One of them involves development of a simple web application for deployment on Google App Engine. As part of the development, I had to modify an existing open source Clojure API – my changes are now available for all.

appengine-clj was written by ThoughtWorks colleague John Hume. It provides some Clojure-esque wrappers over Google App Engine’s user authentication and low level datastore API. John outlines his use of the library in a highly useful post on using Compojure & Clojure on the App Engine – it was this post which helped immensely in getting started myself.

There were a couple of minor issues with the latest version of John’s API which stopped me from being able to use it for my latest project – so I created a fork to make the changes I wanted. First, a general issue. I love projects which make checkout and build easy and bullet-proof. For me, that means check in the build tool & all dependencies. I know this is a contentious point – I may well write a post on it later. The other issue is that since the 1.2 version of the SDK some of the APIs have changed a little, so I updated the datastore testing macro accordingly.

My Clojure skills are highly limited, and the modest modifications are probably botched, but nonetheless it seems to work. My fork can be found on GitHub.

A few years ago, I was sharing a drink with a friend of mine. He was about to become a fully qualified architect. In the UK, one cannot call themselves an architect without having carried out the full, three part course, which takes at least seven years. Typically, as the course involves working in the industry, architects often took more than seven years to complete their ‘part three’ – my friend completing it in the minimum possible time made him one of the youngest qualified architects in the country. As he was about to be fully qualified, he was explaining the need to get indemnity insurance, as his opinion as a qualified architect made him liable for the quality of advice given, even advice given informally down at the pub.

There has been a short history of various individuals, companies and professional bodies within IT attempting to define and issue certification. By and large, they have not caught on. There is no belief that software delivered by ‘certified’ individuals is any better than that developed by uncertified individuals. Nor is there any evidence that in terms of getting jobs that certification counts for anything other than in specific, narrow (mostly vendor specific) technical domains – something that few serious software professional would consider worthwhile.

So, in general, why does certification exist? Societal pressure determines where certification is essential. It is important that key individuals in positions of power are properly vetted – and recognised – for the role they play in society. Which is why there are laws governing who can call themselves a lawyer, architect, engineer, surveyor. Which is why certified profesionals have responsibility placed upon them regarding the veracity of information and quality services they provide as a member of that profession.

In terms of architecture – in similar terms to medical doctors for example – society has deemed the roles they play as being important enough that certification carries with it legally enforceable expectations regarding their competency. With this responsibility, comes recognition – and a clear understanding as to how the profession is valued by society as a whole.

Certification in the land of IT is not being driven by a need for society to ensure that we are doing our jobs properly – to ensure that only competent individuals call themselves ‘programmers’, ‘sysadmins’ or whatever. Nor is it being driven by a societal desire to recognise our contribution to society as as a whole. It is being driven by IT itself – at best as a misguided attempt to recognise an ability in a certain set of skill, at worst as a way of generating money. As such, certification in the world of IT is a toothless concept, lacking in any sense of legitimacy, and distracts us from the more worthy goal of understanding how we contribute to the world around us, and how we grow competency to the point where we can even consider ourselves a profession at all.