Tuesday, June 05, 2012

Politics - Garbage

If you are facing problems with garbage in your locality, there are only two options.
  Either you clean it, or help/encourage those who clean it.
Nothing else would solve the problem.

If you are facing problems with politicians, there are only two options.
  Either you become a politician and change it, or help/encourage the good politicians by voting for them.
Nothing else would solve the problem.

Wednesday, May 30, 2012

Leaves and Leaders

I have heard of few leads/managers who do not accept the leaves of their team so easily, even if they are given sufficient advanced notice.

One reason for this is, the team member is indispensable, and if he/she leaves, the project cannot proceed till he/she comes back. The lead cannot lead till then. So, they reject the leaves. If the team member has to go at any cost, then they may leave, even if the leave is not approved. In those cases, few leads escalate these issues to higher management.

I did not understand for a long time, why these leads unnecessarily escalate these issues to higher management. The time won't come back. Even if they escalate, next time, when the team member has to go on leave in emergency, they won't stop. The lead would be just spoiling the relationship with the employee. Instead, if the lead praises the team member how important he/she is to the team, and how indispensable he/she is, then the team member would get more enthusiasm, and would try to do something, so that, the project won't fail.

Later, I realized that, these things are used by leads/managers to pass the blame on to the team member. If the project fails, then the lead or manager immediately say that, since this team member went on leave without approval, the project failed. The lead says, he/she cannot deliver the project, when he/she does not know when the team members leave without any notice.

In many service based companies, the team members shuffle frequently. So, even if the relationship is broken, the lead/manager do not care about it.

Of course, if these "so called" leaders get opportunity to work with people like me, everything would be set straight. ;)

If the leader is not ready to take 100% responsibility for the failure, then he/she is not worth of being called as a leader.

Thursday, May 24, 2012

I Don't Want to Work on Bug Fixes

Many people think that, fixing bugs is inferior work, and many people try to avoid it.

Many people forget that, the quality or greatness of the work is not in the work itself, but, how the people make out of it.

Recently, I got an interesting bug. The bug is very simple. It is a Null Pointer Exception. If that bug is given to any fresher, who has little programming knowledge, they can fix it in five minutes, and it will pass the testcase. But, I took lot more time.

When I had written the code, I assumed that, it won't return null, and coded accordingly. Now, when I got null, I checked why it is returning null. I found that, the corresponding Dictionary has not been populated. It was not populated, because, DB was not returning it. When I checked, what DB is returning, I found that, when the input has 600 ids, DB is returning only for 200 entities. The issue is, the stored procedure's input parameter can hold only 200 ids. Increasing the size of the input fixed this issue.

But, this is not the final solution. The null exception is coming even for basic scenarios. In basic scenarios, it should not be processing hundreds of entities. When I checked, why it is processing that many entities, I realized that, at one place, where it has to update it's dependents, it is updating all the entities in that component. When I am creating a new entity, it won't have any dependents. But, since, it is taking all the entities in the component, it is trying to update all the entities in the system.

My final fixes were, changing the code to update only it's dependents, and increasing the size in the stored procedure. I did NOT add null check in my code. If I get null again, it means, there is some big issue somewhere else.

If I had just added null check in my code, it is very difficult to find the issue, because, this entity would be updated properly. This failed in an asynchronous job. So, it is very rare that, as part of this testcase, tester tests other entities which are not involved with this entity. While executing the testcase for dependents, if the component does not have 200 entities, then that also would pass.

There is no work that can be done by the less qualified people. It is just that, we do it like the way less qualified people.

By the way, since, that Null Reference exception came in my code, I did more investigation. If it had been in other's code, even I would have finished it in five minutes. ;)

On a different note, my lead told me to put the effort spent for bug fixes in hours and not in minutes. I don't know how he felt, when I said, I am putting effort in hours only.

Friday, May 18, 2012

Why Should I be Kind to Everyone?

One person stands at the entrance in a train, does all kinds of feats and boards/gets down the moving train in every station. If he gets hurt by that, Why should I be kind to that person?

One person drives bike very rash and fast in a busy location without helmet. If he falls and gets injured, why should I be kind to that person?

When the people vote for bad candidates in the elections, and then suffer for their problems, why should I show sympathy to them?

One person cheats another person, and the second person suffers a lot because of that. After some time, if the first person suffers in the same way the second person suffered because of his action, Why should I be kind to that person?

People like Mahathma Gandhi have distorted the Hindu principles a lot. He says, one should show compassion to everyone. He removed the phrase, if they deserve.

Yama, the lord of death and punishment, is a great devotee of Lord Krishna. He is one of the 12 maha bhagavathas (The authorized people to preach about the Lord Krishna). If we go by the definition of Gandhi, then Yama can never be a great person.

Only the very fortunate people gets the punishment for their mistakes in the same life.

Saturday, May 12, 2012

Political Illiterate

The worst illiterate is the political illiterate. He hears nothing, sees nothing, takes no part in political life.

He does not seem to know that the cost of living, the price of beans, of flour, of rent, of medicines, all depend on political decisions.

He even prides himself on his political ignorance, sticks out of his chest and says he hates politics.

He does not know, the imbecile, that from his political non-participation comes the prostitute, the robber and, worst of all, corrupt officials, the lackeys of exploitative multinational corporations.

- Bertolt Brecht

Taken from Occupy Together