Monday, December 31, 2007

Finding friends of friends with more no.of mutual friends in orkut

I have been waiting for a long time for finding my friends of friends in orkut, who have more no.of mutual friends with me. If a person has more than 5 common friends, I may know that person. Of course, there are many cases, in which this does not apply. But, instead of browsing all the friends of friends, and finding my friend, this would be easier. I posted in orkut groups, and requested my ex-colleague Jude Britto to add this feature. By the way, Jude Britto is working for google, and he added the feature find your gmail contacts in orkut.

In the last 3 days, I tried to find out the probable friends, and it was not as difficult as I thought.

I have around 340 friends, and if I can get all the friends list pages of all my friends, then it would be easy to get the probable friends. wget is a very nice utility to download anything. For authenticating the session, we need to pass the username, password, and some other information to orkut as post data. It would be time consuming to findout all the form information. I used Live http headers extension in firefox. With that, if you do any operation in any website, it will store all the http information. For example, if you start Live http headers, and login to orkut, it will store all the requests that it had sent for logging in. It would take around 4-5 requests before displaying the home page. We can use that http headers to build wget request. There are few options --load-cookies, --save-cookies, --keep-session-cookies in wget. With that, we can have a proper session with wget.

Once the authentication is done, rest all can be automated. I have done in the following way.

  1. The script takes my id, and downloads my profile page by wget.
  2. VIM parses that file, and finds out no.of friends, and a C program generates the URLs for all the friends. (It is possible to generate URLs also with VIM. I did not remember how to do it at that time)
  3. wget gets all friends list pages of all my friends.
  4. VIM parses all the files, and stores all the friends of friends in plain text format.
  5. A program written in Java takes all the friends of friends, and finds out probable friends.

I have around 50,000 friends of friends. Around 1000 friends of friends have more than 5 mutual friends. It was much more than what I expected.

After getting all this data, I was wondering, if orkut adds this feature, would I use it or not? Except for the feature, find your gmail contacts in orkut, In all other features, orkut uses paging, and shows 10-20 items in a page. If I have to see all the 1000 friends of friends, I may have to open 50 pages, and it would be tedious. But, with my script, I could get all the details in a single plain text file, with one line for one friend of friend. So, it was very easy for me to find out my friends. If orkut had implemented this feature a week back, I would not have tried to use this feature, and would have browsed all the 50 pages, and would not have learned about logging into a website programmatically. So, I should be thankful to orkut for delaying this feature. ;)

I would like to thank Deepak Manohar for teaching me few VIM commands for parsing the html files.

Sunday, December 30, 2007

Cartoon of the year



The text inside the cartoon is, "Monarchy in Nepal is abolished, and all the powers are transferred to the Prime Minister".

The text outside the cartoon is, "It would be good, if we also abolish monarchy, and transfer all the powers to the Prime Minister".

Thursday, December 27, 2007

Love poem

its a love story
of two strange people
who never knew they could
fall for each other
when they first met
they only ended up fighting
but slowy it became clear to them
that they sure shared something

a small problem happened
when pride overtook him
he thought she was
less smarter than him
she would solve a puzzle
and he would solve it again
he would tell her
that she was simply
an idea away from him...
he said that he always gets this idea
and then he does all that she can
and probably much more...

one day she decided
his behaviour had to be checked
she thought for a while and
then she said...
fine, then you sure
can do everything
but if you are strictly more smart
you have to do the following
think of some puzzle
that you can easily do
and then give it to me
to solve and lets see if
i can't do....

all the king's men and
all the king's horses
could not come up
with a puzzle like this
the duo got closer and
the world around more curious

today as it stands
the puzzle is still not found
and hence the duo
lives happily close bound
they two are well known
as simply, inseparable
P is the queen and
NP the king of our fable...


Shamelessly copied from http://nutan.blogspot.com/2007/02/valentines-special.html.

If you cannot understand this, or thinking of why did I write love poems here, this poem describes the well-known computer science problem "P=NP or not"? If you have the solution for this, you would get minimum million dollars, and turing award (equivalent to Nobel prize in Mathematics), and many more.

Thursday, December 20, 2007

Sharing in google reader

Google added another good feature to google reader. You can now share items in google reader with everyone. If you just open http://www.google.com/reader/shared/04007765351263823119, you would see all the items that I shared. The feed for my shared items is http://www.google.com/reader/public/atom/user/04007765351263823119/state/com.google/broadcast.

