Google


31
Mar 09

Translate software using Google

googtext

Automatic statistical translation tools like Google Translate are getting better and better. They still often produce nonsensical and grammatically incorrect translations (depending on available language corpus, I guess), but the translations can be used to understand the crux of the text.

So, what happens if we try to apply these tools to translating software (in specific, translating gettext potfiles, which is the most widespread way of providing i18n in free software I know of)? Might be good, might be bad, and it will probably be hilarious ;-)

So, that’s my new pet project, googtext, does. It’s a small wrapper around Google AJAX Language API that allows users to upload their potfiles, extracts the message ids, passes them through the language api, and saves the resulting message to a new potfile the user gets to download.

Translations generated by googtext should certainly be redacted by a real person, but I think it’s sometimes easier to improve upon a bad translation than start from scratch (depending on the situation), so this might have some use (or just might be funny :) So, try it and let me know what you think in the comments.

The entire code for this is in the public domain, so if you want to play with the code, you can download it here. Since I couldn’t find any python module for Language API, I’ve made a thin wrapper myself (gtranslate module). There’s also the googtext utility itself (commandline), and the accompanying PHP upload script and HTML pages.

Have fun!


12
Nov 08

GMail VideoChat – the good, the bad and the ugly

2011 Update: Google came good on their promise and worked hard both on the signalling spec and the codec, so now there are multiple implementations that can interop with them. They’ve also just (June 2011) announced support for the finalised Jingle spec.

Yesterday Google began rolling out video support for GMail. The support is in form of a browser plugin, which is currently available for Mac and Windows platform.

While it’s nice that GMail gets audio and video capabilities, having to download and install plugin voids the webapp benefts (available anywhere), and raises a question on why videochat wasn’t done as an upgrade to desktop Google GTalk client.

The devil is in the (protocol) details

What’s more problematic is the way Google decided to implement these features in the protocol. As GTalk is actually XMPP (with a couple of Google extensions), the good news is that Google continues using XMPP for the new features. The bad news is that Google completely ignored XMPP standard for voice and video (a.k.a Jingle RTP) sessions, and invented their own signalling.

To make matters worse, the way they decided to implement it is really screwed up. In a video call, there’s typically two media streams – one for video and one for audio (if you don’t want audio, you can set up just the video one). Google’s videochat also uses two streams – but, instead of signalling them as two jingle contents, they bundle all the information into one stream, and then have to do ugly hacks with transport candidate naming to distinguish between ports for each of those, and so on.)

All this can be worked around with, and while it will make everyone’s client into shpagetthi code for supporting such a twisted implementation, it can (and will) be solved. The real problem is that,they’ve decided on supporting only one codec, H.264/SVC that practically nobody uses (well, up until now), and that has no free implementations (apparently they’re using the codecs from Vidyo). They could’ve added additional support for any other codec (e.g. H.263, or Theora), that could be used when calling from/to non-gmail client) .. but they didn’t.

While they might have the best of intentions, this all looks very different from the “spirit of open communications” they’re mentioning. While it’s too late for them to change the signalling protocol, I hope they’ll be more sensible about the codecs, support more open (or at least more widely used) ones, and try to play nicer with the rest of us.


5
Sep 08

Chrome this, Chrome that

Chrome
The amount of hype that the newest Google project has received is staggering. Googling for “google chrome” already gives more than 12 million results, and should soon join the 70+mil ranks of Britney Spears, Paris Hilton and other celebrities as one of the most buzzed up buzzword on the planet.

It will kill Windows, bring us into the Cloud Age, it’s been called a game changer, a Firefox/Opera/Safari killer, an operating system, the best thing since sliced bread, …

WTF. Let me repeat myself, W. T. F. The way it’s been received, they could’ve called it Google Christ.

