Thursday, April 22, 2010

Why don't browsers provide a generic VM instead of just Javascript?

Why is it that the only way to make a web page scriptable and dynamic is to use Javascript?

I'm sure there are multiple historical reasons. But as browsers become less and less simple document viewers and more and more a computing platform unto themselves, Javascript is being stretched far beyond its intended design. The fact that modern browsers such as Chrome can squeeze the performance they do out of it is in itself remarkable.

However, everyone would be better served if browsers provide a generic virtual machine, with public APIs for accessing the DOM, etc. Instead of providing Javascript to a webpage, you could provide bytecode, compiled from any language, which would happily run in a nice sandboxed environment. It'd be a lot cleaner, and a lot faster. Of course, browsers would still provide legacy support for compiling and running provided Javascript as the new bytecode.

And no, Java  applets don't cut it. For one thing, they are a third party plugin. For another, for most of their history, they've sucked. Most of all, they have a strong visual signature, whereas ideally a browser VM would be entirely unobtrusive - the goal would be to fill the role of Javascript, not Java applets or Flash or Silverlight.

Saturday, April 17, 2010

Blogging is a Good Thing

In theory, I think blogging is a really good idea.
  • It helps keep you in contact with people
  • It exercises writing skills
  • Writing about an issue forces you to think about it deeply and more critically
  • It allows you to share ideas, and therefore have an impact on the world.
In practice, however, whenever I've tried to get a blog rolling, I always abandon it within a few months, which is frustrating to both me and to the few kind souls who actually read it. But I don't think its an inherent problem with me or with blogging - I think my blogging philosophy has been askew. And recently, I've been having a lot of thoughts I think are worth sharing, and no medium to do so.

So I'm going to try again, and this time, I make the following resolutions. They should help me keep posting, and hopefully make for more interesting reading:
  • If I have something interesting to say, I will post it, even if I only have time to write a few sentences.
  • If I don't have something interesting to say, I won't worry about posting.
  • I won't worry about who might be reading - this blog is a reflection of what I am thinking about, and people will either find it interesting or they won't.
So... yes! That is all.