Archive for July, 2011

microdata help, please

I’m trying to wrap my little bonce around HTML5 microdata, not least because Opera 12 pre-alpha has support for it.

I’m quite discouraged because the two articles I’ve read tell me that it’s easy, but I’m still stuck (although they are by noted brain-boxes Oli Studholme and Tab Atkins).

I’m befuddled over itemid:

Sometimes, an item gives information about a topic that has a global identifier. For example, books can be identified by their ISBN number.

Vocabularies (as identified by the itemtype attribute) can be designed such that items get associated with their global identifier in an unambiguous way by expressing the global identifiers as URLs given in an itemid attribute.

The exact meaning of the URLs given in itemid attributes depends on the vocabulary used.

What actually does this mean? How do I know if a particular vocabulary supports global identifiers for items?

In the spec, some Microdata vocabularies are listed. vCard is one, and the spec says “This vocabulary supports global identifiers for items.” The URL defining the itemtype for vCard doesn’t seem to tell me, and the examples in the spec make no use of itemid.

And, because I understand real examples rather than the theoretical, what’s the practical benefit of itemid?

Specifically, what would I gain by using

<div itemscope itemtype="" itemid="urn:isbn:0867193719">
Rebekah Brooks' Self-portraits (ISBN 0867193719)

[example simplified from an example in the spec which says “The “” vocabulary in this example would define that the itemid attribute takes a urn: URL pointing to the ISBN of the book.”]

over’s Book schema (which doesn’t seem to use itemid – in fact, seems to make no mention of it):

<div itemscope itemtype="">
Rebekah Brooks' Self-portraits (ISBN <span itemprop="isbn">0867193719</span>)

Double points if you can answer the question without baffling me with mentions of SPARQLy OWLs and Don’tologies.

HTML5: notes for analysts and journalists

There have been a few stories lately for investors rather than techies that have a few inaccuracies, probably because they’re written by finance/ business journalists rather than tech journalists. (Nothing wrong in that; I know my HTML5 from my CSS but couldn’t tell a gilt-edged bond from a derivative.)

Here a few notes for analysts and journalists that might chance upon this blog.

There’s a piece entitled 2.1bn HTML5 browsers on mobile devices by 2016 – ABI Research quoting some laudably specific figures:

By 2016, more than 2.1 billion mobile devices will have HTML5 browsers, up from just 109 million in 2010.

Before the expansion from “just” 109 million to “more than” 2.1 billion makes you rush out and leverage your portfolio, we need to know what our anonymous author means by the term “HTML5 browser”.

If you define an “HTML5 browser” as one that supports all features of HTML5 then there are precisely zero in existence. (You’d need to define “HTML5”, of course, but that’s another story.)

If you define an “HTML5 browser” as one that can consume some HTML5 features, then all browsers are “HTML5 compliant”.

Please, dear analyst/ journalist friend, define what you’re talking about before giving precise figures and talking about accelerating adoption. (I’m always up for being contacted – email bruce at this domain – if you need to check something out, by the way.)

Our anonymous author quotes a Mark Beccue saying “I believe that Apple will be the key driver of HTML5”. Mr Beccue is, of course, at liberty to believe what he wants. Until my nephew was three, he believed that there was a creature that lived in the toilet called The Poozilla (I’d like to apologise to him publicly here). Believing it doesn’t make it true.

There are many claims to be the “driver” of HTML5. Opera began it, of course; Ian Hickson edits the spec and works for Google so you could argue that Google is a driver. As you like, and whatever gets you a better headline.

The truth is that browser manufacturers are driving it collaboratively because if browsers don’t render HTML interoperably, developers will use some proprietary technology instead. (This doesn’t have to be a prosaic truth: the fact that all browsers are working together on HTM5, if not on other technology, is quite a story.)

Consumers benefit from interoperable webpages: most people use multiple devices and browsers; it’s stupid if you can use your bank website on your work machine, but not your Linux netbook or phone. There are significant advantages to HTML5 over HTML 4 for developers.

Mr Beccue (or the anonymous author channelling Mr Beccue, as we are denied any link to Mr Beccue’s full analysis) believes that Flash will imminently disappear:

One important HTML5 feature, video, is making a play to challenge the popular Adobe Flash Player plugin software…“I think the disappearance of Flash is closer than people think”

There are numerous reasons why Flash may be a more appropriate way to deliver your video content. Perhaps you need DRM, or adaptive bitrate streaming, for example.

Also, dear journalist/ analyst, it’s fair to point out that there are numerous problems with multimedia on Apple’s iOS:

Mr Beccue (or the person quoting Mr Beccue) has presumably failed to realise that Flash does more than merely play video. This is an important point if you’re proclaiming its imminent demise.