Many times, I copied and pasted interesting articles into my blog from some other place, so that readers of my blog would read that. With this shared items, I don't need to do that. But, users of my blog have to subscribe to my shared items as well.

Eventhough I have more than 800 contacts in my contact list, only 18 people are using google reader, and only one person (XP) is sharing his google reader items. Even then, I got so much information from his shared items. So, all of you please start sharing your items, and either give me the link, or accept me as a friend in google.

Do not use plastic bags

Do you use plastic bags to store food in your refrigerator? Do you have plastic bin-liners in your home to collect and throw garbage? Have you ever asked for "one more plastic bag" in your local supermarket while shopping? If you run out of gift wrapper, do you conveniently carry the gift in a plastic bag and present it?

If you answered "yes" to the above questions, then you are plastic-dependent. In fact, most of the world is! Every year, around 500 billion (500,000,000,000) plastic bags are used worldwide. So many that over one million bags are being used every minute and they're damaging our environment. Here's how:

* Plastic bags often take up to 1000 years to degrade! When they are thrown away, they cause potentially eternal havoc clogging drains, creating backflow in sewage pipes, spreading disease through pond-like accumulation of sewage, breeding mosquitoes by storing stagnant water. Do you know that they are responsible for the Mumbai floods every year? It is such a big problem that Bangladesh has a national ban on its use, blaming plastic bags for the floods during monsoons that claim so many lives every year!

* The effect of the poly-bags is deadly in the waters too. Being light they are carried far and wide and eventually into the sea, causing immeasurable harm to marine life. The river Yamuna, for example, receives hundred of poly-bags everyday, with flowers in them as offering to God.

* The mountainous regions are not spared either. Plastic bags get buried in the ground, destroy the local eco-system, and retard the soil's carrying capacity. Due to their non-porous nature they seal off air, thus affecting plant life. This in turn reduces the vegetation and hence soil binding, and increases the risk of landslides.

* Poly-bags have harmful effects on animals. Jaipur reported a case of 40kg of plastic bags recovered from the stomach of a dead cow! All over the world, millions of birds, fish and other animals meet their death by mistaking plastic bags for food (or trying to eat the food we throw away in such bags).

* Plastic bags contain toxic dyes that can pass into foodstuffs, endangering human health.

* Burning plastic bags releases toxic gases into the air, creating climate change.

* STOP using plastic! Use recyclable paper bags, reusable cloth bags, jute bags, etc as alternatives.

Let us all collectively work to save our beautiful planet and make it a better place for our children !

Tuesday, December 18, 2007

Default feed for blogspot

The default feed for all the posts in blogspot is
http://<blogname>.blogspot.com/feeds/posts/default

and the default feed for all the comments in blogspot is
http://<blogname>.blogspot.com/feeds/comments/default

Sunday, December 16, 2007

Tab Menu in VIM

There is a nice plugin for tab management in VIM. If you add that script to plugins directory in VIM, then a new menu would come for Tabs. That menu would list all the files that are there in different tabs. If you click on any file name, it would take you to the tab of that file. This will work similar to tabs in crimson editor, or editplus. VIM 7.0 already has all the features that are required for beginners. With this feature, one can easily manage many tabs. You can get the script from

http://www.vim.org/scripts/script.php?script_id=2096

Few Tips on opening files in VIM:

If you want to open a file in the existing VIM in a different tab, use
gvim --remote-tab-silent < fileName >

If you want to have a right click option which always opens the file in a new tab in existing VIM (Opens a new VIM if there is no existing session), then do the following.
Open Registry Editor (regedit)
In My Computer -> HKEY_CLASSES_ROOT -> *
Add a new key "shell". In that add another new key "gvim", and in that
create a key "command". Change the default value of "command" to
C:\software\Vim\vim70\gvim.exe --remote-tab-silent "%1"

(Remove " in shell, gvim, and command. For gvim.exe, use the path of your installation)

With this, you will get a right click menu item gvim, and if you click on that, it will open the file in a new tab in the existing VIM.

With VIM 7.0, editing multiple files became as easy as any other editor. So, start using VIM.

By the way, this is my first ever contribution to open source. I never expected that, my first contribution would be in the most matured product. If you like it, or want to give feedback, please send me a mail. My mail id is this blog name at gmail.com.

Friday, December 14, 2007

New and good feature in Orkut

Orkut has added a new feature, "find gmail contacts on orkut". This is really a nice feature, and I have been waiting for this kind of feature for a long time. At last, they are adding good features because of the competition from facebook and others. I hope they will continue to add good features like this.

The feature name is obvious, and I don't need to explain anything in that. One thing they missed in this is, It will show all the people who are in orkut, but not your friends. But, it does not show the email id for the corresponding profile. If the person does not use their name in the orkut profile, then it becomes very difficult to find out who is that person. If they give mapping of mail id to the orkut profile, it would be really good.

By the way, I added 23 friends by this feature (even though I had 323 friends in orkut). :)

