When less is less: google code dead

When Steve Jobs given some suggestions to Google, I fear he was still upset for the Android-carbon-copy of the iPhone. Because Jobs suggested Google to focus on a small subset of product (no more then five) and Google did it. And google started killing a lot of lab projects.

Google Code Search was one of this projects.

Today I hit this nice article on how google code search was implemented, and I find it very nice. So I’d like to point it out, because it is a worth read with also an implementation attached to it.

I like to know if there is a Redis+{Ruby|Python|Java} code which is able to store a inverted tri-gram index on redis, because it would be a nice shot.

Someone out of there can help?

How to display an animation during page loading

Old web site requires sometimes to show a big “Loading…” gif in the front of the page. It is not trivial to do it, especially if you have already plenty of jQuery forms developed, with complex form submission, and half the site in an ajax form.

A small solution of this problem is to use the jQuery delegate function…and a lot of debugging.

Try out this code:

function showLoadGif() { $("#downloading").show(); };
	$("body").delegate("form:not([target=_blank])", "submit", showLoadGif);
	$("a[target!=_blank] > img[src*=yourResetButtonImage]").parent()


The first delegate apply to the standard form submission, and works well on plain vanilla html pages.

This code avoids to fire up when you are opening pop ups via form, hrefs or JavaScript alert.

When the new page is loaded, the gif will disappear with the entire old body.

The last line ensures also images contained in link will be properly managed: for instance menu images , outside forms.