Is the browser itself any good? Probably. Is it worth all this charade? No. In fact, the more I hear anyone and everyone and their dog blabbing about it, the more I grow dislike for it. But, whatever. Let me quickly go through killer features:

  • Tabs in separate processes. Good idea, tab isolation really helps when you hit a bloated site (and it does scale nicely on multicores). [not extremely innovative though, as I hear IE8beta already does the same])
  • Fast JavaScript implementation. Again, cool, but nothing special. Squirrelfish and TraceMonkey performance is close enough (or faster, depending on exact benchmark – but we all know benchmarks are lies anyways :). While V8 will ensure more competition, they could’ve just joined in with one of the other opensource projects (which both SquirrelFish and SpiderMonkey and Tamarin are).
  • Innovative UI. Which I confess I fail to see. The most disruptive change is placing the toolbar inside each tab. Cute (and really makes more sense), but no cleaner than Firefox (or even better, GNOME Epiphany) can do.
  • Start page. Basically what Opera does, plus a few things Aza Raskin is trying to tell us for quite some time.
  • Gears built-in. Nice, but since you already can use Gears with other browsers, not much of a change. Other browsers are moving in the same direction (with their respective solutions for offline web apps).
  • The comic. IMHO the best part of the Chrome story :-)

Are the abovementioned features great? Definitely. Are they really something extra, different, and impossible to see in a few months in any other browser? Nope.

Actually, it’s quite easy to implement most of them in a few hours of idle hacking, which I did. I proudly present you Senko Chrome, my very own competition to Google’s project (written in Python using the Gecko engine and GTK+ GUI toolkit, and probably only works on Linux). I’ve followed basically the same guidelines as Google folks, and my browser has the following features:

  • Tabs in separate processes, thus using the OS scheduler and having memory-hog protection between sites. Easy to test by going to two JS-heavy sites and using them both withouth freezes, delays and stutters (the more cores you have, the better, but already works fine on single core).
  • Fast JS performance. Not as fast as Chrome, since I’m using Firefox3 backend, but had I wanted, I could recompile it using the new TraceMonkey and achieve basically the same performance.
  • Less-cluttered UI with toolbar under each tab. Not as polished as Chrome (pun not intended), but hey, I only had couple of hours.
  • Start page, something similar to Chrome’s. Mine shows a search bar and a few favorite sites. Since I don’t track history between sessions, it’s actually a static page, but hey, I did only have a couple of hours. Besides, it’s like everything’s incognito, because I don’t save/remember anything.

Of course, not being a finished browser, many of the normal things (keyboard nav, open in new tab, right-click, etc) just don’t work in Senko Chrome, but hey, that’s beside the point.

Does this mean I think Google Chrome is worthless? Absolutely not. I think it’s an interesting browser, it’s pushing good features, and it will help stirr up the web browser competition and ultimately contribute in making a better Web for everyone.

But please, don’t get so hysterical over a bunch of features that can be implemented in an afternoon, mmkay?
Senko Chrome
obligatory Senko Chrome screenshot
(PS. If you want to try out Senko Chrome, you’ll need Python, PyGTK and Python bindings for GtkMozEmbed (Gecko embedding in GTK+). Unzip the archive in a folder and run schrome.py. If you want to run a single page (no tabs), run onepage.py directly).


18
Nov 05

GMail Draft goodness

Note: this is a repost of an old post from my previous blog(s); it’s probably quite obsolete by now and is included here for archival purposes.

I’ve just spend a few minutes writing a mail, and chatting in the background, switching between my Firefox and my X-Chat all the time. Then, in one moment, I hit the backspace key, wanting to erase a character in my mail message, and before I knew it my browser went backwards in time.

That is, it left the current page and visited the previous page in history. The current page was gone, and all my message text with it.

Enter the tonight’s hero: after visiting my Inbox in Gmail again, I’ve noticed a red Draft item in the thread in which I was going to post. Thankfully, just before my Backspace accident, Gmail saved the draft of the message.

Thanks, Google! ;-)