Thursday, October 28, 2010

Interesting StackOverflow Exception in C#

class Program
{
  public static void Main(string[] args)
  {
    Program p = new Program();
    p.Krishna = 10;
  }

  private int krishna;
  public int Krishna
  {
    get
    {
      return krishna;
    }
    set
    {
      Krishna = value;
    }
  }
}

In the set block, change from Krishna to krishna, and the stack overflow exception will go away.

Monday, October 25, 2010

Rankings in Cricket

When India lost a test match few months back, the statement from someone,

India does not deserve to be Number 1.

When Australia lost continuously three test matches and dropped to fifth position, the statement from an Australian cricketer,

Australia does not deserve to be in Number 5. We deserve to be at a better rank. The ranking formula is considering very old matches also.

I cannot understand these people. ICC came up with the ranking formula for the teams and individual team members by considering the matches in the last few months. It takes many things into consideration, and comes up with one number, which represents how they compare with others. If the team is continuously losing few matches and is still at number one position, it means, the team won so many matches with many countries, and these defeats are negligible when compared to the wins they had. The ranking formula takes care of all these things.

When they introduced the ranking, nobody objected to it. But, once they dropped in the ranking, if they give statements like Australia does not deserve to be in number 5, what are they trying to say? Do they want to hard code the formula that, Australia is always number 1, or do they want to change the formulas after every match in such a way that, Australia is always in number 1 position?

If anyone thinks that, the formula is not actually representing the team's rank, then they should suggest the changes in the formula. There is no use of criticizing that, the particular team does not deserve to be in that rank.

Australians do not have right to suggest now. They should have suggested when they were in number 1 position for many years. If the suggestions of the Australian cricketer had been implemented many years back, Australia would have lost number one position much before.

Friday, October 22, 2010

Quote of the Day

You will not grow if your manager does not have work.
You will not get promotion if your manager does not have time.

Saturday, October 16, 2010

Typical Feedback of Software Engineer


When the developer is just doing whatever is assigned to him/her - the manager feels that, he/she should be proactive.

When he/she is proactive and taking bigger things - The controllers of the project feel that, he/she should not have done that.

When he/she is proactive just at the code level - Other team members of the project see it as a red flag, and raises to his/her manager, and his/her manager asks him/her to stop doing that.

When the developer is just doing whatever is assigned to him/her - the manager feels that, he/she should be proactive.
.
.
.
.
It never ends.

Sunday, October 10, 2010

Why do we need BMW or Benz? Is Maruthi Not Enough?

Whenever few people talk about cars at length, then definitely somebody or other says something like Why do we need BMW or Benz? Is Maruthi Not Enough? Till a month back, I used to think that, it is a waste of money to spend more than the basic limit on cars. I had to change my mind after one incident on Sep 7th.

On September 7th, one engineering student who is a son of a big business magnet was travelling in Honda Accord. He was driving very rashly, and at one place, he lost the control of the vehicle and it hit the divider and fell on a Tata Indica car that was coming in the opposite direction. There were four people in that car, and two people died on the spot, and one person died after few days. The driver escaped with injuries.

But, nothing happened to the student who was driving rashly. Honda Accord has all the security measures, and even in the worst accidents, the people escape with no injuries or very minor injuries. He escaped without any injuries, but, still, he joined the most expensive hospital in Hyderabad, and took the most expensive room that hospital offers, only to escape from the police and court cases.

My friend's friend's brother is one of the three people who died in that accident. After that incident, I realized that, BMW or Benz is never a waste of money. It is just that, since, we cannot afford it, we don't buy. But, if we can afford it, it is definitely worth the money. Had those people were travelling in any expensive vehicles which have all the security measures, nothing would have happened to them.