My bathtub tomcat tadger terror

When I was a young roister-doister, I lived in a flat with my massive tomcat, Bagpuss. Bagpuss was a bit weird, as he was obsessed with water. Perhaps in a previous feline incarnation he’d been a Van cat. It’s all the more surprising considering that once, when he was a kitten, he’d jumped up onto the toilet seat to peer into the water and fallen in, head first. Luckily I was in the bathroom shaving and was able to pull him out before he drowned.

A common way for me to entertain him would be to turn on the tap just slightly so water would drip out once a second, and he’d sit next to the sink and attempt to bat the falling drips with his paws. This could keep him transfixed for an hour.

Here he is, with one of his lady admirers:

bagpuss

Once, however, his behaviour metamorophosed from the quirky to the terrifying.

Picture the scene: I was lying in the bath, naked (as one does) when the door opened slightly and in came Bagpuss. He leaped up on to the edge of the bath to get a better view of the water, lost his footing and fell in. If you’ve ever seen a three feet long tomcat, flailing around in a panic with his claws extended fully, you’ll know to get out of the way. Now, imagine one on top of you, while you’re completely nude. It’s utterly terrifying. With one hand cupping the Bruce Juice Introducer™, I picked him up by the scruff of his neck and evicted him from the tub, and then had to spend 15 minutes soothing him before he’d let me turn the hairdryer on him.

I was a nervous wreck for days.

Reading List

If you’re a JavaScript developer who wants to develop devtools, why not move to Oslo and become an Opera Dragonfly snugglebunny?

HTML5, Responsive, NEWT

DRM corner

Social Meeja corner

Musical chairs corner

Misc

UK folks: we have until Monday to lobby government to exclude websites from Leveson press regulation.

Reading List

A list of the most interesting things I’ve read this week, as not everyone sees me post them on twitter all day. It should go without saying (but I’m saying it anyway) that I don’t endorse or agree with everything here. Stuff in quote marks, by definition, is quotation and therefore not me.

Me, me, me

NEWT, HTML5 etc

Industry

Misc, innit though?

Save bandwidth with webP – soon with fallback!

A long time ago, “responsive” didn’t mean “resize your browser window repeatedly while fellow designers orgasm until they resemble a moleskine atop a puddle”. It simply meant “Reacting quickly and positively”, meaning that the page loaded fast and you could interact with it immediately.

One way to do this is to reduce the weight of the page by serving images that have a smaller file-size, thereby consuming less bandwidth and taking less time to download a page. In the last year, web pages download approximately the same number of images, but their total size has increased from about 600K to 812K, making images about 60% of the total page size.

One way to reduce this amount is to encode images in a new(ish) format called webP. It’s developed by Google and is basically a still version of their webM video codec. Google says

WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index. WebP supports lossless transparency (also known as alpha channel) with just 22% additional bytes. Transparency is also supported with lossy compression and typically provides 3x smaller file sizes compared to PNG when lossy compression is acceptable for the red/green/blue color channels.

Opera uses it precisely for this compression; it’s used in Opera Turbo, which can be enabled in Opera desktop, Opera Mobile and the Chromium-based Yandex browser. This transcodes images on-the-fly to webP before squirting them down the wire and, on slower connections, it’s still faster.

In tests, Yoav Weiss reported that “Using WebP would increase the savings to 61% of image data”.

WebP is currently supported only in Opera (Presto), Google Chrome, Yandex and Android Browser on Ice Cream Sandwich, which makes it difficult to deploy on the Web. Firefox doesn’t like it and IE hasn’t said anything (I wonder if the new confidence about technologies in the VP8 video codec on which it’s based might make them feel better about it?)

However, there’s some handy new CSS coming to the rescue soon (when browser vendors implement it). We’ve long been able to specify CSS background images using background-image: url(foo.png);, but now say hello to CSS Image Values and Replaced Content Module Level 4′s Image Fallbacks, which uses this syntax:

background-image: image("wavy.webp", "wavy.png", "wavy.gif");

(Note image rather than url before the list of images.)

The spec says “Multiple ‘image -srcs’ can be given separated by commas, in which case the function represents the first image that’s not an invalid image.”

Simply: go through the list of images and grab the first you can use. If it 404s, continue going through the list until you find one you can use. Note that this isn’t supported anywhere yet, but I hope to see it soon.

[Added after a reminder from Yoav Weiss:] It needs finessing too; Jake Archibald points out “If the browser doesn’t support webp it will still download ‘whatever.webp’ and attempt a decode before it’ll fallback to the png” and suggests adding a format() qualifier, from @font-face:

