Friday, September 30, 2005

What do you look for in a job?

The Indian job market is very bullish. In a recent survey, India topped a list of 23 countries when it came to job creation in certain sectors. I find that we Indians switch jobs more frequently than our counterparts from developed nations. When you switch a job what do you look for in a new organization?

I got a great answer about career building from someone my brother knows, he said

"Building a career is like digging a well, first you get dirty and then if you dig deep enough, you will find water. Don't dig too many wells and if possible avoid digging small holes."

He was suggesting that sticking around definitely pays off. I agree with that point of view, but we must ensure that we dig in a place where we are likely to find water to begin with.

That made me wonder, do we give up too easily on our work places and switch jobs? Or is that companies in India do not take good care of their employees, the cost saving is sometimes at the cost of the employee? A HR manager once told me that the cost of replacing an employee is nine times his current monthly salary.

I would be interested in finding out the annual cost of hiring across organizations in Bangalore, specially the software firms and compare them against other places in the world.

Friday, September 23, 2005

What have I been upto?

I feel the need to explain the lack of recent posts on my blog. Contrary to the usual reason that I used to have (shortage of ideas), I have too many ideas to share this time :-). I am trying to put them all together and will try to list one of them here. I must warn you that they are not drastically new, but they are new for me (in terms of the investment of time and thought into the matter). This idea is just of the top of my head, I have not researched too much into this. In Parallel, I have other thoughts spinning in my mind and keeping me occupied.

Let me start explaining my thought with a simple scenario

Signal Sharing

Lets say, I design an electrical circuit and I want to troubleshoot some part of my circuit. The obvious thing would be to go grab an oscilloscope to debug. I power up the circuit and see the waveform between any two points. The interesting thing to note here is that due to the physical properties of electrons, it is ok for us to have some load in parallel with the working circuit.

Is it possible to do something similar in computing? Can we extract data without impacting the program that is being run? The answer is "yes". I am aware of some techniques of achieving this.

  1. The first is to use a hardware trace to extract data from registers and memory.
  2. There is a project called dprobes, that does something similar to what I discuss here, but I am not sure of the exact implementation methodology.

I am wondering if there is any other mechanism of doing this using the existing resources on the system? This problem can be restated as -- Can be find ways and means of applying physical laws to software to solve some of our development and debugging issues?

Sunday, September 18, 2005

Possible solutions to the Bangalore's Infrastructure problem

If you live in Bangalore, you are likely to find the IT sector complaining about the infrastructure problem in Bangalore. To be honest their complaints are 100% true. I think the biggest problem is commutation. It takes on an average 3 hours to commute from home to Electronic City (a location where there are close to 50,000 engineers working). While we all know that it would probably take years to fix the problem completely, here are a few intermediate steps that can be thought to solve the problem

  1. Cover the big opening between the service lanes and the main road
  2. Make the road divider flexible, during the mornings, make the side which leads to electronic city bigger and on return reverse it. Have a 75:25 split of the road for optimizing traffic
  3. Ask companies to interleave their starting and closing time by 15 minutes. For example company A could start at 8:15, company B at 8:30 and so on
  4. Actually, start work on the infrastructure, build new flyover's, fixing pot holes, etc

Imagine if 50,000 engineers on an average spend 3 hours a day in traffic, what would be the loss in productivity? Wouldn't it be better that they all spend time with their families and on their hobbies instead of traveling?

Tuesday, September 13, 2005

Learning should have deep roots

I am taking a class in advanced C++. To be frank, I learnt a lot of new things from the class. The learning is permanent when I get to learn how things work. There are times when the instructor expects us to remember things as rules without explaining the reason behind it. These are things, I feel we programmers forget easily. Having read Design and Evolution of C++, I know that Mr Stroustrup is a very sane person and would not do anything in the language that does not make sense.

Let me illustrate my point with a few examples

In C++ it is not possible to implement overloaded functions based on return type. This is certainly true, but why? There is an exception to this rule, overloading based on return types can be done using templates. This becomes extremely confusing unless you know the reason behind all these so called rules of the language. I found the answer to the above question in Annotated C++ Reference Manual. My experience makes me believe that a course in language design and compilers would be useful for all programmers working with a language. This would help in being able to reason with the rules.

