25 April 2010

Immature Managers - Reality With (lot of) Humor

Sometime back, there was new performance and career management initiative rolled out in one of the top IT services company in India. The management thought that they could institutionalize the new initiative during recession and they started implementing it. I would say that was a very bold and bright thinking from the part of the organization. We promote people who bring in results and we generally don't focus on experience or maturity part when promoting people. We promote people rather ruthlessly and without any basics thinking. Finally, we run entire organization to tinker them.

The idea of giving promotion in many organization is to just make most of the people happy in some way. Promotion is one of the ways. There is an ice cream seller goes on selling ice cream in a street. A kid, on seeing the seller, wants to buy one not knowing the effects of ice cream and his last week's viral fever. The mom says, "I will take to movie next Sunday". The kid keeps quiet. But giving promotion ruthlessly will have a serious effect on the growth of the organization. The guys who do not have basic human touch or  demeanor makes his team miserable. Either people run away out of frustration or it leads to mediocrity  through "suck up leadership". This is how a class b guy goes on to create class z guy. One of my friends tweeted this video. This summarize the reality but with good humor. Enjoy this video and think at the end :-)


24 April 2010

Multiply Your Money - Systematic Investment Plans

Money is not biggest thing in life but it is reasonably close to oxygen. And there is nothing wrong in trying to maximize your corpus. With the rising inflation and real estate reaching unrealistic limits, I always feel that I m left behind. I m not so sure what will my lifestyle and what kind of lifestyle I can afford when I retire. With my little experience in investing, I feel that we have few options like NSC, PPF, Fixed Deposits, Stocks, Real Estate, Mutual Funds and life insurance.

I am very big fan of Systematic Investment Plans because of the idea of discipline. A portion of your salary goes to stock market every month. If you ask any successful investor, he will tell you that the key to investing is discipline and investing in small chucks periodically. The simple reason why "periodic small chuck investing" works is that we buy when market is low, we also buy when the market is high and we sell when the market is higher. I have strong belief that a periodic investment (every month) of few thousands for 15-20 years in stock market gives 5-10 times the returns from fixed deposit. But there is so risk but the risk can be diversified or reduced by investing in different types of mutual funds every month.

To give you a perspective, I started to invest 3-4 years back when the market was high. We all know that market crashed and even now I have a returns between 20-50%. The high return is possible simply because I bought during market crash. If you are serious about building a corpus, I would seriously suggest you to enter into mutual funds every month. The old saying, "little drops make ocean" hold very much for systematic investment plan.

Of course, you need a good financial consultant who does more than collecting money from you. He should be able to give you ideas on investments. Anyone who is having a good portfolio of services in MF and contacts in fund houses is the right candidate. Though, I don't do this as business, I can point you to my financial consultant Mr. Anand Srinivasan if you want. With his help, I am able to build a good corpus even now and I m on track with my targets :-)

Threads Execution - From my Imagination

Having posted general posts for long time, once in a while, a little poor programmer tries to creep out. This is an interview question and so far I haven't heard from anyone any different answer. The key to software development is imagination and trying to add more perspective. The multiple perspective helps us to clearly differentiate and appreciate the depth of the language. With no delay, let me jump into my question. Take a look at the following code and tell me what happens.
public class Threads extends Thread {
   
    public void run() {
        // do some serious thing
    }
   
    public static void main (String[] args) {
        Threads t = new Threads();
        t.start();
        t.start();   
    }
}
If you recognized that we create a thread, execute it twice and it will lead to IllegalThreadStateException, you are right. But have you ever imagined why threads cannot be executed twice. Here is my imagination.

Any thread is an independent execution path. You can have many execution paths that are similar in terms of execution and state changes. Let us take an example from real world. We do lot of things in a day like reading, writing, eating, speaking and so on. If we model or think that each activity as thread, though on a given week we may read many times, probably the same book at same speed, each read is different in the context of time. Similarly, in programming, two or many threads appear similar but they are not really similar. Any execution may it be a process or thread, it is illogical to go back in time however you can spawn off new process or thread that does the same thing. Execution cannot be taken back in time (if we take back execution, it is debugging).

Thread has two properties - object and an entity that can be scheduled. The points we discussed above is more on "an entity that can be scheduled". An entity that has completed its run, cannot brought back to execution as its purpose of its creation is over. But from object's perspective, it is data and hence can be accessed and kept for any duration as long as the process is alive.

When you think about thread, remember - "thread has life and object has space". Thread is an object and hence it is given a space in heap, it is available as object till it is garbage collected. But Thread as a entity of execution, it has life. Once its life is over it can be restored again.

22 April 2010

Health Advice - Drink Water

For the guys who are in air-condition, try to drink water. If we are in a/c, we don't feel thirsty. So, better proactively drink a lot of water. This year it is going to be terrible hot.

On a lighter note,

Sandy: Chennai has only two climates
Me: What, only two climates..
Sandy, Yes, hot and very hot.

Unlike cricket players, i don't get money for endorsement and don't send income tax officers to my home.

21 April 2010

Drop Your Arrogance

