Sunday, November 26, 2006

Death of Indian Cricket

The king of Indian sports is dead.

Long live the king !!!

Time for other sports to make a claim for the throne.

Monday, October 30, 2006

Script to ping Technocrati

Getting your blog listed on technocrati may be a good way to increase traffic to ur site. I have written a Python script to ping technocrati with your blog details. Here is a link to the script. The script could be quite useful to automatically ping Technocrati for all your blogs using a cron job.

Python rocks :)

Sunday, October 29, 2006

Comparison of REST Vs XML-RPC

Some background of the protocols

Rest protocol uses the HTTP GET and HTTP PUT methods to communicate with an application server. For example an API for a typical application would look like


http://example.com/users/
http://example.com/users/{user} (one for each user)
http://example.com/findUserForm
http://example.com/locations/
http://example.com/locations/{location} (one for each location)
http://example.com/findLocationForm

The client typically a webbrowser needs to construct HTTP requests and parse XML or HTML responses.

XML-RPC uses XML protocol to make Remote procedure calls to execute functions defined on objects, over the network.

An RPC application might define operations such as the following:

getUser()
addUser()
removeUser()
updateUser()
getLocation()
addLocation()
removeLocation()
updateLocation()
listUsers()
listLocations()
findLocation()
findUser()

The client needs to construct an XML request and parse the XML response.

Comparison

REST is an HTTP based protocol. Whereas XML-RPC is XML based.
IMO, REST being an HTTP based protocol works best when the client is a browser. XML-RPC on the other hand is XML based. So no assumption is made about the client which is going to use the protocol.
When the client is a browser, more efforts need to be put in by the client to use XML-RPC than to use REST.

An advantage of REST over XML-RPC is that each object has its own URL and can easily be cached, copied, and bookmarked.

Advantage of XML-RPC is that it is client independant. Any sort of client be it a desktop application a mobile application, a mashup using information from your site can easily integrate with XML-RPC.

Overall I think REST has its advantages in the browser world. But as more and more applications are using the web as a platform and accessing it through a variety of methods other than web browsers XML-RPC has and edge over REST.

Conclusion

Web services should provide and XML based interface like XML-RPC. The could also provide a RESTful interface built on top of XML-RPC to support browser based clients.

Web service implementation

Friday, October 27, 2006

My view of Gandhigiri

Gandhigiri is not about not hurting anyone, its not all about putting your other cheek forward after being hit on one cheek.

It is about getting your way by causing mental pain to your opponent as opposed to physical pain.

Thursday, October 19, 2006

Wednesday, September 27, 2006

Lage Raho ... Mohandas

You can kill someone but it's impossible to kill his thoughts.

How true this is in the case of a particular Mr. Mohandas Karamchand Gandhi. First they killed the man and then over the years tried their best to kill his thoughts. The school curriculum does try to do an especially good job in making sure the kids grow up having all the wrong notions about the so called father of the nation.

But still the his thoughts linger. Sometime after college I was introduced to Gandhi the Philosopher and suddenly realized what a great person he was :) Of course I do not agree to all of his ideas, but you do have to stop and think over them.

The reason to recollect these thoughts are "Lage raho MubbaBhai". What a way to re-introduce a great man ! As a movie it's really good and very entertaining. But what takes it to an higher level is the ideas it presents.

The thoughts of Mohandas Karamchand Gandhi, trapped in tons of books, under layers of dust, neglected for years, materialize as the man himself when our protoganist, MunnaBhai, spends a few days and nights without sleep going through those books in a last ditch attempt to impress the love of his life. 'Bapu' himself then starts advising MunnaBhai on how to solve the problems he faces. MunnaBhai who resorts to "Bhaigiri" to solve problems resorts to "Gandhigiri" for the same with hilarious and thought provoking results.
The movie shows 'Bapu' as a normal human being, albeit with a lot of guts and belief that truth is THE way of life. Bapu is brought down from the pedestals and photos, to mix with normal people with everyday problems. His thoughts are made accessible by applying them to situations different types of people can identify with. And herein lies the success of the movie. Well done Rajkumar Hirani !

And as Bapu says at the end of the movie, His thoughts will live on ... materializing themselves time and again ...

-----------------------------------------------------------------------------------------------------------------------

Some of Bapu's quotes on brainyquotes.com

Friday, September 22, 2006

Truth?

You got to be religious
Insisted my Mother
This way to keep away sorrows
is better than any other

Religion does not tell me
the Truth about Life I said
of how the world functions
and how it was made

Do you really need to know
all of these things?

Don't you think attaining peace of mind
is above all these things?

But why should I surrender to delusions
when I know that the truth is out there?

I will search for the truth
no matter the path leads where

I searched for the truth
and it lead me here

but the truth was such
that I am still not sure


There are no truths
There are no lies
You are born and therefore
will live through this life

There is no grief
there is no sorrow
All you are here to do is reproduce
and for that survive till tomorrow

For this survival
you have been given some sense
And to cover the questions raised (by this sense)
we had to invent this religion non-sense

if only we could control sense
to be doled out in exact proportions
we won't be thinking "higher" things
and be concentrating on matters on hand


We would be producing worthy offsprings
and populating the earth
without needing the briddle of religion
steering us for all its worth

You got to be religious
I said to my daughter
This way to happiness
is better than any other