In one of the train stations in Hong Kong, I saw an advertisement hoarding which stated

"Don't get her fish, it will last only a day, teach her how to fish and it will last a life time".

This was an advertisement about helping people with skill development instead of money. My request to all trainers and teachers out there would be

"Don't teach me the rules, teach me why the rules are designed to work that way, so that my learning is permanent".

Without permanent learning and the capability to deduce, comes the capability to confuse yourself and other people around you. We tend to veto everything stating rules as the reason, without understanding the reason for them in the first place. That is definitely a bad sign and if you find yourself there, its time for course correction.

Tuesday, September 06, 2005

Be a role model

I still remember meeting a great architect at a place I worked. He was very humble and so good that he was a role model. Basically whether we like it or not, we become role models to people. The choice we have to make is what kind of a role model do we want to become? Good or Bad?

The person I am talking about is so good at technology that he had close to 20 patents, yet he is so humble when it comes to dealing with people and great at sports. I remember once that he was supposed to take some classes back home and I was onsite. I was disappointed at not being able to attend his presentation, so I went up to him and requested for the slides (so that I could atleast see them). By the time I reached my cubicle, I got an email from him saying

"Balbir, could you please review these slides for me to present for the folks back home"

It is often not easy to be a role model, if you are nice to people, some people exploit you, this requires you to be very assertive. You should be able to inspire people with what you do. You should set them up for success without holding their hands. You should be able to punish the guilty by making them realize that they are wrong and always practice what you preach.

There is a well known story about Mahatma Gandhi

An old woman came to Gandhi with her grandson from a far off village. Her grandson used to eat a lot of jaggery and would not stop or give it up. Since he looked up to Gandhi, she thought may be Gandhi could talk some sense into him. When she met Gandhi and explained the context, Gandhi said "Please come meet me after a week and I will advise your grandson to stop eating jaggery". The woman was surprised and angered that Gandhi was going to make her wait and travel back and forth again. Gandhi politely explained, "I myself eat a lot of jaggery, how I can preach something when I am unable to do it myself, the time I have asked for, is to help myself out of the habit, so that I can advise your grandson"

Being a role model is not easy, but whether you like it or not, somebody might be looking up to you for help and direction. So whether you are ready or not, it will strike you someday that all of us are role models to children, colleagues at work, at home or elsewhere. We need to do our best to be good role models to other people, ourselves and the society.

Friday, September 02, 2005

New Orleans, Mumbai and the Tsunami

A view of Canal Street that is flooded with water in New Orleans (From Reuters)

All of you must have heard of Katrina and the tragedy it brought along with it. What is very concerning is the tragedy that humans have caused themselves in New Orleans. People have turned violent. Imagine surviving Katrina and then the rage/anger of your fellow people who turn violent and start looting. Lets hope people get help and the aid they need to survive this disaster.

Looking back, Nature has shown us its might this year. We had a Tsunami on the boxing day, killing more than a million people and affecting the lives of many more. Sometime back we in India were impacted by the Mumbai tragedy (the tragedy was really caused due to excessive human intervention with nature). The last two tragedies were different in the sense that people (from all over) helped each other during and after the tragedy.

Mumbai Rains (From Webshots Album -- Mumbai Rain)

New Orleans makes me wonder

  1. If we ever face a similar crisis on a global scale, will we all forget what humanity is about and start doing whatever it takes for survival? Will nations go to war? Are we humanitarian only if our basic needs are satisfied?
  2. Should ordinary people be carrying weapons? (I can understand their use for self protection, but as in New Orleans, if people decide to loot, then one has to rethink this point)
  3. There are so many people who need help/are going to need help in the future and we as humans must be ready to help them out. We should override all other things we do and prioritize providing help to people who need it. Nations should revisit their priorities - should it be war, helping the millions of people starving in Africa/Asia, helping people hurt by Natural disaster. Its our call to make.
  4. Its time we start respecting nature for what it provides and what it can take away. We must remember not to struggle with nature or make a competition of extracting resources/energy from it, but to live in harmony with it.

Dynamic programming for the binomial coefficient

More fun things, this time with some visualisation of what happens when memoisation is used and what happens when we don't. I don'...