May 2013
1 post
Go home NSA. You're drunk.
I’m living in America, and I don’t trust the government here. They read my text messages and my email and they can get access to anything my cloud providers store on me. I also don’t trust Saudi Arabia with my data. Why should I? I didn’t mind this sort of thing while I was in Australia. It seems pretty benign, although I’m pretty sure my emails were being recorded...
May 17th
April 2013
1 post
Github pull requests
I recently read A plea for better opensource etiquette. Its basically a whinge about github pull requests and issues getting ignored. This is a really hard topic, because opensource work is mostly volunteer work, and everyone gets precious about their contributions. But most people have no idea what its actually like to run an opensource project. Dealing with mountains of patches and bug requests...
Apr 13th
March 2013
2 posts
Mar 31st
1 note
Its time to rewrite ShareJS!
Sorry about the mangled formatting. I need another blog layout or something… A month ago I got hired by Lever and moved over to San Francisco. We’re building an applicant tracking system for hiring. Its a realtime web app built on top of Derby and Racer, which is a web framework written by the company’s cofounders. Racer doesn’t do proper OT and it doesn’t...
Mar 18th
February 2013
1 post
On changing the world
Imagine you were suddenly, irrevocably teleported back in time a few hundred years. You’re stuck in a time before cars and electricity. The slave trade is alive and well. Germs haven’t been invented yet. The average life expectancy is around 25 (I’m not even joking) and nobody is particularly well educated. The question is, what do you do with your life? Do you live a quiet...
Feb 11th
1 note
November 2012
1 post
Nov 3rd
1 note
October 2012
1 post
Dear high school grade
It was kind of funny seeing everyone again last night at the 10 year reunion. I think I basically didn’t meet any of you in high school. Maybe we were even friends back then, but the people we were 10 years ago seem like fundamentally different people to who we are now. Back in high school, we formed our identities from our quirks and flaws. We formed our identities from the expectations...
Oct 20th
September 2012
1 post
String.length LIES!
For awhile we thought all the unicode characters were going to fit in 2 bytes. Aah it was a heady time. Forward looking companies like Microsoft, Apple, Sun and Netscape started using arrays of 2-byte integers to store characters using an encoding called UCS-2. But the unicode consortium just kept adding more crap to unicode; and soon enough enough we overflowed the 65535 available characters. Now...
Sep 16th
August 2012
2 posts
Aug 26th
Faster Strings
At some point I want to port ShareJS to C, because tiny, fast projects like redis are sexy. One of the pain points of ShareJS is javascript’s high level strings. Because they’re immutable, inserting in the middle of a large document requires O(n) time. ShareJS slows to a crawl if you have huge documents. The simplest solution is to break documents into an array of lines. But that...
Aug 25th
September 2011
3 posts
Uglify!
I’ve just moved ShareJS from using the google closure compiler to uglify. Aside from compiling way faster and being written in javascript, uglify compresses sharejs better than closure! (Only ~1% better, but I’ll take it). I needed to fiddle with the sourcecode of uglify, and I was amazed at how legible it was. They’ve made very different design decisions from sharejs: ...
Sep 17th
1 note
Google's new browser language
Google’s working on a new browser based language that they’re going to be announcing soon. I wonder if it’ll be any good… They’ve accidentally put an internal only document about it up online: http://markmail.org/message/uro3jtoitlmq6x7t . I bet heads rolled about that. A few notes: Types will be optional It’ll compile down to javascript anyway It sounds...
Sep 9th
BrowserChannel's secrets
After struggling against socket.io’s many bugs, I’ve been reading through google’s opensourced BrowserChannel code. For those who don’t know, browserchannel is the bidirectional AJAX library google wrote for Google Chat in GMail. The library does long polling for server->client messages and POSTs for client->server messages. ShareJS over BrowserChannel will be...
Sep 8th
August 2011
3 posts
New version of ShareJS
I”ve pushed a new version of sharejs tonight, now with type-specific API support. Previously, you could write this: sharejs.open('hello', 'text', function(doc, error) { // Insert some text doc.submitOp([{i:"Hi there!\n", p:0}]); // Print the document's contents console.log(doc.snapshot); // Parse incoming operations doc.on('remoteop', function(op) { ... }); }); …...
Aug 11th
On languages and thought
There’s an interesting effect involving programming languages, where each language seems to encourage a particular kind of thinking in its users. Its different from the Sapir–Whorf hypothesis (that languages shape thought). Instead, it seems to be that certain philosophies give rise to certain programming languages. - Or, the best way to write a program changes depending on what language...
Aug 10th
Teaching = fun.
Gave a talk to year 5/6 kids today (from a gifted + talented program). It turns out, most of them love minecraft. (I think thats awesome.) We spent a bunch of time talking about the theory behind AI, and how you write computer programs. I got some really great questions, including: “If you use a computer to write a computer program, how was the first computer program written?”,...
Aug 7th