Sunday, 22 February 2009

Checking The Rear-View Mirror

This video from PDC 2008 is interesting; Alex Mogilevsky talks about IE8's new layout engine. It was generous of him to mention that the subpixel units and zoom approach first appeared in Firefox! It's interesting to get a little glimpse under the hood. It sounds like they have something much like our frame display lists. The glimpse we got of their "layout object dump" and "display list dump" output was quite revealing if you know what you're looking for, but I'll leave that as an exercise for the reader :-).

On the flip side, the decision to make the layout code reusable for apps like Word seems dubious, and I fancy I could sense him doubting it too. And Alex seemed remarkably sanguine about supporting an IE8-mode in IE9; "putting an 'if' statement around every bug fix" is far from the whole truth and would itself be a big maintenance burden. I stand by my skepticism of their whole approach here.

Saturday, 21 February 2009

Filters, Libraries And The Web

Daniel Glazman writes, somewhat in passing:

We can now apply SVG filters to all content, including HTML 4, in Firefox but I have mixed feelings about the fact you have to know HTML, CSS and SVG to apply such a filter. Seems to me overkill, and too far away from the original spirit of the Web.

He didn't enable comments on that post, so I'll reply here: you don't need to know SVG to use filters. You can just paste filter code from a cookbook into an XML file --- or use an XML file from a library --- and refer to that file from your CSS and HTML. This is not only easy and reasonable; SVG filters provide a rich vocabulary of composable operators, so they're much more flexible and powerful than providing ten canned filter keywords to handle all the author needs that the CSS WG can think of.

You could perhaps reinvent SVG filters with CSS syntax, but I don't see that as a real win for author understanding.

Generally in computer science we prefer to create a set of composable primitives with clean semantics, on top of which libraries are built to make frequent tasks easy, over trying to anticipate every possible need and encoding a feature for each one. Unfortunately CSS has often taken the latter course ... partly because the Web's mechanisms for code reuse are weak. But external document references give us a reuse mechanism that makes using a library of SVG effects quite convenient, IMHO.

Friday, 20 February 2009

Columns Conversations

Today I had a fun lunch with Web developers at Shift (not all of whom work there). It was a follow-up on a short discussion at Kiwi Foo about columns on the Web. My goal was to brainstorm with some Web developers/graphic designers/user experience people about ways to display lots of text on large screens, and in particular to tackle the difficult problem of what to do when the text can't all fit.

We talked through various options. There was quite a lot of interest in using fixed-height columns and adding columns horizontally for overflowing content, and having users scroll horizontally to see the content. This is pretty well supported by the CSS3 columns spec and the Gecko implementation, although to make it more useful we'd have to work on horizontal scrolling UI and implement viewport units so an element's height can be related to the window size.

There was also quite a lot of interest in using fixed-height columns but adding overflowing columns vertically below the first set of columns, giving the effect of a set of pages laid out top to bottom. This is currently not supported by the spec or our implementation, although it wouldn't be too hard to add. This would require more UI work, to make it easy to scroll up or down by exactly the height of one of these pages. Continuous scrolling mechanisms like mousewheels would be hard to integrate.

Either of those approaches could be modified to try to avoid scrollbars and instead offer a UI based on pagination --- "next page", "previous page" buttons or even "next column", "previous column".

Another idea that Ross Howard raised, one I hadn't thought about, is to have scrolling actually happen *within* columns. So there's a fixed number of columns of fixed height; if content overflows, then initially it's not visible beyond the last column. But there's a UI "scroll down" action which removes content from the first column and pulls the rest of the content "up" through the columns to fit.

A good point that was raised during these discussions is that smooth scrolling is important to help users not lose their place during scrolling. It's not clear how that would work with the scroll-within-columns idea, though, since moving content within columns has to change the layout at column boundaries to choose tasteful column break positions.

It would be cool to provide support for a variety of options, but I need to think about the right syntax for expressing them and how hard various options would be to implement. Adding support for viewport units would be useful yet relatively easy (a brand-new volunteer, Keith Rarick, implemented 'rem' units recently). Adding some kind of "series of pages" feature would have many uses and wouldn't be too hard to implement, it's a lot like columns that stack vertically instead of horizontally. On the other hand the "scroll within columns" feature needs a lot more thought. The scrolling UI issues need more thought too.

One person asked me why I was interested in this problem. Partly it's because Web developers want a solution. Partly it's because screens have been getting bigger, on the desktop anyway, and letting users use them effectively is serves users better. It's also partly because proprietary platforms like Flash and WPF have some of these features and the open Web needs to keep up.

We had side discussions about fonts, typography and analytics. These Web developers would really love some data about how certain browser commands are used by visitors to their sites.

Thanks to Ross and co for a fun and helpful discussion, and the pizza!

SVG Filter Effects For Plain Old HTML

I forgot to mention this earlier, but Boris Zbarsky a while ago implemented SVG external document references, so that SVG features such as filter, mask, clipPath, use, fill, stroke, marker, and textPath can refer to elements in other documents. A nice benefit is that our support for SVG effects for HTML can now be very easily applied to Plain Old HTML documents. For example, check out this example in a Firefox 3.1 trunk build. The key piece of magic is