Wednesday, December 12, 2007

Stock Market (again)

It was autumn, and the Red Indians on the remote reservation asked their New Chief if the winter was going to be cold or mild. Since he was a Red Indian chief in a modern society, he couldn’t tell what the weather was going to be. Nevertheless, to be on the safe side, he replied to his Tribe that the winter was indeed going to be cold and that the members of the village should collect wood to be prepared. But also being a practical leader, after several days he got an idea. He went to the phone booth, called the National Weather Service and asked ‘Is the coming winter going to be cold?’
‘It looks like this winter is Going to be quite cold indeed,’ the meteorologist at the weather service Responded.

So the Chief went back to his people and told them to collect even more Wood. A week later, he called the National Weather Service again. ‘Is it going to be a very cold winter?’
‘Yes,’ the man at National Weather Service again replied, ‘it’s definitely going to be a very cold winter.’

The Chief again went back to his people and ordered them to collect every scrap of wood they could find. Two weeks later, he called the National Weather Service again. ‘Are you absolutely sure that the winter is going to be very cold?’
‘Absolutely,’ The Man replied. ‘It’s going to be one of the coldest winters ever.’

‘How can you be so sure?’ the Chief asked. The weatherman replied, ‘The Red Indians are collecting wood like Crazy.’

This is how stock markets work!!!

Wednesday, November 21, 2007

CAPTCHA - Word verification

CAPTCHA is a type of challenge-response test used in computing to determine whether the user is human. "CAPTCHA" is a contrived acronym for "Completely Automated Public Turing test to tell Computers and Humans Apart".

The following is a CAPTCHA.




There are two good articles about CAPTCHA on codinghorror.

http://www.codinghorror.com/blog/archives/000712.html

http://www.codinghorror.com/blog/archives/001001.html


The purpose of CAPTCHA is to make sure that, a human can do it very fast, but an automated script/program cannot do that.

If you take a normal programmer, who does not spend money on buying very expensive softwares, then breaking even the following code is also non-trivial, but it is very easily readable by humans.



If you have so much money (more than $6000), then you can break even the following code with 50% chance.



For this purpose, yahoo, gmail, and Hotmail came up with even more difficult CAPTCHAs. Sometimes, these are difficult even for humans. If the CAPTCHA is difficult for human, then the basic purpose is violated (i.e., not allowing a human to visit their website).

I like rapidshare approach very much. When you see the CAPTCHA image that they mention in rapidshare, it is very easy to understand. You don't need to spend any time to read the text in that. And, all the images, and characters in all the images are exactly of same structure and size. So, it tempts so-called programmers to write a script which cracks that. But, writing the program is not as simple as one can think of. Because, they use all the techniques of images while creating an image. There are few places in the image which one thinks as white, but actually it is black, and vice-versa. Because of these things, it would be very difficult to write a program. Even if someone writes, by the time, they finish it, rapidshare will change the image to another format like changing the size, and adding different shades etc. Again you will come back to square one. At the end of the day, you may need $6000 software to crack it. But, their CAPTCHA does not give any problem to the users. Where as other CAPTCHAs gives so many problems to the users.

There is another type of CAPTCHA in some other website.

Add 1 to 2 and type the result in the below text box.

For human, it hardly takes any time to find the result. Where as for computer, it is not trivial. If we make it even more complex, then it becomes even more difficult for computer. For example,

add 1234534512 to 1232429530.2322, and multiply the result with 12143298.4345 and divide it by 983435.234, and ignore this value, and put 4 in the below text box.

Something like above will be very easy for a normal user who can understand english properly, but, cannot be cracked by a computer in the next few years.

This is one area in which google is not meeting my expectations. understanding CAPTCHA of google is taking few seconds. I hope google will make it very easy for humans soon.

Tuesday, November 20, 2007

Google Maps and Google Earth