If you want access to the paid-for report by Mr Beccue,
GigaOM has a similar article (which helpfully tells us “the HTML5 is very important”) that links to HTML5 for Mobile Devices and Tablets by ABI Consulting.

In the table of contents, we see conclusion #1: “Mobile Is the Primary Focus of HTML5”. A brief look at the HTML5 Design Principles shows that this is simply wrong:

Features should be designed for universal access…Features should, when possible, work across different platforms, devices, and media.

I enjoyed the Forbes journalist’s balanced appraisal of Flash and HTML5 in the piece Why Opposing HTML5 And Flash Is Nonsense, and agreed with his conclusions.

However, he gives a list of “facts” asserting “These are not interpretations or opinions. These are facts.”

As it’s just possible that another journalist or analyst might be impressed by Forbes’ vehemence and quote these “facts” without question, let’s give them some critical examination.

You do not build a web site in Flash. The only way to build a website is to use HTML pages, and then to embed Flash elements in them.

This supports the author’s thesis that talk of all-Flash websites is an impossibility. Well, yes, technically. But Flash can be embedded using two lines of HTML, neither of which has any visual manifestation (see Blankety-Blank example) so this doesn’t mean much.

Less than half of installed browsers are HTML5 compliant, with different levels of compliance.

As our wikipedia chums would say “Citation needed”. And, please dear Analyst, see above for the absolute necessity to define “HTML5 browser” or “HTML5-compliant”.

The video element in HTML5 is perfect for basic video players, but Flash and Silverlight are much more suitable for advanced video feature (streaming, caption, interactive features and miscellaneous video effects)

Really? I very much like the text-based synchronised subtitles available on things like Playr or mediaelement.js, which are HTML5.

