Friday, 18 June 2010

Thank God For Science

Lord, thank you for making the universe simple enough that we can understand the principles of how it works, from the smallest atom to the largest galaxy; that could have been otherwise. But thank you also for making the working out of those principles so wonderfully complex and beautiful; that could also have been otherwise.

Two of the more disturbing books I've read are China MiƩville's Perdido Street Station and Iron Council. They give me a peculiarly strong impression of a world where there is no underlying order --- where real science is impossible. They're wonderful stories though --- highly recommended :-).

(Yes, I need to locate The Scar...)

Tuesday, 15 June 2010

Thursday, 10 June 2010

Sleepless In Toronto

For some reason I often don't sleep very well on trips these days. So despite having had exhausting days and only about five hours sleep a night, I find myself awake in my hotel room at 5am reflecting on the last few days. Quite possibly I'm awake because the sheer excitement of this trip has my head buzzing. Maybe the good food, lack of exercise, and almost complete confinement to the hotel has thrown me off. I also suspect that over the years I'm becoming more dependent on home, my wife and children --- that's a good thing. Anyway, this has been a good time to take a mental break, to reflect, pray, recenter myself on God and update my blog :-).

It's been amazing to attend PLDI and the workshops after not having been to a major conference for five years. Even after five years away, I still feel like I fit right into this research community. I know a surprising large fraction of these people --- ex-colleagues and friends one or two degrees removed --- and more surprisingly, I remember most of them; normally my memory of faces and names is extremely poor. I've even found people I haven't met before who know who I am; that's gratifying, since I've been off the radar for so long and was never prolific.

Research trajectories have continued as one might have expected. Interest in parallelism has increased sharply, for obvious reasons. Interest in Web browsers and Javascript has increased even more sharply, since there was none among PLDI researchers five years ago. This is great; it gives me something to contribute to conversations in lieu of research results :-).

I am surprised to find that interest in parallelism has kept work on dynamic data race detection very active --- I thought that DRD work was being mined out in my day :-). There's not as much good evaluation on real systems as I'd like to see, though. I've also been sharing my anecdotal experiences with thread programming at Mozilla, which boil down to the observation that races and deadlocks are not actually a huge problem in themselves, since we try hard to minimize sharing between threads and keep communication patterns simple. The way threads hurt us is by adding nondeterminism, which can make reproducing even simple bugs much more difficult.

I think my LFX talk went pretty well. A few people told me it made them take notes and think, which is a good sign. I managed to get my slides online in spite of the hotel network being awful, at least in my room. The talk is basically a summary of what we do in Mozilla development, followed by requests for research in specific problem areas. One key idea I pushed is that the right place to introduce analysis results into the development process is probably during code review --- in other words, we should apply static and dynamic analysis tools to assist code review of specific changes, rather than in the traditional mode of analyzing large bodies of code to try to find important bugs. In general, finding bugs in code we've already shipped is less interesting, because either we've already found the bug, or the fact we haven't found the bug is evidence it's not important. Interestingly, Bill Pugh --- who has been pushing static bugfinding at Google for a few years now --- has independently come to similar conclusions.

I've also been advocating researchers work more on improving the process of fixing bugs, rather than just finding bugs, since it's bug fixing that is probably our true bottleneck for improving code quality. There's some sympathy, but it will take a while for that ship to turn.

Before I came here I wondered whether PLDI would give me an urge to get back into research. I certainly miss the people, the work and the environment, and it would be incredibly fun to get into research again, but so far nothing has challenged my view that my work at Mozilla is far more important than the impact I would have in research. The parable of the talents applies. It sure would be nice to figure out a way to push out a PLDI paper once in a while, though :-).

WebM Landed

Our initial WebM support has landed on mozilla-central. The main holdup was ensuring that Google's VP8 source license was GPL-compatible; that has now been resolved to everyone's satisfaction. Good stuff!

Of course, this is only the beginning. Currently we're working on support for the 'buffered' attribute, and there are many other bug fixes and improvements to make.

Friday, 4 June 2010

Not Implementing Features Is Hard

Sometimes we take heat for deliberately not implementing certain Web platform features. Three significant examples are SVG Fonts, WebSQLDatabase and H.264 in <video>.

SVG Fonts --- at least the subset implemented in Opera and Webkit --- don't offer anything significant over downloadable Opentype (or WOFF) fonts ... except the last three points of the Acid3 test :-(. And people keep asking for it "because it's in SVG 1.1". But I don't think those are good enough reasons on their own to make SVG Fonts an essential part of the Web platform.

WebSQLDatabase has a completely different problem. It's the only way of doing structured, queryable client-side storage in any browser right now, and a lot of mobile apps targeting Webkit-based browsers use it. The problem with WebSQLDatabase is that it isn't good for the Web, because it depends completely to the semantics and query planning of SQL as implemented by SQLite --- which is a somewhat quirky SQL implementation.

The pros and cons of H.264 have been well documented in this blog and elsewhere...

SVG Fonts and WebSQLDatabase would actually be very easy for us to implement. SQLite is already embedded in Firefox and even exposed to non-Web Javascript. The SVG Fonts subset implemented by Opera and Webkit is very simple. We could even support H.264 by hooking into specific codecs that may be present on various platforms (I think; the licensing for platform codecs is rather vague). It's certainly tempting to just cave in, implement these features, and move on. The people who complain that we're lazy, stubborn, or just wrong would move on or find something else to complain about. If we were only interested in market share, that's definitely what we'd do. But I honestly think we're doing the Web a service by resisting these things.

I think not implementing certain features is one of the hardest and most altruistic things we do.

Update I should also point out that we're not just exerting "stop energy" here; for each of these features that we're not adding, we are promoting superior alternatives --- namely WOFF, IndexedDB, and WebM.