I have been using google maps for quite a long time. I thought google earth is also similar, but it is a desktop application. Today only I realized that, google maps cannot be compared with google earth. With google maps, we can get info upto main roads. Where as in google earth, we can see even our houses. I missed a lot, because of not knowing this earlier. Why is not google providing the same on their web version?

Tuesday, November 06, 2007

Useless Experiments by Government

In New Delhi, platform tickets will not be sold in railway station from Nov 7th to Nov 15th. Government says that, it is to reduce the rush in the railway station. Railways is selling around 65,000 platform tickets per day at the railway station, and if they don't sell, then there will be less rush in the railway station. Railways claim that, special permission can be granted for special cases.

I feel it is just another useless experiment by the government. It creates so many problems for senior citizens, and women with kids. I don't think taking special permission would be that much easy for an ordinary person. If an ordinary person wants to go inside railway station, first he/she needs to know that, they grant special permission for few people. They needs to know whom should they approach for that. Then, they have to find out the criteria for the special permission, and the list goes on. In that one week, Railways is going to lose 13.65 lakh rupees, because of this experiment.

Of course, for everything, there would be a work around. Just take a train ticket to next railway station, and you can go inside without having any platform ticket. If there is another railway station near by this railway station, then most of the time, you can get a ticket for less than Rs.5. It is better than platform ticket, because, we can stay whole day in the railway station, where as with platform ticket, we can stay only for 2 hours.

Friday, November 02, 2007

Stock Market

Once upon a time in a village, a man appeared and announced to the villagers that he would buy monkeys for Rs. 10/-

The villagers seeing that there were many monkeys around, went out to the forest and started catching them.

The man bought thousands at Rs. 10/- and as supply started to diminish, the villagers stopped their effort. He further announced that he would now buy at Rs. 20/- This renewed the efforts of the villagers and they started catching monkeys again.

Soon the supply diminished even further and people started going back to their farms. The offer rate increased to Rs. 25/- and the supply of monkeys became so little that it was an effort to even see a monkey, let alone catch it!

The man now announced that he would buy monkeys at Rs50! However, since he had to go to the city on some business, his assistant would now buy on behalf of him.

In the absence of the man, the assistant told the villagers. Look at all these monkeys in the big cage that the man has collected. I will sell them to you at Rs.35 and when the man returns from the city, you can sell it to him for Rs. 50/-

The villagers squeezed up with all their savings and bought all the monkeys.

Then they never saw the man nor his assistant, only monkeys everywhere!!!

Welcome to the 'Stock' Market!!!!!

Friday, October 26, 2007

Surprise gift

How do you define a gift as surprise? Atleast, I define it as follows.
If I receive any gift from some one, or at some time when I did not expect. Even if I am expecting some gift, but, if I get one which is very valuable to me (not necessarily in terms of expense) than I had expected.

If somebody says, they would give me a gift, I expect a normal gift. But, if they say, they would give me a surprise gift, I would expect a bigger gift. But, if they give me a gift, when I don't expect, then it would be a surprise gift.

It seems Chief Minister of Jarkhand, Madhu Koda does not even know these basic things. When Dhoni's team won the Twenty 20 world cup, he announced the very first "Jarkhand Rathna" award to Dhoni, and he also told that he would give a surprise gift to Dhoni when he comes to Jarkhand. When Dhoni came to Jarkhand, he presented one luxury car to Dhoni (as surprise gift). Is this a surprise? Atleast, for me, it was very very below expectation.

He announced the very first "Jarkhand Rathna" to Dhoni, and he told that he would give a surprise gift to him. Giving the very first "Jarkhand Rathna" is very big gift, and it is a surprise gift. If he is saying, he would give another surprise gift to him, the expectations would be much much higher. But, he gave just a luxury car as the gift. I agree, that car is very expensive. But, cannot Dhoni buy that himself? He is paying Rs.4 crore as Income tax this year. Cannot he buy one car like that? He can easily get one without any problem. But, He cannot get the very first "Jarkhand Rathna" that much easily. That Award is really a surprise gift. If he had announced car immediately after winning the match, and announced "Jarkhand Rathna" as the surprise gift, it would have been really surprise. But, he did the other way.

By the way, Is there anything that the CM can give bigger than "Jarkhand Rathna" to Dhoni? I doubt it.

Thursday, October 25, 2007

Joel On Software

After a long time, Joel Spolsky wrote an article about software. As usual, another wonderful article by him, that every developer/manager in software industry should follow, but 95% do not follow.

