Monday, July 14, 2008

My Obligatory Foo Post

(...but one I am excited to write.)

This weekend I attended Foo Camp. It was a crazy, exhausting, exhilarating, fascinating experience. I wasn't quite sure what to make of everything beforehand, but now I can say that Foo was quite possibly the best event I've ever attended. The thing is, I'm not sure I could say exactly how or why.

Foo is a mostly technical event. I've been to some really rotten (though well-intentioned) events that tried to wed technical and non-technical content. However, they involved putting technology and humanities people in the same room and expecting magic to happen. In contrast, through what I can only assume was painstaking care Sara Winge and the other Foo organizers put together a remarkable guest list, and the format (or perhaps, lack thereof) is structured to make with the mingling.

But I shouldn't be trying to do an expository description. You can't accurately describe Foo that way. The only way I can think of to really capture Foo is to just describe some of the things I saw and did there.

I saw and met a lot of people -- many of whom I never thought I'd have the opportunity to meet. For instance, I played Werewolf with Jimmy Wales, among others. At one point, Jimmy exclaimed "No no -- it's me who smells like pickles!" At least, I think it was Jimmy -- it's hard to remember clearly when you play Werewolf until 6am. (And don't ask -- I can't remember how we got on the topic of pickles anyway.) The whole time, I just couldn't figure out how I got meet Jimmy Wales, let alone play Werewolf with him, let alone hear him say a thing like that.

At least as interesting were the folks I met whose names I didn't recognize (but probably should have, and am pleased I do now). I was going to list a few, but decided that would be name-dropping, and there's no way I could even remember everyone I met anyway. Instead I'll say that a big part of Foo for me was being in the presence of people who seemed larger than life, and realizing that they are all just people -- albeit more talented and more interesting people than me. I know that probably sounds gratuitous and cliche, but it's the truth: there's something profound in the simultaneous revelations that celebrities are just people, but many of them really do deserve to be celebrities.

The sessions were great too. I went to one session where the first half was about electric cars, and the second half was about baking killer bread. And both were really great conversations! Where else can you find a session like that followed by one on parallel programming trends, and then co-lead one yourself on Android?

I actually co-lead two sessions, and tried for a third on designing a card game, but the aforementioned 6am Werewolf and my co-lead's unexpected cold spelled doom for that one. I'm bummed about that, because the card game session was to my mind the one that would have counted. I do Android stuff all the time so answering a few questions with a colleague for an hour is no big deal. It did go well (actually, very well -- the questions were quite good, and we had pretty good turnout at around 30 or so people) but I can't claim it was very original or insightful, as content goes.

What I still am not quite sure about is how I got invited. I'm curious, but I guess I don't need to know. That's not really the point of Foo -- you're just supposed to go, and be a part of what's going on.

And that, I now realize, is what Foo is all about: it's about people and ideas, not technology. Tim actually says as much when he describes the event, but sometimes it's hard to parse the forest for the trees.

Who knows if I'll get invited back next year (I doubt I was all that interesting to the other folks there) but it was definitely a pleasure and a privilege to go. I owe a huge thank-you to Tim O'Reilly and his awesome staff for a wonderful event.

Tuesday, July 8, 2008

I think I've learned a Genuine Life Lesson

I used to be quite the armchair analyst. Well, probably no more so than any other software engineer, but as a group we do love to speculate. There's just so much drama out there, with the jockeying and jostling of companies and technologies.

But for the most part we are also naturally skeptical, so I never got that carried away. Indeed, I was quite proud of how much I didn't get carried away.

At least, before I started working on a high-profile project that routinely gets press coverage. If I took things with a grain of salt before, I take them with 5-pound bag, now.

It's odd though: I haven't learned anything I didn't already know (remember that reporters always have angles, and so on), but now I don't just know it, I know it all the way down to my marrow.

I went through phases, too. At first I was indignant ("How dare they miscontrue us so grotesquely?") or amazed ("Well I'm glad they like us, but that's a bit over the top.") On my way to where I am now (mostly indifferent with a mix of amused and irritated), I passed through a few other minor phases, of which my favorite was a sort of cognitive vertigo: "I know it's not true, but... everybody's saying it. Maybe... maybe I'm wrong and I don't know it?"

We've had everything from cleverness to malice to incompetence attributed to us. There have been reports of Android devices launching ridiculously early (February? seriously?), as well as implausibly late (2009?!). People "familiar with the matter" have been quoted saying things that sound like they came from a different universe. Based on just the press, you could be excused for thinking that.... well, that there's drama.

What this has taught me is that there's just no point in judging anyone -- especially companies -- by anything other than their actions. But what I've learned is to include in that what they say: if Nokia/Symbian says they want to open up, then I assume that that's their plan, until they do something else that says otherwise. If Apple says they don't have background processes because they want to protect the user experience, then I don't automatically assume that's just cover for wanting to hamstring third-party developers.

I no longer scrutinize companies for drama, until they actually do something dramatic. Conspiracy theories and armchair punditry are fun in their way, but for me they've become an indulgence I try to avoid.

Monday, July 7, 2008


Heh, looks like my new Blogger template is not without bugs -- on the comments page in this case. :) I'll have to fix that ASAP.

