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

Thursday, March 9, 2006

What is Grid Computing?

Have been reading a lot about "Grid Computing". Many times it seems to be used just as a buzzword to attract an audience.

From the terminology it seemd to be some sort of arrangement of computers connected to each other as a Grid. These computers interacted with each other over fast communication channels and together provided a better computing environment than a stanalone computer. This understanding is quite wrong.

The Grid in Grid computing has nothing to do with the connection architecture. Grid refers more to a "Power Grid". A power grid is a system which allows some entities to generate electric power and feed it to the Grid, while consumers can get their power supply from the Grid. The consumer does not care who generates the power and the Generators do not care who exactly consumes it. The middle-men, the distribution companies, take the onus of assuring Quality Of Service and billing consumers and paying the generators.

The concept of Grid Computing is somewhat similiar. There would be entities which can provide services like Computing capacity, Storage capacity, etc normally required for computing purposes. These services would be put on the Grid and consumers would consume them as required. The provider nor the consumers need to be aware of each other's identity. The only thing to care about is the Quality of Service a provider provides and the money a comsumer is ready to pay for it. Also a consumer would be billed only for the actual usage of the service.

The important aspects of Grid Computing are ability to locate services with specified attributes, having a QOS agreement and metering the usage of the service.

Implementing Grid Computing in an organization helps to keep track of usage of IT resources by different sections of the organization. This helps in charging various sections according to their usage of IT resources and seeing these charges as an cash inflow for the IT department. The budget spending in IT departments can be controlled with this information in hand.

Given the rise in availablity of internet connectivity it is very easy even for individual users to buy services off the grid and producers to put up their services on it. The rise in internet usage and bandwidth should be a good push for Grid Computing.

Wednesday, March 8, 2006

Snowfall in Boston

Memories from Nov 2004 ...

Saw snow for the first time in my life in Boston. Its beautiful the way the tiny snowflakes drift down. Slowly they start covering the ground, trees, and everything around. Son there is nothing you can see but snow. It is a unique feeling to see all the world in mostly black and white.

Here are some photos I had clicked during the snowfall.

A snowy lot

The parking lot snowed down.


Flakes

Snow flakes bieng whipped around by the wind.



Snow flakes drifting down






A gloomy atmoshere

Looks like the pictures of winter days in London from the Sherlock Holmes books.



Enchanted Woods?

I got a eerie and enchanting feeling while looking at these trees covered with snow and a dull light illuminating them.



My car covered in snow

Had to spend a long time getting it off.

Women's Day

I am quite sure Women's day is celebrated so that the world is free not to be respectable to women on other days.

The day women are really liberated it will be their day everyday and not limited to 8th March.

Eternal sunshine of the spotless mind

How happy is the blameless vestal's lot!
The world forgetting, by the world forgot.

Eternal sunshine of the spotless mind!
Each prayer accepted, and each wish resign'd.

-- Alexander Pope, "Eloisa to Abelard"

Everyone will meet and fall in love with the person destined, no matter how far you go to avoid it, even to the extent of erasing the person from memory .......

Would you stop loving someone their memories are erased from your brain? Or would love happen again when you meet the person?

Saw the movie "Eternal Sunshine of the spotless mind" on the weekend. The movie works on different levels. The presentation is a bit different, a kind of Maze which the viewer has to walk through. One interesting part of watching the movie is moving through the maze and unravelling the story. The other is the story itself. I liked the movie on both counts, but more so for the message it conveyed for me.

The movie is a cool love story between an impulsive, wild, extrovert woman, Clementine and a shy, introvert man, Joel.

They are in love, but hate many things about each other. One fine day, on an impulse, Clementine decides she has had enough of this and undergoes a procedure wherby she erases all memories of Joel. Joel mops around for a few days and then decides that the best way out would be to erase all memories of Clementine from his brain.

The procedure starts. Joel's brain is scanned and one by one, the memories of Clementine are found and destroyed. Suddenly Joel wakes up to a level of semi-consiousness where he starts becoming aware that the memories he had treasured the most in his life are being taken away from him. He wants to stop the process but can't. Then starts a fight between Joel and the erasing machine. Joel's sub-consious mind along with whatever is left of Clementine's memories tries to hide the memories in places which would not be reached and erased. Joel has treasured Clementine the most in his life and he is really afraid to let her go away. This part is shown very well in the movie. The way Joel tries to hide away Clementine's memories is extremely well done.

Despite all efforts by Joel, Clementine's memories do get erased.

He wakes up after the procedure, not remembering Clementine nor any thing related to her. On an impulse he skips work and goes to the beach, where he meets .... ... ..... , yes of course, Clementine :)

Both of them get together and even though they have forgotten everything about each other (or because of it), start falling in love all over again, Love triumphs !

Love is not about the past .. about the memories ... about what was shared between two people. Love is about the present, about what you are, about what you are sharing with someone. Joel feared that losing Clementine's memories would mean losing Clementine, but that was not to be.

Eminently watchable .. highly recommended.

Books Vs Movies

Had taken leave for a week just to relax. Had planned on watching movies and reading books.

Somehow I don't like watching movies too much. Not as much as reading books. Given a chance I end up reading rather than watching movies.

I think the problem is if a book is good I can read it at my own pace reflecting on what is read, taking my own time. The movie moves at its own pace. If you start thinking about some particular thing that was said or shown on screen you miss the next scene. Maybe I should only watch movies on DVD using the "Pause" button liberally :)

Also while reading a book, there is lot of room for imagination. As I read I can picture the scenes as I want. In a movie you see what ever the director shows you, its also limited by the emoting capabilities of the actors.

There are some movies I do like to watch. Movies that move at the pace I want like "The Insider", Or movies which do not have a deep underlying meaning anyway, they are just a visual treat like "The Italian Job".

Maybe I should just try watching some more movies till I find some more that I like.