This time it is not posted on http://www.joelonsoftware.com/
You can read the post from

http://www.inc.com/magazine/20071101/how-hard-could-it-be-five-easy-ways-to-fail.html?partner=fogcreek

Thursday, October 18, 2007

Love Marriages

If you have read any telugu news paper today, or watched any telugu channel in the last 24 hours, you must have heard this news.

Megastar Chiranjeevi's second and youngest daughter Srija (19) married Sirish Bharadwaj (22) secretly in Arya Samaj temple in Hyderabad. Srija says that, she has been in love with Sirish for the last four years, and her family does not like this. So, they stopped her education also. That's why she married him without the consent of their parents.

Allu Aravind told media that, she told about him only few days back, and they are still discussing about that, and she suddenly did like this.

As a person who just reads/watches the news in websites/news papers/TV Channels, we cannot comment on what is correct and what is wrong, because there are many things that are internal to them which lead to this, and we don't know about those.

I am not talking about specific to Chiranjeevi, but, in general parents. If something is bad, but inevitable, then probably going ahead with that bad in a better manner is a good option rather than making it very worse. In this specific case, if she had married him in a traditional way similar to any other marriage of any big personality's daughter, it would have been a news as a celebration. Now, it is a news in other way. If they had married traditionally, nobody would have bothered about what the bridegroom is doing, how much wealth he has etc. But, now, everyone cares about every damn thing.

I think the main reason for this type of marriages is, parents take it for granted that, their daughter will not do like this. Even after hearing news like this, still the orthodox parents say that, my daughter will not do like this, because, we are not like that big personality, and we are taking care of our daughter very well etc, and they will tell like this till their daughter does like this. That is the generation gap.

Let's hope all the parents take care of their daughters very well, and do things needful so that, nobody would be unhappy at the end.

Sensex

The base value of sensex was 100 on April 1st, 1979. In July 1990, it reached 1000. And in early June 2005, it was less than 7,000. By Oct 2007, it reached 19,000. Such a big spike in 2 years 4 months. But, still I am hearing comments from many people saying that, economy of india is very good. That's why we are seeing this growth. It will grow, or it may stabilize. But, it won't fall that much. I am not an expert in stock market, so cannot comment on it. Just for food for thought, these are the two charts for US, and Japan stock markets.




This chart is for US Stock Market (NASDAQ), and stock market has not reached 2000 level till now.



This chart is for Japan stock Market, and the stock level has not reached the peak level in 1985-90, even after 20 years.

Most of the time, and from most of the people, I am hearing that this will not happen to india. I don't know what will happen. Time will tell whether it is true or not.

Monday, October 15, 2007

Bus Service in Cities.

I would like to see a city which has very good city bus facility. Atleast in Bangalore, and Hyderabad, the bus service is very bad, and because of that most of the people who can afford for auto/cab, would not use bus. Eventhough government can do many things to improve this, but, it is not doing it.

Bangalore - Ordinary City buses
Don't think of sitting at any time, unless you are getting in at the starting point. If you are travelling at peak time, then don't even think of comfortable standing.

Bangalore - Volvo City buses
Most probably you will get seat. But, buses are not frequent. Not all routes have volvo buses, and even the routes that have these buses, don't have high frequency. One may have to wait even half an hour to catch one.

Hyderabad - Ordinary City buses
Don't think of sitting at any time, unless you are getting in at the starting point. If you are travelling at peak time, then don't even think of comfortable standing.

Hyderabad - Metro City buses
At peak time, this is as worst as ordinary city buses. At non-peak time, you may get a seat to sit, or you can stand comfortably. Frequency is reasonable, but not very high.

The main reasons for a person to travel by auto or cab are
1.The bus facility is so pathetic that, they cannot afford to travel in that. There are few categories in that
1.1 The person wants to get into the bus, but cannot get in. (This happens very frequently at peak times in both Bangalore and Hyderabad).
1.2 The person wants to stand comfortably.
1.3 The person wants to sit.
1.4 The person wants to travel luxuriously. (We may have to ignore this category, because, they will not travel by city buses).
2.They don't want to spend their time in waiting.
3.They want to go from one place to another place and there is no direct bus facility.

There are many people who are taking auto or cab for the above reasons. If there are 50 people who are taking auto, because they don't want to stand in a bus, then, just by providing one more bus, all these people need not travel by auto. This will make one bus on the road instead of 25 autos (let's suppose 2 people share an auto). That will be a huge saving in terms of traffic, money, fuel, and pollution. According to the recent calculations, the no.of autos in Hyderabad is 1,00,000. (Yes, you are reading correctly.)

