Archive for November, 2009

Bali Hi, Bali Bye

Whew. The Opera Indonesian University tour finished after five cities, ten universities, 2600 students, 49 kilos of nasi goreng and 770,000 spontaneous Asian Poses.

Stikom, Surabaya

(Here are the presentations, demos and slides.) Serendipitously, we ended at Udayana University in Denpasar, Bali so I decided to get two day’s downtime in Bali before returning back to the UK.

I don’t know what I expected of Bali, but what I found was Benidorm for Australians. But (fortunately) I wasn’t there for the culture. I had a pleasant (if seen-better-days) room at the Three Bothers Bungalows (recommended by Joel Overton—thanks mate) set in a beautiful garden of Hindu statues, coconut and jackfruit trees).

My room at Three Brothers Bungalows, Legian, Bali

I could swim in the pool, sip a beer on my terrace at sundown, listening first to the sound of the frogs, then the squirrel scampering up the tree to steal some jackfruit, then the bats coming to munch the mosquitos, then finally the crickets before heading off for a massage and seafood.

I’ve got a suitcase full of souvenirs, a peeling nose, great memories and loads of photos. Once again, thanks for a lovely time, Indonesia!

Friday joke for Bill Lees

My old mate Bill “not too socialist to wear shoes” Lees complained about the absence of Friday jokes. So just for him:

Two guys are stuck in the desert, close to death, lying down and waiting for the inevitable, when all of a sudden…….

“Hey Bill, do you smell what I smell? I’m sure it’s bacon!”

‘Yes, Bruce, it smells like bacon to me.’

So, with their last resources of energy, they crawl up the next sand dune, and there, in the distance, is a tree loaded with bacon.

Bill races towards the tree. As he approaches, there is a rattle of machine gun fire, cruelly cutting him down. “Bruce, go back!” he cries as the life ebbs out of him. “It’s not a bacon tree. It’s … a ham bush!”

Why browsers treat HTML5 elements as inline

Occasionally someone pipes up on the twitter #html5 hashtag asking why the nav element has a height and width of zero, or why browser X refuses to render a section properly.

The reason is that the browsers are conforming to the CSS spec which says

Note that although the initial value of ‘display’ is ‘inline’, rules in the user agent’s default style sheet may override this value.

Browsers have default stylesheets. That’s where the “unstyled” HTML is styled. You don’t think it’s styled because it’s not using your lovely CSS, but actually there is a rudimentary stylesheet in the browser that sets things like div {display:block;} or the default fonts, margins and paddings for headings.

The browsers don’t “know” about most new HTML5 elements (except canvas and video), so they don’t define section, nav as display:block and thus they remain as inline, as the spec says.

The way round it is to define them all in your stylesheet. Simple as that.

This raises two vaguely interesting philosophical points.

The first is about CSS reset stylesheets. A true CSS reset would set every element to be display:inline. (Personally I see little value in reset stylesheets except as a debugging/ educational tool, however.)

The second is the question of what it actually means for a browser to “know about” an element. In the case of an element like abbr or input, there are certain inherent behaviours.

But with something like div or span, or even i and b, the only thing the browser needs to “know” is how to style it. Any arbitrary element is already findable by JavaScript getElementByTagName (whether it be a new HTML5 element or something entirely arbitrary like a cheescake element) because JavaScript can be equally used with other markup languages such as XML which can have user-defined elements.

So now you know.

Jakarta sunrise

I awoke bright and early and raced to open my curtains to take in the sunrise—a broadening orange smear of sunshine diffusing through the smog behind silhouettes of gigantic skyscrapers, many under construction. Even through the sealed hotel windows, I can hear the honking of buses and taxis taking commuters to work at Unholy O’clock to beat the horrors of the main rush hour.

Apart from the preponderance of mosques over temples and more ladies in hijab (not universal; I reckon about 50%), I was once again by how much Jakarta reminds me of Bangkok (and I lived in a muslim area of Bangkok so the differences are even smaller).