textarea {

Wednesday, 18 February 2009

Hazardous Biology

This is the scariest thing I've read in a long time. If the leading lights in synthetic biology are this naive, humanity is toast. The idea that we can prevent abuse while democratising access, by bonding researchers into a loving utopian community, is laughable. The comparison to computers is completely inappropriate. Thomas Lord's comment near the bottom is a pretty good summary of the problems here.

I especially dislike the rhetorical technique that treats suppressing a technology as de facto absurd. On the contrary, if a technology poses a serious danger to humanity, then it absolutely should be suppressed, or at least tightly controlled and not "democratised". We've done it for nuclear weapons with moderate success.

God have mercy on us.

On Conversations

I hear a lot about online "conversations". In blogs, in message boards, in email, people seem to want to have a lot of "conversations". Around Foo Camp, there was talk about how to "keep the conversations going". Even faceless corporate entities want to have "conversations" with me.

I do not want "conversations". Conversations are part of the information overload that saps my productivity. I want to engage, communicate, resolve, and move on. If we keep needing to have conversations then we are not communicating or something else is not working.

Exception Family members and friends, this does not apply to you.

Tuesday, 17 February 2009

Kiwifoo 2009

This weekend's Foo Camp was another big success. I always feel awkward trying to socialize in large groups, but I did manage to talk to a lot of interesting people and go to many interesting sessions. It was great to see Ben Goodger there and co-lead with him a session on "browser stuff".

I also led a session on "working from NZ on global projects" which was very well attended. it ended up mostly focusing on generic issues around remote work and distributed teams, more so than I had intended, but I didn't feel I had the mandate, or the need, to aggressively steer the discussion. It was interesting anyway. There seemed to be genuine differences between distributed teams working on open source projects and distributed teams working on normal business projects. For example, people talked about how in normal businesses, they'd have difficulty working with people they hadn't interacted with face to face, so early physical meet-ups were essential. By necessity, on open source projects we mostly regard physical meetings as a useful bonus, but not essential at the outset. There's a question about whether open source projects are simply filtering out people who can't work that way, or whether they're actually different. Anyway, if I get another chance, I'd like to focus in on the question of how to better exploit the opportunities to work on global projects from NZ for the sake of this country.

Another interesting session was on spreading free software and getting more people involved in it. Many of the participants approached from the traditional viewpoint of free software as the unknown underdog, so I pointed out that in some areas (like Firefox in certain countries) free software is being widely used, even dominant, which raises new questions about how to exploit that power --- how can we impart our values to the millions of people who just use the browser, and won't ever be contributing code? One idea raised was to talk about people, e.g., by sometimes highlighting a volunteer contributor (perhaps a relevant localizer) on the Firefox start page. Just have to watch out for stalkers.

As the event has grown, the predominance of Web developers has diluted, which is a good thing, although I still really appreciate the opportunity to talk to Web developers about their problems and desires. This time I played devil's advocate and asked whether their ideal world would have only one browser engine, tweaked versions of which were used by all browsers, similar to the way Linux distributions compete. I was a little bit surprised to see very little support for that.

Thanks to Nat, Jenine and the crew for another great event.

Sunday, 8 February 2009

Telling It Like It Is

I watched a little bit of cricket yesterday, NZ vs Australia in Melbourne. Australia's usually dominant, but currently in a bit of a slump, and some NZ fans had a banner, "EVEN WE'RE BETTER THAN YOU". I think that says a lot about NZers --- both good and bad.

Tuesday, 3 February 2009

Mozilla Afloat

Since Jonathan Watt is in town I thought we'd better do something fun with people from the office, so today we skipped out and my dad took us for a day trip in the family boat. We went to Brown's Island --- a small volcanic island which is very close to the city but hard to get to, as no ferries go there. We climbed to the top and walked around a bit. Then we went to Motuihe Island nearby, where we swam a bit, had lunch, went ashore for a walk, and then a couple of us swam a bit more (despite having spotted a large stingray in shallow water off the beach) before we went back to the city.

The weather was fantastic --- warm, sunny, a light breeze and very calm water, but both islands were almost deserted. Motuihe is being converted from a farm into native forest and a wildlife sanctuary; all predators have been exterminated and rare saddleback birds have been successfully introduced. Apparently they're introducing kiwi in March --- as far as I know, that will be the closest non-enclosed kiwi colony to Auckland. It's also got interesting history, having been used as prisoner-of-war camp to hold Felix von Luckner and his men. With its fabulous beaches and proximity to Auckland, it's going to be an amazing destination, at least if you have a boat to get there.

Below, from left: Michael Ventnor, Jonathan Watt, Chris Pearce, Karl Tomlinson, me.

Mozilla people atop Brown's Island

View from Brown's Island

View of Brown's Island

The above photos are all from Brown's Island. The latter two show views of the central crater. If you look closely at the bottom photo a member of the SVG Working Group is visible.

Mozilla At Karekare

Jonathan Watt arrived in Auckland on Saturday to spend some time at the office on his way to the SVG WG meeting in Sydney. To help him adjust to the antipodean time shift, I took him with my family for some time outdoors in glorious summer weather. Tim Terriberry, who works on the Theora codec, was also in town so we brought him along, along with Michael Ventnor, our remaining intern (who works on GTK integration and CSS effects).

Auckland's west coast is hard to get to except by private transport, the scenery is spectacular, and the area has a huge variety of destinations and walks, so I always like to take guests there if they haven't been --- or sometimes even if they have. So we went out to the end of Te Ahuahu Road near Piha and walked the Mercer Bay track down to the Comans track and thence down to Karekare Beach. It was a great day but hardly anyone was around in Karekare. I thought after they sealed the road it would get busier.

After lunch on the beach we drove back to Piha for a quick jaunt half-way up Lion Rock (that's as far as you can go). That gave us a great view of some kind of surf lifesaving carnival.

Below: Michael Ventnor, Tim Terriberry, Jonathan Watt, and me at Karekare beach.

Mozilla people at Karekare beach

Surf boats at Piha