We can reduce the no.of autos and cabs by introducing more no.of buses in all the directions, and extra buses at the peak time. By that, we can save money, oil, time, traffic, and reduce pollution. If RTC thinks it will make losses by increasing the no.of buses, they can increase only metro, volvo, deluxe buses etc., with more ticket price. Those whoever is travelling by auto will not mind to pay half of that price for a comfortable travel by bus.

But, as usual government does not do things which will make people happy. If at all, any government wants to do things like this, there are few things called "Opposition parties", and they will opppose it. Some time back, when YSR government wanted to hire private buses, immediately the opposition parties objected and it became one big issue. The objection was RTC will be in losses, if they start hiring private buses. These politicians are forgetting that, government is there to serve people, and not that people are there to serve government. RTC is there to serve people, and it has to do whatever it takes to give comfortable travel. Not that, people have to suffer while travelling to give profit to RTC.

If people like Ambani, or Suni Mittal takes this idea, and starts a new venture in this, then there are people like mayawathi to stop this.

Let's hope, somebody (either government or big players) will do some thing in this.

Tuesday, October 09, 2007

showmedirection.com

A new website www.showmedirection.com is started with the vision of how to get things done like, how to goto a place, how to buy something, how to get something done etc. This website is a wiki, and anyone can add/update/delete information. They have announced gifts for those who add/update information on their site. It does not have that much content now, but, let's hope that, it will grow.

Saturday, October 06, 2007

The Complicated Name

An Indian guy named "Anantharaman Subbaraman" arrived at the New York airport and ended up waiting for his visa for about 2 hours for the authorities to call his name.

He got fed up and went to them and asked why they haven't called his name yet. They said that they have been calling him for the last 2 hours as * * * * * "Anotherman Superman".

Tuesday, September 25, 2007

My Cell No.

The cell no. has 10 digits. Let's suppose the no.is abcdefghij
All the digits are either squares or primes.
The following VIM regular expressions are divisible by 3.
\(a\|b\|d\|e\|f\|g\|ci\|j\)\+
\(a\|b\|d\|e\|f\|g\|hi\|j\)\+
There is no other minor variation (addition/deletion/change of one value) to the above which is divisble by 3.
One square appears its square root no.of times, and this square does not appear after any of its square root.
With the above hints, we can get 7 digits. In the remaining digits, First no.is the difference between the biggest square that we have already found and the biggest square that we have not yet used. Second digit is twice to the third digit.

If you find the answer, call me on this no. :)

Tuesday, September 18, 2007

My Computer

I bought a computer more than 3.5 years back. After that, I did not buy any computer. Can a computer survive for 3.5 years in this age?

My Computer contains the following.
1. Mother Board - Due to some power outage problem, this stopped working eventhough I had UPS. Bought a Gigabyte mother board
2. Processor - I had to buy a new processor because of the change in the mother board. Bought Athlon 64 X2 dual core processor.
3. RAM - I had to buy new RAM because of the change in the mother board. Bought 2 GB RAM.
4. Hard Disk - My Hard disk crashed immediately after the warranty, so had to buy new one. Bought 160 GB hard disk.
5. TV Tuner Card - It stopped working, and the company did not give the new one for one month. So, bought a new one. Of course, the replacement also stopped working after the warranty.
6. CD Writer - I utilized it completely. So, it's life span was over, and I bought a new DVD Writer.
7. Keyboard - The keyboard was pathetic after 2 years. Bought a new mechanical keyboard. But, that also stopped working due to power outage. Have to buy a new keyboard.
8. Mouse - So far, two mouses were over. Have to buy a new mouse.
9. DVD ROM - It was not working properly after the warranty. Now, it is there for the name sake. You cannot even open it.
10. Cabinet - It was making so much noise. I changed the cabinet (Fortunately, this was a part of the warranty).
11. UPS - First UPS stopped working within 1 month after the warranty. After that, I bought two UPSs. But, now using another UPS given by Kondala Rao.
12. Spike Booster - Stopped working due to recent power outage. Have to buy a new one.
13. SMPS - Stopped working due to recent power outage. Bought a new one.

And the things that I have not yet replaced are
14. Monitor
15. Speakers - Not very good quality. I can live with those.
16. Floppy Drive - Who is still using this?

