Summer Of Code – Six Months On

Six months ago, the Google Summer of Code finished up, and the ten Mozilla-related projects submitted their final reports. I’ve just spent some time looking into the current status of all ten projects, and thought I would share those results with you.

The ten projects were:

My original plan was to have a table highlighting the similarities and differences in current status, but it’s hardly worth it. None of the ten projects shows any sign whatsoever of work having continued after the SoC deadline. Not one. No development-related mailing list traffic, no releases, nothing. It’s as if the people vanished off the face of the earth on September 2nd.

Of the ten projects, as far as I can tell only one (Firefox in Hindi) installs in the latest stable build of the relevant product, and that’s not because it’s been updated since the release. I suspect it’s merely due to a loose XPI maxVersion setting.

The four localisation projects may have some excuse; unfortunately, it turned out that the evaluators chose four projects which were all duplicates of existing nascent l10n efforts. However, the SoCcers concerned were switched to translating other products – and those translations have not been maintained either. In one case (Hindi), the original group has very recently acquired CVS checkin rights, but for the other three, neither team seems to have made progress towards becoming an official, reliable source of a localisation in that language.

I read recently that Venture Capital firms evaluate the team behind a company much more closely than they evaluate their product idea. As it happens, as far as I know, none of the SoCcers chosen were well-known in the Mozilla community. (Of course, I don’t know how many well-known community members applied.) This may be relevant; we’d probably need data from other projects to know for certain. But perhaps the SoC form should contain a “why should we pick you” section as well as a “why should we pick your project” section.

A couple of the projects (“Bittorrent client for Firefox”, “Graphical theme builder for XUL”) were far too large for a single person working in their spare time over the summer. So it’s unsurprising that the SoCcers either got discouraged, or produced incomplete work. Evaluators have a responsibility to size projects, and assess whether they are suitable for the SoC scheme. Not every idea is.

I believe that the money was paid to all the SoCcers except for one; that person did not produce any code at all. All the people chosen wrote a final report. Several of them give roadmaps and future plans for their product, and promise that work will continue after the project is finished. However, in every case, this has not happened – for whatever reason (I believe, for example, that one project owner became a father). Still, it’s interesting that once the money is paid, the drive seems to evaporate.

The difficulty for the mentors is that Google discouraged partial payments – it was all or nothing. So if the person had done some work, they were left with the difficult decision of over- or under-rewarding the person. I suspect that, in several cases, they erred on the side of generosity – after all, it wasn’t their money they were spending! Which perhaps is fair enough, given the setup.

I don’t want this post to be seen as bashing either SoCcers or mentors; they were offered a deal, and they took it. That’s fair enough. After all, I was a mentor – and there was nothing to force the SoCcers to work on after the period had finished. But if we want the Summer of Code to be useful in the future, it’s reasonable to look at our experience and their behaviour, and see if the goals were met and, if not, how to change things.

So what can we conclude? Here are some suggestions:

  1. Evaluators need to be very careful about which projects they approve, and carefully consider their relationship to other ongoing efforts.
  2. Evaluators should evaluate people as much as, or more than, projects, and give preference to people who are already committed to being part of the community.
  3. Evaluators should be careful not too choose projects which are too large, ill-defined or overly subjective.
  4. Mentors should be permitted to pay out partial amounts. This gives SoCcers a much greater incentive to do a good job.
  5. Mentors must be ruthless about paying out in proportion to the amount of available, working, useful and well-documented code.
  6. The success of the SoC needs to be measured over the long term, not just at the end of the coding period.

If anyone reads this who was involved in running the SoC for other projects, I would be interested to see similar analyses from there.

Comment Spam and rel=”nofollow”

There has been a lot of noise recently about Google’s proposed “solution” to comment spam – the rel=”nofollow” attribute for links, which makes search engines ignore them for the purposes of ranking pages by their associations.

It seems to me that there are actually two distinct problems here.

  1. Google’s problem. “All these comment spammers are messing up our search results. We’re not making as much money as before!”
  2. Joe Blogger’s problem. “All these comment spammers are polluting my blog, and I have to spend ages deleting it all!”

Now, which problem does rel=”nofollow” actually solve? Well, it certainly solves Google’s problem – which is not surprising, given that they suggested it. The Googlebot can say “Ah, this is a blog. Does it have some links with rel=”nofollow”? If it does, I can therefore trust all the other links on the page. If it doesn’t, I won’t trust any of them.”

However, to solve Joe Blogger’s problem, spammers would have to say “Hmm. I’m going to rewrite my extremely efficient spamming engine to check each blog to see if there are links there that have rel=”nofollow” and, if there are, not bother to spam it”. But they won’t. They’ll just spam you anyway.

The only way rel=”nofollow” will ever help Joe Blogger is if so many blogs use it that blogspamming becomes entirely pointless – and then the blogspammer will just stop outright. And, given the number of old and abandoned blogs littering the web, that time is some way off.

I suppose it might have more immediate effect on spammers who target particular centralised communities, like LiveJournal. If all LiveJournal links suddenly acquire rel=”nofollow”, then the spammer may hang up his script. But for Movable Type users like me, where every installation is different, this won’t happen. I’ll be getting my daily dose of online poker and phentermine (what is that, anyway?) for some time yet.

