Details, part 2

As promised, this is part 2 of the details of what I do at Google, on Wave - and that is working on the editor.
That is, the part that you type in / interact with when you're entering information on the page. When you compose an email, you're using an editor, when you modify a Word Document or write an SMS, you're using an editor. Likewise, when you create a wave and start typing, you're using an editor I help write (there are a few of us who work on it). So, what does someone working on the editor actually do?

Editing concern #1: Features
Wave uses a rich-text editor, which means we support font styles (e.g. bold, italic, coloured, sized, ..) plus allowing links, indentation, bullets, videos, images, ...etc. There are a few missing (tables, numbered lists, ...) so one thing we do is keep adding features as the are needed or seem useful.

Editing concern #2: Usability
Which leads nicely to another big part, getting the editor to work how people think it will. A simple example is things like shortcuts - if you select text and hit Ctrl-B, most people expect this to make the text bold. If you type in a right-aligned paragraph, and hit enter, you expect the next line to also be right-aligned by default. If you put your cursor inside a yellow word, and type, you want the letters you add to also be yellow.
Note that a lot of this is determined by researchers, for the coders it's often more the task of making it easy to customise - for example, if it's decided that, if you type at the end of link the new characters aren't linked (compared to typing at the end of a bold word and wanting bold characters), then we should be able to implement this without spending lots of effort.

Editing concern #3: Realtime
One of the strong points with Wave is that messages update as they type, so editing has to be able to take care of any situations that occur from these - for instance, what if you're typing and someone else deletes the line you're on, where should your selection go?
More importantly, if someone types a paragraph, say, 50 letters long, then the document you're viewing will update up to 50 times. If processing then displaying an update was slow, concurrent editing would be a huge pain - so there's quite a bit of complexity in our code to make sure that for each update, as little work as possible is done. By only updating the parts that have changed, the editing experience becomes much faster and smoother.

Editing concern #4: Internationalisation (a.k.a. I18N)
We're hoping that everyone around the world can use Wave - this means not just English speakers from US/UK/Oz/... but also those who use non-standard letters (e.g. the German ß character), non-roman characters (e.g. Cyrillic) right-to-left languages (e.g. Hebrew) and character-based (e.g. Chinese).
For at least the last case, it has added complexity due to the way the characters are usually written in editors - as you cannot get a keyboard big enough to have each character, they are entered as longer combinations of text, which needs to work in Wave. It just so happens that each computer type (Windows, Mac, Linux, ...) and browser (IE, Firefox, Chrome, ...) do things in their own way for these, which brings me to my last point...

Editing concern #5: Getting it working for everyone
Websites like Wave are viewed on web browsers - you currently are using one to view this blog, it could be Firefox, Chrome, Internet Explorer, or one of many others. Unfortunately, they all have their own separate quirks in how things work inside them, and we need to get our editor working in as many as possible (we currently support Chrome, Safari and Firefox). To add to this, the browsers themselves are programs, so they are changed or upgraded every so often, which occasionally break the way our editor interacts with them.
Thankfully it's becoming more standardised, but for now it means, when adding or changing behaviour, we sometimes must test all the different combinations, or add workarounds that are different for each browser type used. Fun...

But it's an interesting challenge which has and will keep me occupied. As my team recently blogged, we have now sent out more than a million invitations. Because editing is a part users spend a lot of time on when using Wave, it's possible that a million people have now used my code. Even if only 0.1% of those use a certain editor feature each day, that's still 1000 people per day whose editing experience I have helped, always a good feeling :)

For now, time to get adjusted to not having a long uni end-of-year break...
It looks like I'll be back in SA for Xmas then NSW for New Year's, see you then!


Popular posts from this blog

Perceiving Frequencies

Welcome to democracy

Project cutting floor