background-image: image("whatever.webp" format('webp'), "whatever.jpg");

But what about old [current] browsers?, I hear you ask. Give them the current url syntax as fallback:

background-image: url("wavy.gif");
background-image: image("wavy.webp", "wavy.png", "wavy.gif");

Now all browsers get a background image, and those that are clever enough to understand webP get smaller images. Of course, you have to make a webP version (there are webP conversion tools, including a Photoshop plugin).

It seems to me that the spec is overly restrictive, as it seems to require the browser to use the first image that it can. webP is heavily compressed so requires more CPU to decode than traditional image formats. Therefore, I could imagine a browser that knows it’s on WiFi and using battery (not plugged in) to choose not to use webP and choose a PNG/ JPG etc to save CPU cycles, even though the file-size is likely to be larger.

What about content images?

Of course, not all images on your webpages are CSS background images. Many are content images in <img> elements, which doesn’t allow fallbacks.

There is, however, an HTML5 element that deliberately allows different source files to get over the fact that browsers understand different media formats:

<video>
<source src=foo.webm type=video/webm>
<source src=foo.mp4 type=video/mp4>
... fallback content ...
</video>

Wouldn’t it be great if we could use this model for a New! Improved! <img> element? We couldn’t call it <image> as that would be too confusing and the HTML5 parser algorithm aliases <image> to <img> (thanks Alcohi). So for the sake of thought experimentation, let’s call it <picture> (or, if we’re bikeshedding, <pic> or —my favourite— <bruce>). Then we could have

<picture>
<source src=foo.webp type=image/webp>
<source src=foo.png type=image/png>
<img src=foo.png alt="insert alt text here"> <!-- fallback content -->
</picture>

And everyone gets their images, and some get them much faster.

Why Norman Tebbit is cool

I was reading a Reddit post on which celebs are “assholes” and which aren’t, and can exclusively reveal that Chris Tarrant is a tosspot, whereas Irish post-punk bands The Undertones and Stiff Little Fingers are jolly nice people — Jake Burns wished me happy birthday, and Undertones’ bassist Micky Bradley gave me a can of Stella when I was 14.

Perhaps more surprisingly, Thatcher-era government minister Norman Tebbit is a good guy too, although he’s largely remembered as a leather-clad psychotic enforcer in the satirical show Spitting Image.

However, Tebbit also has a sense of humour. At University, my housemates and I would write letters to TV personalities requesting autographed photos to decorate our rented house on De Grey Street, Hull, AKA “Raunchy Studsville”. (Note, this is before the Web existed to divert students from essays etc).

We wrote to Tebbit at the House of Commons:

Dear Norm, we’ve watched your rise through the Tory party with admiration. Market Forces dictate that you send us a signed photograph. Get Down! The Raunchy Studs.

A week later, an House of Commons envelope addressed to “Raunchy Studsville, 1 De Grey St, Hull” landed on our doormat, containing a hand-written note on headed note paper:

Dear Studs, who am I to argue with Market Forces? Here’s your photo. Get Down!

and the photo was signed “Norm”.

Reading List

NEWT, innit?

Industry

Misc

On Prince Phillip’s “Filipino nurse” comment

Prince Phillip told a Filipino nurse “The Philippines must be half empty – you’re all here running the NHS”.

The man has a history of ethnic jokes in questionable taste. But this one has a nugget of truth in it. For years, UK governments have let other, poorer nations pay to train their own nationals to be doctors, nurses or midwives, and then, when they’re ready to help their own populations we recruit them to work in the NHS here.

And what about the health care needs of the people of the Phillipines, India, Bangladesh and other major sources of health-care professionals? Not our problem.

What is our problem is that the same governments posture and prattle about curbing immigration, giving British jobs to British people, and generally promote anti-immigration feeling which they know can become racial tension.

The NHS is a vote-winner. So is sounding off about immigrants. See how it works?

The Balloon Man of Kovallam on copyright

Ten years ago (wow) I published some pictures of the Balloon Man of Kovalam that caused an amazing comment thread in which families and old friends were reunited and I learned a little of the life and death of Buck Wray, the Balloon Man.

I was digging though a couple of his books – he gave me a copy of Book #3. Here are the dedication and copyright pages.

31 December 1994
Bruce
Copy #84
Ask .. Receive!
You did … so … you will!
Too easy, huh?
Go Bruce Go!
Best – loving + Lightning
B
by buck

You may: Xerox, photocopy, print, Re-publish, distribute “FREELY”

Copywrite