Google Search Reveals Algorithms?

[Google seems to be featuring a lot on my blog recently, so I’ve created a new “Google” category, and added the previous posts to it.]

Google launched a Desktop Search product today, which indexes your hard drive and gives you a unified search interface for local and web content. People have already commented on how cunningly well-integrated it is (it sets up a webserver on your local machine so it can give you the familiar Google interface but with an extra tab for your stuff).

One interesting thing about this which hasn’t been mentioned is that, for the first time, Google’s secret indexing and search algorithms aren’t stored away on some remote servers, or inside some expensive appliance bought by corporations, but are in software on your desktop. Of course the EULA forbids reverse engineering, but that prohibition isn’t valid in all jurisdictions.

It’ll be interesting to see what gets discovered over the next few months…

Google Under Attack?

Does anyone else get the following “403 Forbidden” error when following this link?

We’re sorry…

… but we can’t process your request right now. A computer virus or spyware application is sending us automated requests, and it appears that your computer or network has been infected.

We’ll restore your access as quickly as possible, so try again soon. In the meantime, you might want to run a virus checker or spyware remover to make sure that your computer is free of viruses and other spurious software.

We apologize for the inconvenience, and hope we’ll see you again on Google.

It only appears for me if I use exactly those parameters in that order, including both the ie and oe parameters. A search from the main Google page now doesn’t add those two.

Anyone know what’s going on?

Google Print URL Params Analysis

I know you can have too much of a good thing, but I do find Google Print pretty interesting :-) Here’s a quick run-down of the URL parameters they are using, and what they do. (Note that the service currently appears to be Slashdotted, with 502 Server Errors popping up everywhere. Surprising to get that from a company of their size, but there you go.)

Sample URL:

http://print.google.com/print?id=ULQSG0Zs7vcC&lpg=3&pg=3&sig=QD6xDOsosnwh8uXQuXRJL5old88

  • id: specifies the book.
  • pg: specifies the page number. If you remove it, you get a list of all the pages in the book. But you can’t just increment it, because…
  • sig: some sort of hash which also uniquely identifies the page. This is presumably to stop robots spidering the site and just monotonically increasing the page number.
  • q: query – the words in this parameter will get highlighted in yellow. This indicates that they are generating the JPEG graphics on-the-fly from a computer-readable source on the back end. I suspect they’ve implemented display engines for several common book print formats.

Earlier today, URLs requires “img=<something>“, but they don’t seem to now. Instead, an lpg parameter has appeared. I’m not sure exactly what that does (why does it need two page numbers?), and I can’t investigate until they fix the server…

So What Can Google Do?

Having spent some time deconstructing Google’s careful attempts to protect the content of their Google Print partners, it seems only fair that I also give my thoughts on how they can improve the restrictions without affecting the usability. One could argue that I shouldn’t help them with this – but then, I think people will vote with their feet when it comes to DRM-like features. And anyway, it’s an interesting technical challenge.

The best method would probably be an extension of what they are doing now. Have ten nested <div>s, each of which has a background-image set, and each of which has a near-identical URL – the only thing wrong being the signature which they already incorporate into their URLs. The “print” servlet should serve up a clear GIF when it receives a bad signature. So, given that there’s no programmatic way (short of reverse-engineering the signature algorithm) to choose between:

a user would have to resort to checking each one by hand to see which was the real image. (Or writing a specialised extension to sort through and pick out the one with the largest size.) That would defeat at least some of the methods we’ve come up with so far, or at least make things a lot slower.

But when it comes down to it, they’ll probably be content with the current clue barrier.

Update: Having now read some Slashdot comments, you could combine the above technique with image slicing (where the true image was at a different stack position in each slice) to multiply the number of possibilities. Manually searching 10 possibilities for a non-blank image would be OK. Searching 100 sets of 10 slices to find the valid strips would be a lot nastier.

Google Print (again)

So it seems some other people have also become interested in Google Print’s DRM features.

From the Google Print FAQ:

Pages displaying your content have print, cut, copy, and save functionality disabled in order to protect your content.

Cut and copy obviously aren’t relevant, because there is no text, only an image.

You can invoke the Print function, but the book page image doesn’t come out because it is a CSS background. In Firefox, you can turn on printing of background images and colours in Page Setup, but it still doesn’t work, because the <div> with the image also has a background-color of white. Someone’s thought of that one :-) Presumably changing the Firefox print code to prioritise background images over background colours would make it possible to print the pages.

Save Page, choosing “Web Page, complete” actually does work in Firefox – you get all the images, including CSS background ones, and the copy of the page is perfect.

The Google Print FAQ also says:

In addition, you can choose how much of your book users will be able to view over a 30 day period, from 20% of your content up to 100%

This must be using cookies. They can’t be doing it by IP address – proxies and so on make that unworkable. The only Google Print cookie I have is a session cookie, although I have a couple of google.com-wide ones which expire a very long time from now. They could be using either of those. Still, clearing cookies would get around the restriction. I don’t know if they’d prevent access if you had cookies disabled…