Friday, July 4, 2008

Blogging is hard.

I've had blogs before -- the kind where I imagined people wanted to read about me doing my laundry, or the cat's latest biological nonconformity. When I started this one, I decided I'd try to keep the value a bit higher, and only post things that I'd thought through, and proofread a couple times. So far I've done that.

But damn, it turns out blogging is harder than I thought. I just re-read a couple of my most recent posts, and while I'm not unhappy with them, I am not really satisfied with them, either.

I think they're still a bit too long and rambling. The message is in there, but you have to work to find it. This is after what I thought of as an aggressive editing cycle. I think I need to amp it up a notch, and go from aggressive to brutal.

Thursday, July 3, 2008

Why I don't like JavaScript 2

I don't like JavaScript 2, ECMAScript 4, or whatever it's called. That doesn't mean I'm taking sides in the ongoing controversy. To the contrary -- I think the controversy is boring and lame. I don't like JS2 because I just don't care.

Actually I'll even go beyond that. If, in say, 7 years, we are still using JavaScript or JS2 to write Ajax applications, I'll be very sad. I don't like JavaScript, as a language. I don't hate JavaScript, but I don't like it as a matter of taste. It doesn't excite me, I don't think it's particularly powerful, it doesn't change the way I think about programming, etc. JavaScript is okay, but it's not great.

So in a way I guess I should be interested in JS2. And to whatever extent JS2 is better than JS1, then the web benefits. I guess. I don't really know though, because I haven't even so much as glanced at a spec. People whose opinion I respect think it's an improvement, but like I said, I don't care. Why?

Because I think JS2 has something in common with XSLT: they're both painstakingly-crafted, elegant solutions to completely the wrong problem.

Why, exactly, are we betting the future of the web on just another programming language? If the past 40 years of computer science have taught us anything, it's that the industry never -- never -- agrees on a single programming language. ForTran, COBOL, C, Java... things change. So why does anyone think that this time around it's going to be any different?

Worse, designing a successor to JavaScript implies that you know what's best for all developers everywhere, and have the required skills to design it. That's a hell of a presumption, even granting that it's the work of a team of talented experts and not a solo thing. I really like Python; who are you to tell me that your shiny new language is better for the browser than a language with years of history?

This is the same issue I have with XSLT. The need there is for a standardized way to transform XML from one format to another -- okay, fine, that's definitely a real need. But what is XSLT, if not machine readable instructions for performing a specific task? And hey guess what -- we have lots of different things we can use to encode machine-readable instructions; we call them programming languages, and they have a rich and varied history. In the silly days of my professional youth, I once devised a system where you basically wrote little scripts in an XML syntax, and I got rightly bonked on the head for it. It's not any better an idea for XSLT, either.

That said, for what it is XSLT is pretty well done; it's just that it's a well-done solution to the wrong problem. XSLT is a tightly-coupled solution to the problem; a loose-coupled solution that focused on defining a sort of "CGI for XML transforms" would -- in my opinion -- have been a better idea. Specify the boundaries, and let existing languages do what they're good at.

It's definitely possible to nit-pick my argument there, but I'm bringing it up because I think it's even more true of JavaScript today. I'm sure that JS2 is a great, elegant language. But the problem is, it's just not what's needed.

The web works as a platform because it embodies an effective application model implemented via open standards. But it's getting long in the tooth, which is why we have at least 3 different platforms aiming to replace it: AIR, Silverlight, and JavaFX. Each of these is basically some permutation in the cartesian product of (Vector-renderer, DOM-renderer) * (custom VM, custom language). The thing is, the browser of today is itself one permutation, and JS2 boils down to yet another.

We've already proven the model, folks. We don't need to prove it all over again.

The browser isn't broken, and doesn't need to be "fixed", either by a proprietary platform, or by a shiny new language. Instead it needs to be extended, and functionality gaps need to be plugged. That's why I don't care about JS2: its fundamental message is "the Browser of Tomorrow is the Browser of Today, just with different syntax." This is spinning our wheels, and won't do anything to advance the web.

So what is the right solution? Well, in my opinion what we need is to formalize and standardize the DOM API, agree on a single vector model and API, and specify an intermediate compilation format. That is, specify the boundaries, and let existing languages do what they're good at.

That intermediate format could be bytecode like the JVM or .Net CLR, plain old JavaScript (which GWT has proven can be used for this purpose), or even "JS plus compilation-friendly extensions". Between Tamarin and SquirrelFish and ten years of the JVM, I think it's pretty well established that this is a solvable problem. For that matter, ditch the idea of an integrated VM entirely, and establish a standard API where an external process can attach to your browser DOM, without the browser needing to run code at all.

With one of these approaches, the browser -- through incremental steps -- becomes just as "innovative" as SilvAIRLaslavaFX, while still based on the open standards that have worked so well so far. This is basically the same pragmatic gap-filling philosophy that Gears and HTML5 have, though taken a step farther.

The problem is that this is messy work, and it's far less sexy than designing your own language or busting out with your own runtime out of whole cloth. It feels less innovative, because it's less of a dramatic change. But as DOM, CSS, and XMLHTTPRequest have proven repeatedly, it's the modest, targeted innovations in the web that have caused the biggest revolutions.