Monday, February 11, 2008

People suck, they must all be destroyed

I had a very good friend back in OC who used to say this whenever someone irritated her. We worked at Kinkos at the time, so it happened frequently. She would put a big dramatic pause between the two phrases, and sort of mutter the second part under her breath. It always cracked me up.

Where I work, the management provides a nice commuter service where they send buses all over the area to get us to and from the office. It is an awesome benefit, and the only reason urbanites like me can work there.

I guess I have been maturing or something recently, because I usually take the same shuttle now: 9:10 AM, every day. So I get to see the same people, and their habits, day in and day out.

There is this one guy who usually sits across from me. I get in at the first stop, and though I prefer to sit on the aisle side (there is a little more room to stick your feet and elbows out), I always slide in to the window seat because the 9:10 shuttle is always nearly full. It seems pretty rude to me to occupy the aisle seat with the window seat empty when people are piling in looking for seats.

So every day, this guy comes in on the second stop and sits in the aisle seat across from me, and puts his bag and jacket on the window seat. At the third stop (which is the busiest) he eyeballs everyone as they get on, hoping that they will not ask him to scoot over. Invariably, the bus is nearly full, so invariably, someone does. I've never actually witnessed this guy get to hold onto his empty window seat, I don't know why he keeps trying.

Anyway...

Dimitri had this idea for JavaScript Tennis, based on Photoshop Tennis, from back in the day. Seems like a great idea to me. I'm trying to think of a good first layer.

Monday, February 04, 2008

Mom knows best

...what has been hurt can be healed, what has been torn in pieces can be put together, what was dysfunctional can be imagined into something better, what was crushed can be built up again, even by a mollusk (given enough available calcium) ... VOTE, dammit.

http://bugyou.blogspot.com/2008/02/its-super-duper-tuesday.html



BTW for any Californians reading: I just found out that the democratic primary is open this year. That means that if even if you haven't registered democrat, you can still show up at the poll and vote!

Sunday, November 25, 2007

HTML5 SQL Player using Gears

Dimitri Glazkov is a developer from Birmingham who has been following Gears and HTML5 development. He wrote a wrapper around Gears that adapts the Gears SQL interface to the HTML5 Database specification and a test page to drive it:

HTML5 SQL Player

Notably, this wrapper is very faithful to the spec. Everything is asynchronous where it is supposed to be -- even opening a transaction is non-blocking, just as it is in the spec.

This is done by implementing a client-server protocol between a Gears WorkerPool (the server) and the wrapper API (the client). Each SQL statement the client needs to execute is proxied to the server using SendMessage() and the client waits for an asynchronous callback containing the result. A typical SQL transaction will contain many statements and these all must be routed to the same Gears Database object on the server.

For an interesting read, check out the source. It is a really good example of mapping an single-threaded asynchrous API to a synchronous multi-threaded one.

It's nice to see this work being done. It shows that as long as the basic web development model of JavaScript/CSS/DOM is preserved, developers can deal with pretty dramatic API differences.

Tuesday, October 30, 2007

New Gmail infrastructure launches! Congrats to Dan!

Whee.. the new Gmail frontend is launched.

When Dan joined the company two years ago, I didn't know what to expect. I only really knew him from his work on Thirteenth Parallel and from talking to him on dhtmlcentral.com.

I was worried for his sanity when he got assigned to Gmail, because it is one of the oldest and biggest JavaScript applications at Google. Therefore it was also the most, err, crufty :).

I offered to try and help him transfer to a newer project, but surprisingly, Dan did not want to leave. He dove in to the cruft, initially on Gmail Chat, but over time more and more on core Gmail. He began agitating for change, which culminated in this new design.

At Google, we dogfood all our products. That means, among other things, that we use Gmail all day for all our internal mail. I don't know of any other company producing web mail that can claim that. It also means that we have really high standards for these products. 500ms latency is usually considered great for a web application, but for something you use all day, it just won't cut it. Because of this, the Gmail team has been to hell and back several times over the course of this project, trying to shave milliseconds off frequent operations.

As one small example, one team member reverse-engineered jscript.dll to figure out how its GC algorithm worked, and was horrified to find that it had hard-coded, arbitrary limits on how many objects could be allocated before a GC would occur. This led to an insane amount of effort optimizing the code to reduce the number of allocations in core code paths.

Congratulations to the team! I'm really looking forward to the new features this design enables.

Monday, October 22, 2007

Back to work

Well, we've been back from the trip for about four days now, but without the requirement from work to return to PST, I'm still going to bed at four or five every morning.

Thought I had better finish up posting our pictures, before the goog swallows me up again.

It was a great trip. I wish that Hong Kong was less smoggy; I'm not sure if I could live there if it is always like that. And Japan was very interesting, and incredibly beautiful, but I think I would tire quickly of the constant attention to manners and protocol.


Tokyo, Kyoto, Hong Kong 2007