Google Print Hacking Ideas

Wow :-) So there’s more than one way to skin a cat. (Actually, there are 50 ways, some of them hilarious, but that’s not important right now.)

Suggestions so far include:

  • A special-purpose bookmarklet
  • Save As on the Page Info dialog in the Suite (which, it is claimed, does work with Background images, although it doesn’t for me in Mozilla 1.6)
  • DOM Inspector sidebar
  • CSS editor sidebar
  • Drag the entry in the Media tab to a new window (doesn’t seem to work in either Firefox 1.0PR1 or Mozilla 1.6 for me)
  • Image Zoom to shrink the covering clear GIF
  • Mouse Gestures to shrink the covering clear GIF
  • Print Screen (not so good, because it’s going to degrade image quality if you then re-compress as a JPEG)

But the winner is:

  • Copy and paste from Detail section of Media tab

There’s no indication that you can do this, but it does work. Select the entry and press Ctrl-C. It works in both Firefox and the Mozilla Suite without even changing the JavaScript settings. Congratulations to Irongut :-)

Google Print, And Clue Barriers

It’s long been stated that if you put your images up on the web, there’s no real way of stopping people downloading them and using them for their own purposes. That’s still basically true, although one of the interesting things about the new “Google Print” service is the unusual lengths it goes to to prevent the average web user from doing exactly that.

Google Print allows you to search “printed books” (although Google obviously has the data in electronic form). Here’s a sample results page that you can play with as you follow along.

The first thing that prevents you from saving the JPEG of the printed page to disk is that right-click is disabled. They’ve used the standard JavaScript tricks (for Gecko, returning false from the oncontextmenu handler) to disable the context menu for the entire page. This is no problem for those taking back the web. Go to Tools | Options | Web Features | Advanced JavaScript and uncheck “Disable or replace context menus”. Score one for Firefox.

The next obstacle is that View Image on the newly-working context menu seems to show you a blank page. Actually, the printed page consists of a clear GIF <img> overlaying the actual page image, which is a CSS background on a container <div>. So if we just click View Image, all you end up with is a large transparent GIF. And because there’s a foreground image, Firefox suppresses View Background Image on the context menu, for reasons of usability and brevity.

OK, so let’s use the Media tab of the Page Info dialog. This lists all the media on the page, and has a “Save As…” button which allows you to save any media to disk. Except that it doesn’t – it currently works for images inserted using <img>, <input> and <embed>, but not backgrounds or <object>.

The next idea was to copy and paste the URL out of page source. However, Google likes to serve pages without newlines, and there are a lot of similar URLs in it, so this seemed like a pain to track down the right one by scrolling two and a quarter miles to the right. I did note, however, that they are using <style> inside the <body>. Tut tut.

So instead, we can try and delete the clear GIF from in front using the DOM Inspector. We inspect the URL, locate the GIF and press Delete. Bang! The entire image disappears! How did that happen? Well, the <img> was providing a size for the <div> – so when the <img> disappears, the <div> collapses. No problem: we manually edit the CSS style rules to give it a width and a height. This allows us to view the background image again. However, the DOM Inspector doesn’t support the content area context menu, so we still have no way of saving it!

Next idea: use the DOM Inspector to inspect the entire browser XUL. This means that the context menu will still work. It’s more difficult to do, because you can’t locate elements by clicking in the content area – it only works for the chrome. Still, we finally track down the clear GIF <img> and delete it. Boom! This time Firefox crashes (taking with it an earlier version of this blog post.) :-(

OK, let’s try another approach. Let’s find the surrounding <div> in the DOM Inspector, look at its computed style, and copy the URL out of it. Except that the Computed Style view doesn’t support copying. Undeterred, and feeling close to the goal, we view the applied styles for the <div> and try and copy the URL out of the individual background style rule.

Success! This works. We can chop off the CSS gubbins, paste the result into a web browser URL bar, and finally get an image we can save.

In fact, you can also get the URL of the page graphic by viewing the source. It turns out that it’s not as hard as I made out, because currently, the <div> in question has a sensible class name:

.theimg { background-image:url("http://print.google.com/print?id=ULQSG0Zs7vcC&pg=3&img=1&sig=gv2nFptEf0dj7Gzb8eZ4U8UdtUo") }

so it’s easy to find.

So what’s the point? Well, this is an example of what I call raising a clue-barrier. At my university, they didn’t have the resources to chase after everyone playing online games, but needed to prevent them from becoming a bandwidth problem. So, they blocked the port used for a popular online game’s “server discovery” mechanism. Those without clue fired up the client, tried to find servers, didn’t find any and gave up. However, if you bothered to research server IP addresses and type them into the client manually, you could play to your heart’s content. The clue barrier filtered out a large proportion of the population, thereby preventing bandwidth problems.

The key characteristics of a clue barrier are that it’s easy to put up, and it’s not perfect, but it’s good enough to solve the problem. Google’s techniques won’t prevent anyone technical from saving their images to disk, but it will prevent 99.99% of people (at least until someone writes a specialised Firefox extension). And for Google, that’s good enough.