Notice: This book has absolutely positively NO copywrites. All materials, ideas, concepts expressions, words are stolen, from the source of ALL THAT IS. If any one claims to be the creator of originals of any of tese items listed above (with the exception of the THE WORD “lunagloriusmaxipiss”, which actually is a totally 100% New Word – However – inspired by another Source, the only Source, and I claim no exclusivity of this newly created word, since my “i” merely channeled this new big powerful word into the 3rd Dimension of Earth School for use Today), they are total fucking jerks and self-deluded liars. They did not. Could not. Can not, Did not. Copywrite laws are Bullshit, if what is created or written or created actually express Truth. If, it is Truth, it should be SHARED – FREELY. You many SHARE the contents of this book and all other books Freely with ALL THAT IS.

Enjoy, learn, have fun, SHARE Shit.

buck
change agent
by buck

“Enjoy, learn, have fun, SHARE Shit.” Words to live by.

Reading List

NEWT

Opera/ WebKit switch

Opera (my employer) announced Opera will switch to WebKit. Here are some reaction posts – I’ve noted authors’ affiliations, as many work for browsers so are not wholly disinterested parties.

Industry

Misc

Opera and WebKit: a personal perspective

I expect by now you’ve heard that Opera (my employer for the last four and half years) has announced that its browsers will, in future, use the WebKit rendering engine. I wrote the announcement, and what follows here is my personal take on it. It’s on my personal blog precisely because it does not reflect the opinion of my employer, wife, kids or hamster.

Opera’s Presto engine was a means to an end; a means for a small, European browser company to challenge the dominance of companies who, at that time, hoped to “win” the web through embracing, extending and extinguishing web standards.

Presto showed that it was possible to make a better browser while supporting standards. Other vendors have followed this path; the world has changed.

These days, web standards aren’t a differentiator between browsers. Excellent standards support is a given in modern browsers. Attempting to compete on standards support is like opening a restaurant and putting a sign in the window saying “All our chefs wash their hands before handling food”.

Rendering engines are now highly interoperable – largely due to the progress commonly known as “HTML5″, begun by Opera in 2004, then joined by Mozilla, in order to protect the web from proprietary platforms, keep it open and promote interoperability.

It seems to me that WebKit simply isn’t the same as the competitors against which we fought, and its level of standards support and pace of development match those that Opera aspires to.

It isn’t run by a single organisation; a report on WebKit this month says “it is also noteworthy how the diversity of the project is increasing, with new players starting to show a significant activity.”

It therefore seems silly to compete against it. Instead, we’ll join and use our experience and resources to improve it further.

Although a small organisation, we’ve always played an active role in developing standards – CSS, Media Queries, HTML5, native video being high-profile examples. This is important to me; I’ve worked in my own small way for 10 years now to help protect and advance the web and want to work for an organisation that does too. So when it was announced internally that we would switch to WebKit, I worried that standards work might stop.

I asked the CEO and Engineering lead at an all-hands meeting if we will continue that work. They replied that we absolutely will continue to work on standards, and we’ll submit changes to advance WebKit. Our CTO, Hakon Wium Lie confirmed it by demonstrating internal WebKit builds that have some interesting new standards support. Today we contributed a small, symbolic patch that can bring all WebKit browsers’ CSS multi-column support to Presto’s level.

One rendering engine will go. Some lament that. Some of those who lament it seemed never to test in it, excluded it from their demos, or actively blocked it.

I’m both English and a man. That means I have no emotional life at all (so consider this carte blanche to be incredibly rude to me in the comments) but even with those two significant handicaps, I’ve found myself with a pang of regret that the Presto rendering engine will disappear. I’ve experienced that feeling before – eighteen months ago when having a final walk around the house that had been my family’s home for a decade, before getting into the car and following the removal van to the new home that we’d dreamed about.

Of course, a browser is much more than a rendering engine. Very few consumers of the web choose a browser because of its rendering engine – they just expect it to work. And if it doesn’t work as well as native apps, they’ll choose native apps.

Opera has 300 million active users —almost a third of a *billion* people— many of whom would otherwise have no access to the web. For many users around the world, a browser is more than a tool to browse the web. Sometimes it’s a school when you can afford none, sometimes it’s the only line to an outside world shut off by an oppressive regime.

The web needs to win. Browsers are highly interoperable, because all vendors know that if they’re not, they risk being overtaken by proprietary platforms. It used to be Flash and Silverlight that threatened the web. Today’s threats are proprietary app platforms and locked-in “eco-systems”. Tomorrow, new threats will rise.

Developers who care about the web will code to the standards, test across browsers and block none. We all want the same: we want the web platform to grow, to remain open, to become ubiquitous by being the no-brainer development platform of choice for all.