Category Archives: Tech

Europython – Day 2 – Tutorials

Today’s notable achievements were that I managed to stay on power and network for most of the day. Mostly due to the fact that I lucked out to get a seat next to a power bar in the lecture theatre holding Luke Leighton’s Pyjamas tutorial. I was interested in Pyjamas for a web project I may have to get up and running quite quickly over the summer. Although there were some rocky patches due to SVN mismatches I mostly managed to get a handle on how Pyjamas works. As a note to future tutors: if you need your tutees to download the trunk from SVN it’s probably best to specify the revision that works. This avoids everyone turning up with a version of your code that won’t run the examples. Also, I still don’t understand decorators.

Today’s buffet lunch was nice. Props to the conference organisers.

The day was nicely rounded off by dinner at a fine indian restaurant and a pint of very nice beer in the Wellington. Looking forward to the start of the conference proper.

Europython – Day 1 – Tutorials

I have to admit to a certain amount of trepidation when I signed up for EuroPython 2009. As primarily a sysadmin rather than a developer I was worried that I might not have the requisite knowledge to get the benefit of a week-long developer conference. After today’s experience I’m beginning to relax about that.

Today and tomorrow are the tutorial sessions before the conference proper starts. Having never been to a Python conference before I wasn’t sure what form the tutorials would take. From the outcome of the day I would have to say “much less programming than you might expect”.

The day started off with Michael Spark’s giving an introduction to Kamaelia the simple concurrency system designed by BBC Research. We started off by building a brain-dead simple version of Kamaelia to outline the principles by which it operates. This took us on to writing a bulletin-board system by chaining together simple Kamaelia components. This was, needless to say, pretty intense for a Sunday morning.

Having expected to be doing a lot of coding I dutifully spent Friday evening makeing sure that I had the suggested software installed and working on my netbook. As it turned out I only wrote about 20 lines of code during the whole tutorial. I was ever so slighlty miffed by this. This is the first time this tutorial has been given and in my opinion would benefit from being all-day with time for coding exercises between explanations.

Despite these minor problems I felt that the tutorial left me with enough of a grasp of Kamaelia’s basics that I could go away and write something simple in it without too much trouble. One other good point of the this session was the handout printed from lulu.com which was really nice. So nice in fact that I think we should spring for these next time we run a training course at work.

After lunch I was in Jonathan Fine’s JavaScript for Python Programmers tutorial. Which was in a room that was too small for the audience and much, much too hot. It also appeared to have a grand total of two power outlets. Fine started off with a horrifying list of the ways basic constructs in JS behave in ways that Pythonistas will find completely illogical. After the break he delved into the nitty-gritty of OO and Inheritance. As the tutorial progressed and Fine got further from his slides the session transformed into something more like a seminar rather that a tutorial. Overall I found this session enjoyable and informative, although my brain was beginning to melt by the end of the day.

I suspect that Wifi and power are what most people will grumble about, but knowing how hard it is to sort these out for events at my home institution I won’t carp too much.

Now for some time with the Django tutorial in preparations for tomorrow’s Pyjamas session.

FFMPEG Tips for Screencasting

Having just got a particularly complicated parallel debugger correctly installed yesterday it came time to write the documentation for the tedious point and click setup procedure. Rather than write 10 pages of screenshot-heavy web pages ( a horrifying process in itself due to the CMS that time forgot) I decided to try making a screencast.

So I installed Istanbul which did a good job of capturing the screen and voice-over. However I then wanted to trim the clip down and add a title to it. Of the two or three editors I tried Kino was the most intuitive. However it only accepts DV so I had to convert the Ogg Theora files that Istanbul produces into DV. Fortunately FFMPG is your friend here.

ffmpg -i screencast.ogg -target pal-dv screencast.dv

Kino imported that DV file just fine and I was able to trim the file. But now I wanted to add a title screen. After a bit of googling I found a video from Linux Journal explaining some video tricks in FFMPG. Using this I worked out how to take a single JPEG I had created in GIMP and loop it into a short section of video to use as a title.

ffmpg -loop_source -i title.jpeg -s 5 -target pal-dv title.dv

The resulting 5 second DV file can be imported into your Kino project. There are probably lots of better ways to do this but this was the easiest method I could discover in an afternoon’s playing around.

Resolutions

Or should that be vague plans?

  • Attend FOSDEM. I’ve been incredibly lazy the last few years and haven’t attended.
  • Try to prevent the PET Centre from eating my life. This is probably more of a vain hope than a resolution.
  • Buy a flat or learn to drive. Because unless I make it an either/or I will do neither.
  • Attend the spring UKUUG meeting. Understanding kerberos is probably a worthwhile endeavour even if I never use it.
  • Skate more. Assuming we actually get a summer this year it shouldn’t be to hard to top the dismal amount of skating I did last year.
  • Attend at least one observing night of the Cardiff Astronomical Society to remember what the night sky is supposed to look like.
  • Migrate Peapod to a sensible modern XML library to fix some of its more annoying bugs
  • Make an effort to visit friends. Which is just code for be less of a social hermit.

A Lack of Organisation on Your Part Does Not Constitute an Emergency on Mine

When we discuss a piece of monitoring software that you would like writing and I tell you that we can collect any data that you want, but you have to tell me what you want reports on up-front so that the data can be collected. If you then send me those requirements 24 hours before you need the report generating my response will not be “right away Sir. I’ll magically collect all those data you didn’t tell me you needed.”, My response will be pithy and anglo-saxon.

Love and Hugs,
Huw

Learning Programming Languages

I’m a sucker for a good meme. So here is a list of programming languages in the order that I learned them.

  1. Basic
  2. Python
  3. Shell
  4. Perl
  5. C
  6. Tcl
  7. Java

Of those I’ve written production code in all of them apart from Basic (which I learned at school).

I learnt Python after I got into Linux (during my ill-fated stint as a PhD student). Shell, Perl, C and Tcl were languages I had to come to grips with while I worked at MPC. Shell, Perl and C won’t surprise anyone since I’m a sysadmin. Tcl might seem odd until you realise that quite a lot of the Pixar tools communicate by throwing Tcl files around. Funnily enough we’ve just implemented Modules at work so I’m writing Tcl again.

Learning Java was driven by necessity to write some simple extensions to Globus during my brief sojourn in the Grid community.

Of all these languages the only ones I will use by choice are Python and Shell (in my case usually Bash). Shell for quick scripts that are primarily manipulating other programs and Python for anything more complicated.