Reading the newspaper over breakfast (papaya, miso soup, nasi goreng and omlette) reinforced the similarities. Just like in the Bangkok Post, the Jakarta Globe runs stories on alleged police inactivity, corrupt politicians, urban flooding, a pretty girl in a sex scandal and school bullying going tragically wrong.

There were a few peculiarly Indonesian stories: pilgrims to Mecca complaining over the government Hajj organisation’s lack of transparency, bad food and not issuing prayer books early enough.

Some local students have invented some sunglasses with “sonar” that alerts blind wearers if they’re going to walk into an obstacle, and elected not to patent them “so that every blind person will be able to take advantage of them”.

There is a debate in the letters page about whether mosques should all re-broadcast a centrally-chosen muezzin’s call to prayer or whether each muezzin should continue to do his own call but do it without amplification. The point is that it can become pretty noisy when lots of mosques all do their own calls through loudspeakers.

I can speak only for myself, but one of the joys of my time living in Turkey was the cacophony of different men, all singing the same ancient words “Allah-u Akbar Ash-hadu allā ilāha illallāh” in their different voices simultaneously at prayer time.

Now to finish writing my presentation and to celebrate my birthday a day late by reading beside the pool until I feel energetic enough for a massage.

Friday 13th: 43rd birthday in Jakarta

The miserable bloody English weather has conspired to give me two colds more or less back to back, so it was with only minimal trepidation that I spent 24 hours travelling by plane to Indonesia, to spend my second birthday on the trot jetlagged in Jakarta where I’m embarking on a frenzied schedule of university visits to persuade Indonesian students of the value of Web Standards.

The kindly Indonesians laid on a huge rain storm just as I landed (so the 30 celcius sun they’d been enjoying didn’t make me too culture-shocked). Cue flooding and gridlock. The 30 minute drive from the airport took two and half hours of buttock-clenching frustration—but at least it didn’t end up like that other Friday 13th.

Goodbye, GeoCities: It’s the end of an era

Long-term readers may recall my 2004 CSS Zen Garden design, GeoCities 1996.

Now Yahoo! has pulled the plug on the GeoCities domain and all the sites hosted there, I’ve written a short article for ZDNet

GeoCities once seemed to occupy an unassailable position on the web, so its recent demise contains important lessons about the nature of the medium, says Bruce Lawson.

Read it.

A sexy new name for the Open Web Stack?

“What’s in a name? that which we call a rose by any other name would smell as sweet” said Juliet of Romeo.

Ultimately, in the heady world of Shakespearian romance, names do matter; if you’re name is Montague, you can’t marry someone called Capulet.

And certainly names matter in the more prosaic (but equally passionate) world of Web Standards. Until Jesse James Garrett coined the term “Ajax” we didn’t really have a phrase to refer to web applications that allowed parts of pages to be updated without refreshing the page. No matter that some Ajax depended neither on JavaScript nor XML; the name was a useful method to describe both the new techniques and the stepping-up of the users’ experience.

I find myself consistently grasping for an umbrella term to describe the new technologies available to us, such as HTML5, CSS 3, Geolocation, W3C Widgets, WAI-ARIA, Web Fonts, Web Storage, Web Sockets, SVG and the like.

I’ve been using “HTML5″ as such an umbrella term for new markup specs and APIs, but it’s inaccurate; Geolocation was never in the HTML5 specification although technologies such as Web Storage used to be until they were split out.

The orginators of the HTML5 specs, the WHATWG, have recently resurrected the term Web Applications 1.0 as a superspec to wrap up HTML5, pre-defined microdata vocabularies, Web Workers, Web Storage, Web Database, Server-sent Events, and Web Sockets.

But that still leaves SVG and CSS. The term “Web 2.0” is too tainted by marketing BS and synergy-speak to be useful—and also seems to mean social networking, or user-generated content or any number of buzzwords.

Do you have any ideas for a sexy new term? Do we need a sexy new term at all?