There was an interesting tweet, "It is easy to write words and hard to live the words". I often wonder how people think about their people and how quickly they change their stance when they speak out. They often think that their teammates should dance their tune and few will go to any extent of thrashing their ego. While they are doing it, there is always only one thing in their mind, "i must prove to him that i am superior". This is what you call as "arrogance" and if you do it, you stink. When they hold their microphone, on the spot, they become humane. How is that possible?

But the guys who are hearing can spot the double nature and tag you as "arrogant". Arrogance is not in your acoustic level but in your mind, the way you think about your guys. So, be sensible. If you want to make a good connection with your teammate (or anyone), the first thing you got to do is "drop your arrogance" and build a character that is predictable and authentic.

19 April 2010

Shortage of Cricket + Surplus of Controversies = IPL

Cricketers + Actors + Business Guys + Politicians + Media -> Little Cricket + Lot of Entertainment + Abundance of Controversies.

I really don't understand why many of us did not oppose IPL-3 fixtures. They started the tournament when there were exams. Close to two months of continuous cricket on an average of 8 hours of cricket per day is way too much of overdose even for the cricket lovers.

IPL has become an organized gambling in which business guys, media and cricketers (including players of the past) make a lot of money from people. Irrespective of what they say and what we think, these days controversies and cricket have become synonymous. IPL is for sure has less cricket and more controversies.

My only question is "Will IPL survive". If yes, "how long".

Bye, bye IPL.

17 April 2010

Indian IT Industry - Be Sensible

I sit in interviews (of course, as an interviewer) and confidently say that we are ruthless. Most of the candidates say that they have multiple offers and they want to decide "finally". I know for sure that only small number of people are looking for learning and environment. Most of them use "money" to decide finally. But their decision was taken even before they started the job hunt which was settling in a company that offered more. A guy earns handsome in a company and he moves to another company with a minimum of 40%. IT industry is ruthless and senseless. The whole spectrum has become insensible, unsustainable, greedy and complacent.

With this rate of salary hike and job hunts, Indian IT industry becomes quite uncompetitive. I m not against hikes or salary revision. But my question is "how much". I don't know if someone deserves 20% hike every year and at the end of few years 40-60% in the form of job switch. So, every five years, the salary gets doubled. While I had a discussion with one of my friend/colleague who is heading a division, he accepts that we are ruthless and sees heavy competition from Russia, Ukraine and Thailand (many countries are at their tipping point). Either they do more getting same money or they do same at a much lower price. This shows that Indian workforce is becoming uncompetitive and unattractive.

So, this is right time for the top guys who are leading the industry to stop being selfish. Else, Indian IT industry, the TCSs, Wipros, Infosyss, HCLs will become history.

11 April 2010

Software Design - Puzzle #2

Here goes another design puzzle.

There are varieties of creatures (example Man, Lion, Tiger, Monkey) each exhibiting varieties of walking behaviors (Walk, Slow Walk, Chasing, Running, Jumping). The walking behavior changes based on the mood of the creatures. (Hint: This forces us to bring in different walking behaviors to our objects dynamically).

Can you analyze this requirement and come up with design pattern(s) that could solve this problem and set of classes to model this requirement.

10 April 2010

Pass on the Ball (blame)

A few days back, my teammate and I went to a hotel near to my office. We ordered Bournvita (it is drink made out of milk, sugar and cocoa) for us. The waiter brought Bournvita to our table. Without caring too much on the color of the drink, I sipped a bit. It was then, I realized that there is no Bournvita (may be a little) or sugar. It was just milk. My teammate too tasted it and said that it neither looked nor tasted like Bournvita. We called the waiter again. He said the master (one who prepares bournvita) is new and he didn't know to make Bournvita. It was horrible to hear because making bournvita is not a rocket science. The waiter was trying to pass on the blame to someone who was not in the scene. We didn't care who made it. There is no wonder why he did that because the hotel has a very good reputation for being greedy that offers less for more. As a customer, I felt how it pains to be at receiving end of mediocre customer service.

If there is one thing that I must do is "stop passing on the blame ball" and "try to face the ball". When you do that, the people loves you.

09 April 2010

How to Trade Stocks

This is just a speculation and not proven theory. I m seeing some trend quite consistently and based on my theory (yet to be verified)

Buy stocks on Monday/Tuesday. Sell it on Thursday evening or Friday Morning. Market will certainly go down on Friday afternoon. (take care in case Friday is holiday). This gives you some quick bucks.

I advise readers to trade at their own risk and this applies only in Indian stock exchanges (NSE/BSE). Hope, many of you know that I m not a qualified stock analyst :-)

But if you made some bucks, you have to strictly give me some royalty.

08 April 2010

Producing Leaders Vs Producing Business

I had a view that the organizations should produce leaders to win in business. Now, I feel that it is the other way. The business (or need) produces the leaders. I m not talking about building one's leadership qualities. I m talking about the need of leaders to drive business goals. When you have business, you will have a support system or a cushion for people to be always at peak of their performance (meeting business goals) and the mistakes are quite fine when you are at your peak performance. When the people are at their peak performance, they naturally become stars. So, producing leaders (or rather business leaders) starts with producing more business. If you have more project managers (or more seniors), you need to have more projects.

If you ask me, which takes precedence, I would say "producing business" makes bigger sense than "producing leaders".