Getting fruity in Swansea

Seen the new Tango ad, with the fruit rolling down the hill, through windows, knocking over the bike, etc.? The one that’s a spoof of the, oh, is it a Sony ad in San Francisco? (Sony: CGI sterility; Tango: real fruit messiness).

Well, the Tango one was filmed here in Swansea. I thought it was the legendarily steep Consistution Hill, but others seem to think it’s Cambridge Street. Anyway…

They did some pretty decent viral marketing via via the “Swansea North Residents Association” website – looks convincing at first, but the clues are there. My doubts disappeared when I read they were launching the Swansea Yodelling Club. :-)

If you haven’t seen it, it’s online in various places, including google or at that “residents’” site.

The music: José González‘ cover of The Knife’s “Heartbeats”. It’s lovely, but The Knife‘s version is even better – totally electro. Hear here.

jobtimer.py – timing small repetitive jobs

It’s exam marking season hereabouts (and, thanks to the AUT industrial action, coursework marking time), so I’ve got my head down in piles of exam scripts.

One exam (on IT security) was a complete nightmare to mark – essay questions, loads of text, oh it just took ages. It really seemed to go on forever. At least I only had to mark half of it – but I really wasn’t looking forward to my other exams, to be marked all on my own.

Python to the rescue!

No, not a random number generator (though it’s sometimes tempting). Instead, a motivational tool: something to keep me focussed and “in the game”.

I have two problems when marking, basically: one is that when I’ve got a huge pile to get through, and it’s going fairly slowly, oh it’s sooo painful and you want it to be over, but it isn’t, and it won’t do itself, and, well, it’s all very antimotivational. The other problem is that I get distracted easily, so I’ll do a few, then chat, then do a few, then play Urban Dead for a bit, then do a few more, etc. Naturally these two problems feed into each other, and a snail’s pace is achieved.

It’s all mental – the issue is focus. Thus, we present jobtimer.py, a little script I knocked up in a hurry yesterday evening to help me stay focussed. And I gotta say, it’s proven instrumental in helping me hammer through the networks exams in record time.

Basically, jobtimer.py is a simple tool for keeping track of progress through a large batch of small repetetive jobs, where you want to know how long you’re spending on each job on average, and how many you’ve done so far. It has a simple text-mode keyboard interface, whose central feature is “you hit space to tell it you’ve finished one job and are starting another”. You can pause it, report on averages, and see how much time since you started has been spent “unpaused and working” (as opposed to “paused and playing Shartak, say).

It’s very simple: no persistence between sessions, no flashy graphics, and probably only works on Unix – it uses select() on stdin to catch keypresses; a Windows version could be hacked using msvcrt, I guess. The code’s not beautiful, but it does the job beautifully well for me.

Read the comment at the start of the code to see excactly how to use it. It’s dead simple.

Screenshot:

Screenshot of jobtimer.py in action

The clock starts ticking at 15:06:07; the first job takes 27 seconds, then 2 mins 5, then 1:42, then 2:51. 10 seconds into the next job (at 15:06:23), the clock is paused. 15 seconds later, it’s unpaused, and three seconds later that job’s complete. At 15:06:44 we hit ‘a’ to get a reading of averages/stats: 5 done, average 1 min 27, elapsed wall clock time is 7 mins 36, 96% of which has been spent with the clock ticking. Etc., etc. – you get the picture. Actually, looking at this shows me a bug/feature: when you quit, it doesn’t count the job that was just running – so end a job before quitting if you care about accuracy. :-)

Two nice days among a recent spate of hecticity

Courtesy of the artistic exposure machine that is Will Harwood, here are photos of my birthday (warning: nipples) and of a trip to see MacBeth at Oystermouth Castle.

Mighty Optical Illusions

Mighty Optical Illusions weblog, including this rather nifty Spanish Castle illusion. Looks fairly easy to make these – I’ll have to create one of Bash. :-)

Ceiling cat

Ceiling cat – yeah! [tudor]

Self-help just another religion?

The Self-help business: billions of dollars, not much help? [43folders]

“…the talks and tapes offer a momentary boost of inspiration that fades after a few weeks, turning buyers into repeat customers. While Salerno was a self-help book editor for Rodale Press… extensive market surveys revealed that “the most likely customer for a book on any given topic was someone who had bought a similar book within the preceding eighteen months.” The irony of “the eighteen-month rule” for this genre, Salerno says, is this: “If what we sold worked, one would expect lives to improve. One would not expect people to need further help from us – at least not in that same problem area, and certainly not time and time again.”