Alex Pooley's Blog

Hello there, my name is Alex Pooley and I'm a freelance web developer residing in Perth, Western Australia. My passion is in the development of web sites that solve everyday problems. Here's a gallery of some of my notable work. If you need a web site designer or developer, contact me with further details. Lastly, you can read more about me.

Baidu Owns Google In China

September 25th, 2008
Arbitrary cultural differences present opportunities

Arbitrary cultural differences present opportunities

The China Perspective reports that the Chinese native search engine Baidu has taken a 65.8% market share, against Google’s own 22% market share. In yet another blow to crystal ball gazers everywhere, Google’s fortune tellers failed to realise their prediction of market domination within five years as depicted in the charts in 2003. According to The China Perspective article, Google is in fact losing market share and Baidu is gaining.

Personally I think that too many people underestimate the value of being local and still buy in to the idea that the Internet is a wonderful device that simply scales businesses magically. At the end of the day, business needs to deliver what consumers want; and consumer demands and behaviours can change radically over geographic borders. The good news is that this leads to opportunities for those who seek them.

Fuzzy Searching With Ferret

September 20th, 2008
Searching With Fuzz

Searching With Fuzz

I’ve spent the better part of this afternoon trying to suss out a fuzzy searching system for my ruby on rails application. What I want to do is return results that include slightly miss-spelled words. I started playing with sphinx, but eventually realised that “fuzzy” in the land of sphinx really just means wildcards. So I settled on Ferret with the acts as ferret (AAF) rails plugin.

It was a bit of a battle to work out how to trigger a fuzzy search through AAF, and then a complete guess to work out how to change the minimum similarity score. So for your reference and mine, when making a multiple word fuzzy search using acts as ferret:

  • Suffix the two terms with a tilde (~) to indicate a fuzzy search
  • Suffx the tilde with a minimum similarity threshold between [0,1] to override the default threshold
  • Replace spaces with + signs. I’m not 100% sure on this one as I would have thought that surrounding the terms with quotes (”) would turn the query in to a fuzzy phrase search, but the results with quotes don’t match my thinking

E.g.

  • Company.find_with_ferret(’Sandalfr+Wine~0.7′)
  • Company.find_with_ferret(’name:Sandalfr+Wine~0.7′) # Search a column

Note that I have experienced, and read that others have also found Ferret to be unstable. Fortunately I only need ferret for offline processing. Sphinx looks really good for all other types of textual queries except for fuzzy searches.

Sergey Brin Parkinson’s Predisposition

September 20th, 2008
Scientist at work in the lab

Scientist at work in the lab

Sergey Brin has started a personal blog and in his first post he discusses the discovery of his greater than average likelihood of developing Parkinson’s disease. Despite the frank and sober tone of his post, I couldn’t help but giggle when I came across this paragraph towards the end…

This leaves me in a rather unique position. I know early in my life something I am substantially predisposed to. I now have the opportunity to adjust my life to reduce those odds (e.g. there is evidence that exercise may be protective against Parkinson’s). I also have the opportunity to perform and support research into this disease long before it may affect me. And, regardless of my own health it can help my family members as well as others.

I wish I had enough cash to fund my own research in to whatever genetic diseases I may have a predisposition too. Alas, I do not. For now I’ll just keep my head in the sand and avoid handing over a sample of my DNA to a scientific clairvoyant.