Maya Deren

Today’s obsession will be over in less than 4 hours. “That’s I fad!” I hear you yell. Well, when I tell you that the entire career of experimental film maker Maya Deren is represented by 12 films made between 1943 and 1959 totalling just four hours of screen time you’d understand. I stumbled upon Meshes of the Afternoon (1943), quite by chance and I was blown away, not just by the film but by the on-screen presence of its star and director Maya Deren. A dancer, a poet, celebrated experimental filmmaker and feminist I had to wonder why I’d never heard of her before. Then again after soaking up The Witch’s Cradle (1943), At Land (1944), A Study in Choreography for Camera (1945) and Ritual in Transfigured Time (1946) I suspect we’ve all heard of her, at least through the influence she clearly had on filmmakers and artists such as David Lynch and Kate Bush. It’s sad to think she died in 1961 when she was only 44.

Maya Deren

Coding in your sleep.

Pithy words of wisdom, often appear mundane. So I’m going to be quick. The secret of successful coding is sleep.

I recently found myself in the hazardous situation of having too much work booked at the same time. My post-summer holiday bank balance allowed me to become seduced by the dark side. I counted that twilight world after 1:00AM as a friend. In reality the hours between 1:00 AM and 5:30 AM are cruel and the full of mischief. Time becomes distorted, decisions become unreliable. The walls between illusion and reality become a thin and fragile membrane through which errors of judgment can seep. When coding this can be dangerous. Sometimes it results in the odd harmless typo, here and there; easy enough to correct. Sometimes, it can lead to a full fledged haemorrhage.

It strikes me that our culture doesn’t much like sleep. I spent a few minutes trying to find pro-sleep quotations on Google and yet from the greatest minds and thinkers throughout history, it seems that sleep is rarely given the credit it deserves. Most references appear to offer the opinion that the fool / peasant sleeps while the genius works through the night. I remember hearing a labour politician talking admiringly about Tony Blair’s work ethic, indicating how impressed we should all be in the meagre two hours sleep Tony allowed himself when he was Prime Minister. Is this a good thing? Oh the irony, of John Prescott sleeping like a baby during a health debate at the Labour Party conference in 2005.

We all accept that healthy minds and bodies depend on a good night’s sleep and yet how often we feel compelled to push ourselves beyond comfort into late nights and fatigue.

Whether it be a result of capitalism or some kind of “propaganda without portfolio”, the reality is obvious. We cannot think clearly without sleep. Not only does our productivity and efficiency drop to very low levels as the night wears on but we are often robbed of the following day as well.

I almost lost a good client, not because I couldn’t do the work or deliver it on time, but because I was too knackered to programme properly.

So the next time you find yourself burning the midnight oil remember that a lot more than a deadline may be at stake. One all-nighter can ruin a week and if you are unlucky enough like me to have spent a week from hell vainly trying to repair the damage caused by decisions made during such a session, be warned, you may loose a lot more than sleep if you persist in burning the candle at both ends.

Flash on the iPhone

There may be times when it is essential that a Flash animation is available to users on Apple devices such as the iPhone and the iPad. Here is a technique that addresses this requirement using Google’s rather wonderful open source project Swiffy.

Firstly, your Flash movie should be no larger than 1MB and ideally exported for Flash Player 5 although Swiffy supports most of the AS2 specification. For those of you who don’t remember, you can do a great deal with Flash 5 and AS2. Probably a great deal more than Safari on the iPhone will allow us to do.

Under the hood, Swiffy processes the SWF file and generates a JSON file. A client-side JavaScript runtime loads that JSON file and renders it using HTML, SVG and CSS which is supported by Webkit-based browsers such as Safari running on Apple devices.

When you process your swf, Swiffy outputs an html page that you can place on your page using an iFrame. I know, I know an iFrame! However we’re only using our iFrame to serve alternative content to less than 5% of our visitors. There’s nothing for Google to index so it makes very little difference to the end user. I’ve added an alternative version to the header of this page, making the animation, podman cursor follower and all, viewable to iPhone users, for what it’s worth. It’s pretty clunky, probably only making 8 frames a second on my iPhone, but it’s a pretty complex multilayered animation, with lots of bitmaps and transparency. While the animation in the header of this page may not have been designed for WebKit, it could probably be optimised quite easily. A little trial and error goes a long way. Maybe I’ll follow this article up with a sequel.