Is my computer new or old? What is the cost of my computer? If anyone (who do not have any knowledge of computers) asks what should I tell? If I tell it just costs 30,000, and they will buy a new computer, and will spend another 30,000 in the next 3 years for replacement of parts, and will start abusing me for this. Of couse, even my parents started with Rs.14,000, and finally end up spending Rs.22,000 for a second hand computer.

By the way, IRCTC is working fine now in Firefox. Thanks to DP and JP for letting me know.

Wednesday, September 12, 2007

Easiest way to get a deleted file back

Just tell one lawyer in US that, Mr.X violated a patent, and the proof is in that machine. You will get all the deleted files back irrespective of how the files were deleted.

Tuesday, August 21, 2007

IRCTC is going mad

IRCTC proved again that it belongs to government. Now, it is not possible to book tickets from IRCTC from Firefox. They have made sure that, IE has to be used to book the tickets. It may work from Opera, but, I have not yet tried. Why is government ignoring more than 25% of the users who use firefox?

Sunday, July 15, 2007

Wife and Husband

Wife : Why do you always criticize my parents?

Husband : I have so much anger. To reduce it, I have to show that on someone. So, I am showing it on your parents.

Wife : In that case, I also have so much anger. On whom should I show it?

Husband : Show it on whomever you like.

Wife : I like you.

Friday, July 13, 2007

I Hate GPL

Those whoever worked with me for quite some time, will be definitely surprized by this heading. Yes. I hate GPL. The only two open source licenses, that I don't like among OSI (Open source initiative) approved licenses are GPL and CDDL license. I don't like CDDL, and I hate GPL. But, I love LGPL.

CDDL: I don't know why this is an OSI approved license. With this license, I cannot change the code and give it to my friend. What freedom do we get by this license?

For those who do not know about GPL and LGPL licenses,

GPL: You will get source code, you can modify it, and you can distribute it for free. If you modify it, or use this code in some other application, the modified code, and the new application also would be under GPL. Those whoever gets it, they get whatever rights you got.

LGPL: It is similar to GPL, but, if you are using this code in different application as a library, then the entire application need NOT be released as LGPL, but, only the library has to be released under LGPL.

For those who cannot understand the minute details of these licenses, they may think both are almost same. But, they are like North and South.

Let's take an example.

The most popular logger for java is log4j. If this has been released under GPL, nobody would have used this library. Because, if anybody uses the log4j library in their application, they have to release the entire application as GPL. So, NO COMPANY will use log4j in their application. But, on the other hand, if it is released under LGPL, then everyone would use it. Because, for LGPL, we have to release only that library under LGPL. We can release the entire application with whatever license we want. (Of course, log4j is released under Apache Software License, the most flexible license, you can modify the code, and sell it for money without granting any permissions on the modified code).

The success of open source is because of the contribution from more people. If more people are using the software, then the no.of people who develop/support also will increase. If we stop selected people from using the software, then we are reducing the developers/supporters of that application. If we stop industry to use a software, then we are stopping the industry to develop/support the software. Actually, industry is the one which has more money, and time to do this development. If we give one good basic application which is very useful for the industry, then industry will start developing it. And, all normal users will get the advanced features for free without any effort.

LGPL makes sure that the developments on that application will come back to open source community, and still industry can use it.

GPL makes sure that industry cannot use this application, and will take so much money and time from normal poor people, and will never kill proprietary softwares.

GNU.org contains one article on using GPL and not LGPL. obviously, that is the most ridiculous article. The link to that article is,

http://www.gnu.org/licenses/why-not-lgpl.html

Thursday, July 12, 2007

Salary and concessions for MPs

Salary & Govt. Concessions for a Member of Parliament (MP) per month


Salary: 12,000

Expense for Constitution: 10,000

Office expenditure: 14,000

Traveling concession (Rs. 8 per km):48,000 (e.g. For a visit from Kerala to Delhi & return: 6000 km)

Daily DA/TA during parliament meets: 500/day

Charge for 1 class (A/C) in train: Free (For any number of times) (All over India)

Charge for Business Class in flights: Free for 40 trips / year (With wife or P.A.)

Rent for MP hostel at Delhi: Free

Electricity costs at home : Free up to 50,000 units

Local phone call charge : Free up to 1,70,000 calls.

TOTAL expense for a MP [having no qualification] per year : 32,00,000 [i.e. 2.66 lakh /month]

TOTAL expense for 5 years: 1,60,00,000

