jump to navigation

Better than Google ? July 29, 2008

Posted by razasayed in general.
Tags:
add a comment

When it comes to search engines , Google is definitely the de-facto choice of people all over the world . And it would be really very difficult if not impossible for any other search service provider to match wits with Google. But still attempts exist in this regard and one of them is a search engine built by ex-Google employees, called Cuil (pronounced “Cool”, but its Irish for “Knowledge”). The makers of this search engine claim that it searches 3 times more pages than Google does.

Also,as you can see from the screenshot below it also includes pictures along with the search results.

So is Cuil really better than google search ? . Give it a test drive and decide for yourself .

The Missionaries and Cannibals problem and AI July 27, 2008

Posted by razasayed in programming.
Tags:
35 comments

The Missionaries and Cannibals problem is a cute little puzzle, which involves moving 3 missionaries and 3 cannibals from one end of the shore to another  in a boat which can accomodate at most two people at a time . Also, if the cannibals outnumber the missionaries on one side then the missionaries get eaten up by the cannibals.

Well, this sounds like just another one of those river-crossing problems which most people are familiar with since childhood ,  so whats so special about this one ?. Actually, the missionaries and cannibals problem is a famous toy problem in AI (Artificial Intelligence), because it was the first paper that approached problem formulation from an analytical standpoint . Many computer science students might already be familiar with this problem, and also others like the Towers of Hanoi, n-queens problem, the knights tour etc…

I have posted the puzzle below , so that you can have some fun with it  . Its actually a simple problem and i managed to solve it in 11 moves, see if you can do it in less than that  🙂 .  If you do, then hats off to you , because i dont think it can be done in less than 11 moves . Because,with 1 missionary and 1 cannibal 1 move is required,with a pair of each 5 moves, and here in a case of 3 each, i required 11 moves.So it seems that there is a pattern in the minimum number of moves required. 1 = 12+0, 5 = 22+1 , 11=32+2 .

I thought it would be fun trying to develop an algorithm to solve the problem for the general case of n missionaries and n cannibals  , for which i thought the minimum number of moves required would be n2+(n-1). But luckily for me, before i embarked on my search for the solution , i came across some information related to the problem (thanks google ! ), which pointed to the fact that my search would never end ! . The special thing about this problem is that it does not scale up ! . For 4 or more missionaries and cannibals, the problem has no solution ! .

Alright, enough of math !!…let the game begin 😉

Vodpod videos no longer available.

Access the GPRS service of your cellphone on a Linux machine via bluetooth July 16, 2008

Posted by razasayed in Hacks, programming.
Tags: ,
add a comment

Sometimes when im on the move and also there is no wifi nearby I find it convenient to access the Internet using the GPRS service on my phone . And even more convenient is accessing the same on my laptop. So,here are four simple steps for using the GPRS service of your cellphone on your Linux box via bluetooth. Actually, as they say in Linux “theres more than one way to do it “, there could be other ways of going about this, but this one works for me (and also the only one i tried 😉 ). So here we go…

Step 1) Make sure you have the bluez-utils package installed . If your bluetooth dongle is recognized as soon as you plug it in then you already have this package installed. If not install it from synaptic or by using the following command.

sudo apt-get install bluez-utils

Step 2) Plugin the bluetooth dongle and activate the bluetooth on your mobile.

Step 3) Now, the first time you setup your Linux machine to access the GPRS service on your mobile phone via bluetooth, there are quite a few steps involved , so i wrote a simple shell script for automating the connection setup. Now all that needs to be done is run this script , and voila !, our connection is ready 🙂 .

You can access the script over here. Save it as connect_gprs.sh on your machine . After you run this script , minimize the terminal window where this script is running. To disconnect press Ctrl-C at the terminal.

Step 4) Now, in your browser, assuming you are using Firefox, go to Tools->Options->Advanced->Network. Click on Settings. Then from the menu select Manual proxy configuration . And enter the value for the Http Proxy and Port . Since you are following this tutorial, i assume you already have the GPRS service on your phone . And in that case you can get the values for the Http proxy and port by looking at the access point settings on your phone.

Thats it . Have fun 🙂

Bill recommends Ubuntu July 12, 2008

Posted by razasayed in general.
Tags: ,
add a comment

Hey,this is top secret stuff, but anyways…. 😉

Access the Web offline with Google Gears July 10, 2008

Posted by razasayed in Hacks.
Tags:
1 comment so far

“Offline web access”- does this term sound paradoxical ?.  Well, it should not if you have heard of a technology called Google Gears . Google Gears is actually an open source browser extension/add-in , available for both Firefox and Internet Explorer, which makes web applications available offline.

Google Gears

The way it works is that a gear enabled website allows you to download some portion of the website that you commonly work with onto your local hard drive. A case in point is Google Docs . I can for example have a copy of my google docs on my local machine . Now, even when im not connected to the Internet, i can continue to work with my google docs offline , and the next time I go online , my changes are automatically synced with the online copy…pretty neat, huh ? 🙂

Not every website though on the web is currently gears enabled , however there many popular ones like Google Docs, Google Reader, Zoho etc…which support offline access via gears. And the list continues to grow. WordPress, recently joined the bandwagon of gears enabled websites.

To get started with using Google Gears, simply download the extension from http://gears.google.com/?hl=en

Google Docs

Then , to access your Google Docs offline just click on the Offline option available on the top right hand corner when you login to Google Docs. However, currently Google Docs supports viewing and editing documents offline , but spreadsheets can only be viewed offline . I would love to see support for offline spreadsheet editing too in the near future.

To use Google Gears with WordPress just click on the Turbo option at the top right hand corner when you are logged into wordpress. When this is done the images, javascript, and CSS used inside the WordPress dashboard would be copied to your local hard drive , so in case of a slow connection  this downloaded data would act as a local cache to speed up your dashboard . The posts are not copied , so offline viewing/editing of posts is currently not possible .

And just in case you are wondering where exactly on your local hard drive this data gets stored then below is a list of these locations.

  • Windows Vista – Internet Explorer
    C:\Users\%USERNAME%\AppData\LocalLow\Google\Google Gears for Internet Explorer
  • Windows Vista – Firefox. Database files are stored in the user profile directory.
    C:\Users\%USERNAME%\AppData\Local\Mozilla\Firefox\Profiles\{PROFILE}.default\Google Gears for Firefox
  • Windows XP – Internet Explorer.
    C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Google\Google Gears for Internet Explorer
  • Windows XP – Firefox. Database files are stored in the user profile directory.
    C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Mozilla\Firefox\Profiles\{PROFILE}.default\Google Gears for Firefox
  • Mac OS/X – Firefox. Database files are stored in the user profile directory.
    Users/%USERNAME%/Library/Caches/Firefox/Profiles/{PROFILE}.default/Google Gears for Firefox
  • Linux – Firefox. Database files are stored in the user home directory.
    ~%USERNAME%/.mozilla/firefox/{PROFILE}.default/Google Gears for Firefox

So, the next time you are on that cool web 2.0 website, do look out for offline access by google gears..have fun 🙂