Streaming is also completely possible with HTML5 video. “Miscelleaneous video effects” needs definition before you can claim that HTML5 can’t do them. (It’s been possible to do things like edge-detection, blend, greyscaling for a couple of years with SVG + native video – see http://www.dahlströ in Opera, for example).

The iPony Club

Finally, Business Insider has a video in which “Facebook Investor” Roger McNamee exhibits the kind of breathless anticipation about “HTML5” that is more commonly found in the minds of the prepubescent heroines of a specific genre of children’s fiction as they describe the prospect of riding Misty Mane, their new pony, for the first time. (From 8’58” onwards.)

I address the paraphrases, as they’re what get quoted and picked up:

HTML5 is going to change everything. “In HTML5, an ad is an app, a tweet is an app, everything is an app.” “It’s a blank sheet of paper, and creativity rules again.”

I’m not sure how “a tweet is an app” makes any kind of technical sense. And, much as I like HTML5, this isn’t the Renaissance – we’re not seeing some massive resurgence of human creativity because of a new DOCTYPE.

In HTML5, you don’t need to have display ads: Amazon can have a section of its store as an ad. So if you’re reading a book review, you can buy the book right from the page.

As you’ve been able to do for 10 years.

Because HTML5 can make sites rich and interactive, engagement on a site can go from seconds to minutes.

Flash can make sites rich and interactive. So can HTML 4. The key here is “rich and interactive”, not a particular DOCTYPE.

The iPad is the training wheels for HTML5.

Seriously, have a lie down.

(Added January 2012: the offending video by McNamee:)

What a load of nonsense!

Usability atrocities – ParentPay

ParentPay is, according to its Twitter profile “the market leading online payment & dinner money management solution for schools and caterers, used by hundreds of thousands of parents each week.”

It’s quite a good idea – I load up the account by credit card and, as my daughter buys lunch, the account reduces and I get an itemised bill so I can ensure she’s getting her five a day.

The school are supposed to tell her when her account drops below £5, and she’s supposed to inform me. Somewhere in this chain that involves a computer system, harassed dinnerladies and the legendary communication skills of a twelve year old girl, the system breaks down. Therefore, I rarely find out that funds are low until I receive an accusing text at 8.30 am, or on her arrival home when she tasmanian-devils through the family food supplies because she couldn’t afford lunch.

This morning I had just such an SOS text so went to the website. As usual, I’d forgotten my login details (I really want to use my email address instead of choose a username so it’s less to remember). The password reset showed me a splendidly helpful error message:

Server-specific error message in web page

Showing techy error messages saying “server errors in ‘/AUTH’ application” and a handy snippet of XML is unlikely to assist a user. However, showing error messages that can identify a specific server technology is of tremendous use to hackers – they know which server and potentially which version number to target.

After 20 minutes trying different username and password combos, I got into the system and made my payment – puzzlingly, to an organisation called “Alliance in Partnership”, on a website called “ParentPay”. Eh? Alliance in Partnership sounds like some barking rightwing thinktank. But I persevere.

I then verified my transaction via the pseudo-security of Verified by Visa (or its equivalent, Mugged by Mastercard), which is heavily JavaScript-reliant and which reportedly can’t be used on some mobile phones. (This isn’t a criticism of ParentPay, by the way: it’s a cunning ruse by the banks to dodge responsibility.)

I want to like ParentPay. I think it’s a good idea and I hope they succeed. But they need to think more about their customers’ experience. Here’s one tip that would make my life slightly easier.

I know that such a thing is currently beyond human ingenuity and no technology exists that could power such a marvel, but perhaps ParentPay may consider a system that emails me automatically when the account drops below a certain threshold, thereby guaranteeing an uninterrupted supply of bratfuel?

Added 12.30pm

Someone from ParentPay contacted me and said, with admirable politeness, that there actually is such an alert facility but only available at some schools and, once checking that my daughter’s school does offer such a facility, showed me how to set it up.

It’s not easy to find (on the page that tells your balance there is the opportunity to sign up for paid SMS alerts, but no option for emails so I assumed it doesn’t exist), but after verifying my email address I am now signed up.

So I beg ParentPay’s pardon is assuming there isn’t such a system, but suggest that they make it more obvious – I think I’m pretty web savvy and couldn’t find it.

And, in answer to other queries I’ve received, once topped up with money, their system has been flawless over the last 10 months.

I hate computers, but I love what you can do with them.

My friends think I’m a geek and have stopped reading this blog because of its boring techy content. My family don’t understand how I earn my money.

But I’m not a geek. I didn’t see Tron or the Lord of The Rings. I never play computer games. I’m scared of Git and Subversion. I can’t compile a kernel. In fact, I hate computers — I just love what you can do with them.

When I first started professionally in computers in 1988, I was writing COBOL, FORTRAN, 6502 assembler. There were no GUI tools; everything was command line. That was then. Now, I see no reason why I should need to learn some weird syntax to achieve a simple task.

Exhibit A: I was amused yesterday to read the webP converter instructions for converting imageA.png to imageA.webP. Unless you specify the string “-o”, the converter doesn’t convert: “If omitted, cwebp will perform compression but only report statistics.” What’s the bloody point of an extra switch to make it fulfil its sole function?

I think of non-GUI programs in the same way as I do about going camping. Some people love sleeping in a tent and getting up in the night to walk in the rain to poo in a hole they’ve dug behind a tree. Not me. I spend a considerable portion of my income on a house with a central heating system and three flushing toilets, so there’s no bloody way I’m going camping.

You may think it a badge of honour that you can do “sudo dpkg -i –force-all cupswrapperHL2270DW-2.0.4-2a.i386.deb” from memory. I think you’re burying your turds with a trowel in a thunderstorm.

Operating systems are the same. Despite the fervent wishes and protestations of adherents of operating system X (or Y), each demand that you learn a special way of working to accommodate its own idiosyncrasies. Where the operating systems (or browsers, or Word Processors) agree on a method, it’s not because it’s natural, it’s just a thoroughly-entrenched convention. The Firefox UX blogpost Joe’s First Computer Encounter shows that there are very few “natural” interactions with computers.

So by now you’re wondering why I do this job. “Why, Grandad”, you are shouting in my ear trumpet, “Why do you accept a salary from the geekiest browser out there when you’re clearly 200 years past your sell-by date?”

Because, I reply while drooling onto my cardigan, I love what you can do with a computer. I can use VoIP to call someone anywhere in the world for buttons. I can discuss Shakespeare, furry culture or even HTML5 with someone I’ve never met (and will probably never meet), for free.

I can do research, download books, read the thoughts of someone in Iran, or Iraq or Peru or Burma. I can listen to music that would never be commercially released, and I can see photos of anywhere I could ever fancy going, read reviews of hotels and book holidays in an environment which is as close to the micro-economic theory of Perfect Competition as we’ll ever see.

Because, at the moment, a computer is my best way to access the Web, which connects me to a third of humanity and, when made properly (accessible HTML isn’t that hard, really), is the most democratic, inclusive mode of communication we’ve ever had.

I hate computers. But I love what you can do with them.

Accessibility of internal apps and intranets

I was reading a web development book last night that rehashed the widely-believed fiction that an inaccessible web page is excusable because it’s only for internal use.

Saying accessibility doesn’t matter on internal-facing pages or intranets is simply a way of saying that your company has a discriminatory recruitment policy. You’re saying that your company doesn’t and won’t have disabled workers.

I am not a lawyer, but I know some. In the UK, employers have a duty under sections 4, 5 and 6 of the Disability Discrimination Act not to treat their employees badly because of their disability.

Other nations with civilised anti-discrimination legislation have similar laws.

Last year, the average tribunal award for disability discrimination in the UK was £52,087, compared with an average of £18,584 for race discriminaion, and £19,499 for sex discrimination (source: Daily Telegraph).

On videoing conference sessions

PPK has released a very good Conference Organisers’ Handbook in which he writes

Recording the sessions on video is becoming a custom, and a very good one. Every single session that’s out there as a video increases the knowledge of the web community as a whole, and in the end that is the goal of your conference, too.

I completely agree. Speaking at conferences is a big part of my job evangelising open Web standards for Opera, and videoing the talks is a great way to reach even more people.

So here are some notes on PPK’s advice.

Don’t try to claim copyright

I spoke recently at an excellent event and, as I was preparing to leave, I was handed a release form that granted the organiser the right to publish the video. I always read these, and encourage every conference speaker to do so. It’s lucky I did; a clause in the release form asserted that I grant copyright to the conference organiser, and give them the right to pass on the material to subsidiaries, and “third-party affiliates”.

There are several problems with this. Firstly, and primarily applicable to speakers who are representing their employers: I don’t own the copyright to my talks, Opera does as Opera pays my salary. Also, I have no authority to bind Opera to a contract anyway, so wouldn’t be able to assign such rights away. Most importantly, however, and applicable to most speakers I see: I don’t own copyright for the creative-commons images that I use in my talks, so cannot assign those rights to someone else.

(There is a happy ending to this: when I pointed out the problems to my hosts, they immediately understood and sent me a much simpler agreement that said simply “we will publish the video but make no claim to ownership or rights to the content”.)

Don’t make the video members-only

If you publish videos, don’t put them behind some kind of login or (worse) a paywall. I consent to conference organisers publishing video because it enables those who couldn’t come to the conference to get the content. If it’s only behind a login, it doesn’t get that extra reach.

If it’s behind a paywall, I can’t allow you to reproduce my slides, as some of them are licensed creative commons non-commercial. Now, I’m starting to think that creative commons licenses are so ambiguously worded that it’s impossible be sure that you’re not in breach (see my concerns about sharealike), but to me, using an attributed non-commercial image is OK as long as I’m not directly profiting from that image, eg by selling copies of it or making t-shirts with that design. But I don’t know if it counts as “commercial use” if it’s in a presentation behind a paywall. As I have no wish to be sued in order that someone else can make a profit by restricting circulation of the video, I don’t consent to that video being published. (It’s why one talk of mine was recently published audio-only).

Commercial conferences should transcribe the videos

If you’re a commercial conference, you should transcribe the videos at your own expense so that they’re accessible to people with disabilities. (I don’t mean for grassroots conferences that charge a small entrance fee to cover costs, I mean for big commercial conferences that have a ticket price in the hundreds of dollars).

Reading list

Here are some links I’ve tweeted recently, for those without time, inclination or access to read them on Twitter. And why would you, when I’ve categorised them here for you?

Web Development

  • That clever Doug Schepers of the W3C has a cunning plan to make html5 <canvas> more accessible:

    a simple graphics API that will allow either 2D Canvas (immediate-mode) or SVG (retained-mode) images with the same set of methods and parameters, with the only difference being which “mode” the author selects to have as the instantiated form. If the author draws a circle to the canvas context, it would simply be drawn to the screen with no structure; if the author draws that same circle to the SVG context, it creates a element with the appropriate attribute values and style and inserts it into the DOM

    This would allow authors to learn only one API for 2D graphics for the Open Web Platform. With this ease of learning and use, the author could decide on a case-by-case basis, even within the same application, which mode works best.

  • WebRTC is real-time communication in the browser (think: video-conferencing). Google open-sourced their code. “we expect to see WebRTC support in Firefox, Opera, and Chrome soon!”
  • Make-super-CSS3-Gradients-o-matic! Super tool for making gradients with all the lovely vendor prefixes
  • Some links on writing HTML5 games
  • Dr Oli Boblet has done research in how blockquotes are attributed in the print world
  • Trygve Lie has some cool Orientation API demos: Using a mobile phone as a remte conrtrol for a video on a desktop, and a remote / receiver demo that captures the orientation events from a device and transfers these over a WebSocket to the receiver to create a rotating image in the receiver. The image in the receiver will rotate depending upon how the remote is rotated.
  • PDF.js: rendering PDF with JavaScript

What’s the opposite of “to develop”? That’s right – “to inhibit” or “to retard”. So after the “Web Development” section, stuff that inhibits the Open Web:

Web Retardation