For 534 MPs, the expense for 5 years: 8,54,40,00,000 (nearly 855 cores)


AND THE PRIME MINISTER IS ASKING THE HIGHLY QUALIFIED, OUT PERFORMING CEOs TO CUT DOWN THEIR SALARIES.....


This is how all our tax money is been swallowed and price hike on our regular commodities.......

Tuesday, July 10, 2007

Can I live without google?

Around 10 years back, without power, I could do nothing.
After few years, without computer, I could do nothing.
After few years, without internet, I could do nothing.
Now, without google, I could do nothing.

I am so dependent on many google services inlcluding google search, gmail, orkut, blogger, calendar, docs/spread sheets, google reader. If tomorrow, google says these services are not free, then I may pay money to use these services. Yahoo provides many of these services. But, it is terrible. I hate to open my yahoo mail account, because it eats up my system resources, and I cannot do anything till I close that. If anybody sends mail to my yahoo account, they can be assured that, I will never reply.

Is there anybody who is going to beat google in the near future, or will it become another indispensable? I hope it won't become like microsoft and yahoo, and provides all it's services for free with the same efficiency.

Sunday, March 11, 2007

How does management work?

Worker : Sir, I want a hammer to hit a nail. Please, provide me a hammer.
Director : No. I want you to use a laptop instead of a hammer. Laptop is more efficient, and it has multiple uses.
Worker : No Sir. I want only hammer. Laptop is useless.
Director : I don't accept you to buy a hammer. I want you to buy only a laptop.

Worker goes to the manager.

Worker : Sir, I want to buy a hammer, and the director is not accepting me to buy one. He asked me to buy a laptop instead.
Manager : Then, buy laptop only.
Worker : How can I use laptop for hitting the nails. It is useless for me.
Manager : If there is any problem, then give enough data to the director to support why you need a hammer.
Worker : What data to give? I just need a hammer to hit a nail. I cannot understand what you are talking.
Manager : Ok. I understand your situation. What is the cost of the hammer?
Worker : Around Rs.100.
Manager : What is the cost of the laptop?
Worker : Around Rs.40,000.
Manager : Can you use a hammer efficiently to hit a nail?
Worker : Yes.
Manager : Can you use a laptop efficiently to hit a nail?
Worker : No.
Manager : Why?
Worker : It is not very easy to hit a nail. It does not have a handle to use. The density of the laptop is very less when compared to the density of hammer.
Manager : If I provide a handle to the laptop, can you use it?
Worker : No. Laptop is too big to use it. Still it is not strong enough to hit a nail.
Manager : If I provide small laptop which is very heavy, does it solve your problem?
Worker : No. I just want a hammer.
Manager : What is the life time of a hammer?
Worker : Easily more than 10 years.
Manager : What is the life time of a laptop?
Worker : If we use this to hit nails, it will be useless after a day or two.
Manager : Can we use hammer for any other purpose other than hitting nails?
Worker : hmm. No. We cannot use it for any other purposes.
Manager : Can we use laptop for any other purposes?
Worker : Ya. All the senior software engineers need one laptop. They keep one laptop with them always.

Both manager, and worker goes to the director.

Manager : Sir, our worker wants to buy a hammer. He told me that you suggested laptop. I evalutated both the options. Here is the summary.

Hammer costs only Rs.100, and we can use it for more than 10 years. This is easy to use. It also has a handle. But, the disadvantage is, we cannot use this for any other purpose.

Laptop costs around Rs.40,000. It has so many uses. All our software engineers need one laptop, and they keep one with them always. It has high usage. But, it is not as efficient as hammer for hitting nails. It does not have a handle, and it is not strong enough. We can provide a handle, and buy a small and heavy laptop. Still, it won't be as efficient as a hammer. Not only that, if we use laptop to hit nails, it will break easily, and will be unusable. Life time of the laptop is just in the order of the days.

Director : It seems hammer is more cheaper and efficient than laptop for this purpose.

Manager : Yes. It is more cheaper and efficient.

Director : Then, buy a hammer.

Manager : Thank you sir.

Sunday, February 04, 2007

Swapping without temporary variables

I was always fond of swapping numbers without a temporary variable like this.

void swap(int *a, int *b)
{
*a = *a + *b;
*b = *a - *b;
*a = *a - *b;
}

Today, I came to know that it does not work in all the cases, when I was doing swap(a+i, a+j), where a is an array and int i=j.