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, March 11, 2007
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.
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.
Labels:
technical
Wednesday, December 13, 2006
Sardar Jokes
In 1930, when india was under british rule all sardars fought for our nation bravely. So the british people got angry and started writing funny comics on them and that still continues..........
Labels:
general
Never go on appearance
A young man was getting ready to graduate college. For many months he had admired a beautiful sports car in a dealer's showroom, and knowing his father could well afford it, he told him that was all he wanted.
As Graduation Day approached, the young man awaited signs that his father had purchased the car. Finally, on the morning of his graduation his father called him into his private study. His father told him how proud he was to have such a fine son, and told him how much he loved him. He then handed his son a beautiful wrapped gift box.
Curious, but somewhat disappointed the young man opened the box and found a lovely, leather-bound Bhagavadgita. Angrily, he raised his voice at his father and said, "With all your money you give me a Bhagavadgita?" and stormed out of the house, leaving the holy book.
Many years passed and the young man was very successful in business. He had a beautiful home and wonderful family, but realized his father was very old, and thought perhaps he should go to him. He had not seen him since that graduation day.
Before he could make arrangements, he received a telegram telling him his father had passed away, and had willed all of his possessions to his son. He needed to come home immediately and take care of things.
When he arrived at his father's house, sudden sadness and regret filled his heart. He began to search his father's important papers and saw the still new Bhagavadgita, just as he had left it years ago. With tears, he opened the Bhagavadgita and began to turn the pages. As he read those words, a car key dropped from an envelope taped onto the inside back cover of the Bhagavadgita. It had a tag with the dealer's name, the same dealer who had the sports car he had desired. On the tag was the date of his graduation, and the words...PAID IN FULL.
How many times do we miss God's blessings because they are not packaged as we expected?
As Graduation Day approached, the young man awaited signs that his father had purchased the car. Finally, on the morning of his graduation his father called him into his private study. His father told him how proud he was to have such a fine son, and told him how much he loved him. He then handed his son a beautiful wrapped gift box.
Curious, but somewhat disappointed the young man opened the box and found a lovely, leather-bound Bhagavadgita. Angrily, he raised his voice at his father and said, "With all your money you give me a Bhagavadgita?" and stormed out of the house, leaving the holy book.
Many years passed and the young man was very successful in business. He had a beautiful home and wonderful family, but realized his father was very old, and thought perhaps he should go to him. He had not seen him since that graduation day.
Before he could make arrangements, he received a telegram telling him his father had passed away, and had willed all of his possessions to his son. He needed to come home immediately and take care of things.
When he arrived at his father's house, sudden sadness and regret filled his heart. He began to search his father's important papers and saw the still new Bhagavadgita, just as he had left it years ago. With tears, he opened the Bhagavadgita and began to turn the pages. As he read those words, a car key dropped from an envelope taped onto the inside back cover of the Bhagavadgita. It had a tag with the dealer's name, the same dealer who had the sports car he had desired. On the tag was the date of his graduation, and the words...PAID IN FULL.
How many times do we miss God's blessings because they are not packaged as we expected?
Labels:
general
Monday, October 30, 2006
Volvo Bus
I travelled by Volvo bus few times. I know how it looks like. Recently, in bangalore, BMTC introduced volvo city buses. After looking at the bus, I wondered how it is Volvo bus, because it looks completely different. After few seconds, I got the answer.
The answer is, "API is same, but the UI is different". ;)
The answer is, "API is same, but the UI is different". ;)
Labels:
general
Subscribe to:
Posts (Atom)











