Hzzah: AJAX Searching, Grouped Searches, and Version Numbers

July 15th, 2008

AJAX Searching

Thanks to jQuery and the jQuery History plugin, searching is now done via AJAX but it doesn’t break your back and forward buttons.

The navigation callback in JavaScript ought to be more of a proper state machine, but considering there are only 3 states (blank, about, and searching) I’m not too concerned.

Grouped Searches
I played around with hzzah a bit more after I noticed its search results were far worse than those on Yahoo.com

It seems Yahoo.com only returns 1 or 2 hits per domain, whereas the BOSS API will happily return hundreds all from the same site.

This means if you’re vain like me and search for your name, you get pages of links to your blog and nowhere else. The Yahoo.com results are pretty good and only return 2 hits for my blog.

So I grouped hits by domain name, but since I broke pagination in the process, searching for myself is completely worthless now.

I have some ideas on how to fix that, but they’ll have to wait for another time.

Version Numbers

Squint at the bottom of the page to see the current revision number.

Anybody know how to have that increment automatically when I do bzr up on my server? I haven’t looked for a post-update hook which would do the trick.

Can you get any more private?

July 15th, 2008

I just switched Hzzah.com’s Apache configuration to use this line for logging:

CustomLog /srv/hzzah/log/access.log "0.0.0.0 %l %u %t \"%r\" %>s %b"

No more IP addresses logged! Only if you cause an error (404 or 500) will your IP address be logged.

So no javascript, css, or images from remote sites; no cookies; no ads. Can you get any more private?

I did just add jQuery and a bit of JavaScript, so if web2.0 makes you queasy, you’ve been warned.

I should mention that hzzah’s primary goal is for me to have fun with Django, not privacy. So while I’ll definitely warn you if I make any changes, right now its not a top priority to pursue extreme privacy.

Introducing Hzzah!

July 15th, 2008

from the I-can-haz-a-search-engine department…

Update: Sorry about the tacky donate link all. I tried to hide it from feed readers with WordPress’s <!–more> feature, but evidently that doesn’t apply to feeds. :(

When it comes to market share, Google is to Searching as Microsoft is to Operating Systems. Thankfully Google has won their dominant position by creating a really amazing product (you can find plenty of discussions on why Microsoft is on top elsewhere).

Recently Yahoo! opened up their search APIs for anyone to use along with a handy Python library. In a time when Yahoo’s very existence is being threatened, I felt a pang of nostalgia for the search engine that fed me decent results for “free dos games” throughout the mid-90s.

So last night I whipped up a little search engine called Hzzah!*

 
BSDtastic!

Features:

  • Simple
  • No ads, cookies, or even JavaScript (at the moment at least)
  • Open Source! BSD to be precise.
  • Did I mention simple? That’s really all it has going for it…

Read the rest of this entry »

WordPress Rocks at Updates

July 15th, 2008

I feel I owe it to my friends who put up with my senseless Python fanboying to admit WordPress is not only a great blog engine, but rocks at updates.

I just upgraded from 2.5 to 2.6 by doing a simple svn switch http://... and then logging into the web admin interface. It took about 30 seconds to complete.

Now compare that to my last experience upgrading Trac from 0.10 to 0.11… ugh.

I love you Trac. Python just lacks an easy and efficient web app deployment method.

JavaScript Collation Fail

July 14th, 2008

In JavaScript, the localeCompare method on Strings seems like a great way to properly sort strings, but its not:
localeCompare Javasript method in 4 browsers
Hint: The last line should all look the same. At least I expect Firefox and Opera to agree. You can’t expect much from IE6.

For kicks try out other browsers and post the final sorted list in the comments (hopefully my blog supports unicode).

Thunderbird Import Fail

July 7th, 2008

Do I really need to see this?
Thunderbird screenshot with only 1 option: Don't import anything