Tuesday, September 15, 2009

Part 5: Thoughts of “How we do?” - Process

Every morning I walk to a bus stop to catch my bus to go to office. For that I have to cross the road and go to the bus stop. While I am waiting one side of the road, I have to check entire vehicles which pass other side: to decide to cross the road or have to wait for the signal light to walk on the pedestrian crossing. I normally wait for signal light to turn green or for no vehicle on the road so that I can cross safely.
The question is, if I am waiting to cross, should I look at the other side vehicles as just as vehicle or should I check for my bus as well. Say if I want to catch bus numbered 811, If I sow a bus moving towards the bus stop with the same number, then should I consider that and harry up myself? Is that safer? , faster ? Or correct approach?. Actually once I cross the road and reached the bus stop only I can get the bus. So before getting to that stage, do I need to worry about that? Will it be safer?. Of cause, If I missed that bus then I want to wait for next bus which may come after another 10-20 min or some reasonable time.
For that, a simple advice may be: you shouldn't think about your bus number until you reach the bus stop. That always safer. Because if you think about your bus number then your mind will say to cross the road without looking for other vehicles, that will cause dangerous accidents. You may have to loss your self even.
Normally, the process will be defined for every project with a set of rules and procedures to ensure the safety or quality of the project. But that may slow down the project and we may loose a business because of the delay also.
Say If I have a meeting today at office and I should be on time. While waiting at the start of the crossing, If I sow a bus which I want to catch to go to office and if there is no vehicle then way I shouldn't cross the road? Of cause I shouldn't practice this in main junction or in a traffic area.
On the whole, If we follow all the process regulations in our project and if we missed our dead line we can only say that we have follow this and that process and our project is a better project etc. But we will loose the business at that time. Mostly business needs Good project rather Better project same as real life.
So, It is important to define and follow a process for our project, but at the same time we should identify and change or leave the process when ever its need. Again this is a skill of switch between following and leaving the process, we should be eye open for this always.

Tuesday, January 27, 2009

Part 4: Thoughts of “How we do?” - A Story

A family arranged a trip. They were going by a van. Van was driven by a young driver, next to him a young family member. In the next row, father, mother and their child around 10 years old boy were seated. In the last row grandfather and grandmother were there.

On the way, a traffic signal, it is turned to red. So driver stopped the van. Now the little boy prompt a question “Why you stopped the van?” “The traffic signal is red” driver replied. He asked more “Why we have to stop if signal is red?” for that the young family member replied “If not police man will charge us”

The boy was not satisfied with that answer; He turned his head to back. Then grandfather tried to answer “We have to give way to others before we take”, “There should be a common rule to control”, “you have to wait for your chance”. While grandfather was continuing with his answer, boy had turned his head to his father, because he couldn’t understand those answer. Then father explained, in a junction, if all people try to go, then there will be no coordination. So we have to divide time between us and move one by one. For that there should a person or signal to indicate the time change. And finally if someone violating those rules, there should be police man or someone to check and punish.

After father’s explanation boy was fine. Let stop the story there, in the story, you may have noticed three different answers for one question “Why we have to stop?”

All three answers are right and related to same question. First answer which was from the young man, is talking about immediate input/output of the problem. This is a kind of technician mode of thinking. It is without thinking about others, just thinking how to kindle the present situation according to present observation. Or they may have trained to understand the situation and react according to that.

Second answer, the grandfather’s answer which is more conceptual, no worries about how to design. Scientists used to tell thing like this. More like theories, speaking in an ideal situation.

Final answer, that took care of design aspect, and explained how these are made into a practical working solution. This is an engineer mode of thinking, explained and analyzed the design.

Even though I have put different modes into different people, it doesn’t mean those are owned by only them. All we have those three modes of thinking with us. For each problem in our life, we react or understand things in one or some of the above modes. For every problem, the time to find a solution, the understanding or knowledge we have about the area of the problem and the role we play to solve the problem are decide the way in which we going to handle. In case, if we couldn’t find a solution with one mode, we may have to switch to another different mode as well.

So, it is important of understand these different mode of thinking, choose one or more and switch between them to solve our problems. It is nothing new, we all know this, but just to get to know and organize into you mind. 

Monday, January 19, 2009

Bits – Eclipse, Java.

In most of our programs, we used to start with hardcode string values and debug or test. If that work fine only we used to move to re-factor the code into more general program. I think that is easy also, because at first we don’t need to worry about other than the logics and necessary API calls. Here is a way to easily construct the strings with eclipse which I normally use when I am writing in Java.
Say for example I want to print some thing like this: “Hello user_name, you are user_age years old”, where user_name and user_age suppose to enter by the user from command prompt.

We will start with following:
System.out.println(“Hello Nimalan, you are 25 years old.”);//hardcode strings
We have to end with this:
System.out.println(“Hello ” + args[0] + “, you are ” + args[1] + “ years old.”);

So, in between the above string we have to put quotation markers and plus signs if we go and edit directly. But with out doing that try out following: 

First move the curser before N of Nimalan and press enter. Eclipse will add necessary quotation marks and plug signs for you. You will get like this: 
System.out.println(“Hello ”+
                                           “Nimalan, you are 25 years old”);
Now do the same after n of Nimalan then you will get following:
System.out.println(“Hello ”+
                                         “Nimalan” + 
                                         “, you are 25 years old”);
Ok now you can replace the “Nimalan” with args[0]. Can’t you do the same for 25 too?
This is just a small example, but this will be very useful in changing hardcode strings into variables, constants or into properties files. Enjoy! :).