26 January 2009

Design Pattern Tutorial


Design Patterns (Work in Progress)
Creational Pattern


19 January 2009

Core Values - Why is it needed?

What I was
"I am an ordinary software engineer and whatever I am going to speak is not going to have a bigger impact on my company and mankind. Also, I don't think the outcome of the events will vary greatly if I am not going to have certain core values. I feel that the outcomes, irrespective of whether I have core values or not, is not going to vary. However, I feel that I am undergoing a lot of churn in strictly following core values when compared a person who is loosely following certain values and certain people who just do the lip service. Given this scenario, is it possible to convince the person of this nature and make him a better and soulful human being." I was this kind of person, trying to have core values half-heartedly, trying to live and yet at the same time slowly dying. I also understand that if I do not have core values or if I live as I wish, I am doing a sin not to the world or nature but to my soul. Though, I may enjoy the deviation from core values in short term, my conscience is going to keep coming at me. Either should I settle for short term or long term happiness? The answer for this question will help me to decide whether to stick with core values or deviate from my core values. As a human being, one's brain always prefers long term benefits. So it is right to have core values thinking about long term benefits. Is this reasoning right?

What I am
I feel that you are going to keep up core values because of some benefits, there is a some business between you and core values. But, the core values, are something to do with souland not with the physical and emotional body. When you have core values, it is similar to that of realizing your soul and talking to your soul and ultimately talking to God. There will be a resonance between you and your soul. You and your soul become synonymous. This is the reason why you are getting long term benefits when you have core values. The resonance creates so much energy in oneself. Also, the energy is coherent and intense like a LASER beam. Only the other kind of people who have this energy is "a Child". The child always talks to his/her soul but he/she never understands verbally/emotionally that it is soul.

The Creator (or the nature) is quite aware of this and that is why HE has hidden soul from physical body. If you have found the existence of your soul, you will end up having core values and will be placed high on par with Rama, Krishna, Jesus, Allah. Like me, if you have identified that there is some connect between core values and other thing (which you cannot explain), I believe, you are right on track. Explore further and enjoy the bliss.

To sum up, some time back, I decided to explore the interconnectedness between soul and core values. What about you?

18 January 2009

Touch and Transform Lives - Build India

Anyone who uses Internet will understand its benefits and I agree with me if I say that Internet has wealth of Information. Not only we use Internet to connect with our closed ones, many educational institutions are started to change their learning methodologies. Internet has become a platform to deliver online classes and training. The advancements of video over Internet and video over mobile is going to take us much closer to our dream of classroom on the move. Your location is going to be immaterial, the classes will be delivered to you with Internet and mobile. This is looking from technological perspective and what is feasible with technology. Most of the things will apply to developed countries where these technologies are affordable or more rightly, the people have buying potential as their per capita income is high. The technological advancements will bring the next revolution in developed countries.

However, in countries like India where the majority of people do not have buying capacity, these technologies will take time to penetrate into Indian markets. Again these technological advancement, if not properly employed, is going to divide Indian society - the people who have access to these technologies and the people who do not have access. The main advantage of India is having people in working age compared to Europe, China and so many other countries where people are in retiring age. But, according to researchers, this is not going to be easier job for India as the policies are focussed on quantity but not quality. Certain reports question the quality of the graduates and claim that most of them are not immediately employable. Their claim is proven valid as we see a trend of increasing colleges and increasing rate in unemployment. Many corporates started to feel that heat and we will see a lot of churn post global economic downturn (In India, after economic recovery, I feel the training industry is going to boom. We will see many training companies that focus on imparting experiential knowledge). The corporates are breathing easy as demand matches with supply. However, after recovery, the demand will be more and the supply will be less. 

There is a heavy irony. Many of IT services company work on these technologies and take part in the Information revolution. But yet, we have so many Indians who have deprived of not these advanced technologies but even basic Information to get a job.

Many corporates fail to notice that they need to get people from the pool of available graduates. They have a blurred vision on elevating the average knowledge of college graduates/students. While corporates are focusing on profit margin, innovation and market positioning, they fail to see the important issue - "basic supply - human resources". Why the companies in India does not ask their employees to go back to some colleges and impart some useful training to students. Won't it help the students and corporates in a long run? Don't these companies have money to deliver classes to villages with the help of technological advancements.

One can look at this as CSR (Corporate Social Responsibility). At the same time, this is not purely a charity work, it is pure business. It is bread and butter for them as they heavily depend on the local workforce and its quality. If they fail to act now, they should be prepared to hire people and train them during the job which is very risky. So, either you have CSR or not, act right now.

Your CSR rating is not in the number of MoU you sign the colleges. It is directly proportional to the number of lives you touch and transform.

We strongly believe and want to bank on bright Indian brains. We have rolled out an initiative OpenGyan targeting colleges. We welcome you to join on the board. If you can't, at least spread a word to your friends and closed ones.

Linux Programming Tutortial Series

Having worked in Linux in my leisure time for the past four years, I would like write series of articles on programming in Linux. Though, there is no difference between Linux and any compliant systems as Linux is also POSIX compliant, it is worthwhile effort to learn Linux programming. POSIX is specification and by using POSIX interfaces one can write portable applications that work in any POSIX compliant systems. POSIX does not specify how a particular API (Application Programming Interface) has to be implemented. It is freedom given to operating systems. In this series of articles, we will be discussing, slowly but steadily, various POSIX standards, library functions, systems calls, sample programs and discuss how POSIX can be used. At the end of this long journey, we will understand most of the POSIX APIs and if we have will power, we will also learn the internal implementation.

As a usual disclaimer, I am not a subject matter expert but I do have four years of experience in writing Linux applications using POSIX. At the end of this journey, I strongly believe that my knowledge and understanding about Linux will be improved. I am planning to cover the following topics in coming months.

1. Process
2. Memory Management
3. Threads
4. Interprocess Communication
5. File I/O

Since this initiative is at a earlier stage, I am not sure about how often I will write but I am sure that I can write one post per week. I have also created a widget "Tutorials" and added "Linux Programming" make it easier for the readers to navigate directly to the tutorial.

Like me, if you are also serious about learning Linux, I would suggest the following
1. Get a PC with Linux installed. You need to work out at least 30 minutes to 1 hour, try solving exercises and examples. Trust, it is worth doing.
2. Get a book on C programming (you can find a lot of resources in Internet. Just google)
3. If you do not have a PC, at least I request you to think about exercise and write the programs in piece of paper and do the hand calculation. A Programmer does not need a computer to program :-)

Happy Learning

17 January 2009

Don't be perceived as sucker

I was reading bunch of articles in HBR. The interesting reads started with a good case study which was powerful, helped me to validate some of my ideas and gave new insights. The core theme of case study is how to deal with people or boss-subordinate relationship to be precise. It is quite usual and reasonable for your subordinate to think you as sucker if you really suck (from his perspective). You cannot just cover up. Get your basics right and update your knowledge.

While the global economy is in a see-saw, the companies are preparing to improve productivity and come out with a distruptive innovation to transform their capabilities, market share, growth and bottom line. If you are in knowledge-based industry where the productivity is in the hands of human resources, your ability to connect with people and understanding your team plays a key role for your organization's success. Period.

Today, the world is seeing a transformation in learning. The people, apart from reading books, they started to learn from their work. Some of the old tools and management styles will not excite the next generation. It is time for the old generation to understand the expectations of the new generation and channelize them. The new generation see their managers as not managers but as coach. They do not see their work only as work but also as case study.

So, it is quite natural to have differences of opinion among people of different generations as both the generations have blurred vision about the other. It is high time for the managers not only to know about individual behavioral patterns of their teams, it is worth spending the time on understanding the generation gap and leverage it to the team's advantage. As you move up, you will come across people of many generations. So, learn it now else it will be too late to learn. Jim Collins used to say about himself as life long student. It is an evergreen word and it perfectly fits now.

16 January 2009

Be prepared to execute - Don't let money to overburden you

The recent economic crunch has imposed serious implications on the profitability of some companies, the growth of some companies and bombarded the morale of the people. Yet there few good companies out there who do not believe in mass layoffs. Though, laying off people may help you in short term, laying off people in large numbers will have adverse effects on the companies' long term growth strategy. If you are going to layoff people just to cook up your balance sheets thinking that you can aggressively recruit people when economy recovers, you can proven wrong. It is natural law that when you go for a shopping on "Black Friday" all the offers are over. You will end up grabbing very few or none at all. These are just knee jerk reactions that could potentially cost your growth and market position. Rather, be aggressive internally to improve productivity and let your people know that productivity matters a lot. The productivity will manifest if you have focus and the focus will bubble up if you have interest and the interest is culmination of your passion, the burning desire.

Try to make people loyal to you, may it be your teammates or the customers. The character is something which you show up when you are in difficult times. When you connect with your existing customers and understand their concerns and address them, they will become loyal to you and evangelize your delivery capability. Similarly, when you show kindness, openness and warmness to your teammates, they will turn loyal to you. The loyalty does not know anything about economies. People will be there with you when you badly them. Tell your teammates who are low performers on how much they affect the team. Try to mold them, mentor them and coach them. Put the team ahead of your career growth. Make them feel that they are in the safest pair of hands and they are not risking their career being with you. Great leaders do this (and of course I got to learn from those people).

If you are an employee working for some company, try to read the vision of your company at least now. While I accept that "old is gold", some times "old is rust". Get rid of old ways of doing things such as practices in human resources, engineering, quality, project management. Now, the internet has become a huge database. Employ "sensible data mining" to leverage the huge database which does not cost you much (in most of the cases). Today, you can be happy to know about Web 2.0 and probably before we recover from the short nap, the world would be having Web 3.0. The entire world might be doing some sort of distributed computing with mobiles/personal computers. Be prepared for a change and most importantly "be spontaneous in acting for the change". Once you do that, you should be seeing yourself taller and in elite club.

Do not let money in multiple forms balance sheets, stock prices, CTC, bonuses and fringe benefits to take control of you. Allow the paddy to ripe and then do the harvest simply not because it is one of ways harvesting, but because it is right way of harvesting.

15 January 2009

CoW - Linux way of creating process

Linux operating system is one of THE most popular operating systems and continue to lead the embedded operating systems markets. In this blog, I would like to give an overview of a design decision in Linux and it is one of the reasons why I see Linux not only as Software but also as an Art. The kernel developers thought leadership is unquestionable. I am great fan of Linux Kernel Developers. Without bogging you down, let me come to the point directly. The rest of this post tells one of the reasons "why Linux is masterpiece?".

UNIX operating systems create processes using the system call fork () and overlay (load) a binary/executable image using exec () system call. The system call fork () does not have a parameter and the system call exec () few parameters to load a program from a permanent storage (File System). Practically, the system calls fork () and exec () are twins; fork () is the elder brother and exec () is the younger one. Let us first see the functionality of “fork”. As you may know a process is program in execution that has a state such as data, heap, stack, pending signals, open files and environment variables. When you want to execute something, let us say running a command “ls” from the shell, the “shell” process typically calls fork (). When the fork () is successful, the kernel creates another process which is copy of the process. So each successful call to fork () returns twice – once in the called process (aka parent process) and second time in the newly created process (aka child process). As a standard, all the operating systems copy the address space of parent process and create another address space. There is a overhead involved while creating fork’ ing a process.

Shortly after the process is created, either parent or child process is loaded with some other program. Typically, one of the system calls in “exec” family of system calls is used. When “exec” is executed, the entire address space of the called process is recreated. So there is considerable amount time spent in this “double creation”. Surely, there is some kind of optimization can be done to gain substantial performance.

In Linux, fork () does not copy the address space but just simply creates the kernel data structures needed to the new process. Now, both the parent and child process uses the same address space and the entire address space is marked read-only. So, both the parent and child process can continue to read the process address. When any one process tries to write to a page (memory page), the kernel duplicates the address space and creates the address space. But this is unlikely to occur. Another scenario is the loading a new program into memory. When this occurs, the kernel any way creates a fresh address space and starts to execute the loaded program. By this approach, the “double creation” is avoided. The deferring the duplication of address space has given a performance and sometimes procrastination helps.

The functionality of fork () is called CoW – Copy on Write. So from next time, when you see a Linux box and a running process think about CoW. But you have two process after fork (), which process will be scheduled first? Yes, Linux is a masterpiece. On a lighter note, CoW can also be described pictorially as below.



Taken from from my previous blog


14 January 2009

New Hopes for Outsourcing and Co-Sourcing - Thumbs up

Satyam fiasco has taken unimaginable proposition and sharp reaction is coming from developed countries (people from developed countries) such as US. Given the current economic crunch and the fact that it does not show any signs of recovery in near future, so many people are fearing that they will be out of their jobs in those countries. Many has already lost their jobs. It is very bad situation for those people who want to retire but ended up working few more years as their retirement fund has eroded. Since the recession is much deep rooted, there is fear that there will be few more rounds of layoffs before showing some hopes of recovery. I would like to give my views on global economy and how it is positioned to go to next level by banking on the growth/consumption of developing countries.

With this backdrop, Satyam's melt down has imposed serious implications about the credibility of its Indian peers. The people, who question outsourcing and its effectiveness, wanted to make use of this opportunity to advocate more against outsourcing. Some of them argue that outsourcing does not offer value. However, I would like ask a simple question, "Without any value or advantage, why many jobs are outsourced for more than 20+ years and to continue to outsource or co-source". The companies will have their own strategies for outsourcing. That being said, the emerging markets are not only focused on creating more jobs by outsourcing, they are going to be biggest consumers going forward. As a matter of fact, many, including UN say that the world is tilted towards emerging markets. Refer the article. So when the growth in emerging markets, it is worth investing in the emerging markets.

I strongly believe that the people who are reacting sharply during this downturn and more sharply after Satyam's accident will turn the other way. Once the current unemployment pressure cools down, these voices will be come down. At the same time, the big players of Indian IT should continuously innovate in their business models and to make sure that there is high accountability in the delivery moving towards risk driven or accountability driven business models and output/productivity is predictable and reasonable. They should stop being another shop or backyard to any developed countries but to deliver high values their customers. Indian IT companies should continuously keep their cards open for moving beyond outsourcing to matured partnerships.

Also, all the corporates in developed countries would like to do business in emerging countries where the population is huge as the consumption will be more. When you want to market your products in emerging countries, it makes sense to set up office and employ local talent for operational efficiency (low cost) and high skill (local talent have knowledge of the culture and marketing strategies). From my point of view, Outsourcing and Globalization are two sides of a coin and one cannot exist without the other. As long as outsourcing is stopped (at policy level), the outsourcing is going to continue. However there could be margin pressures (from my viewpoint, this is more a sort of operational challenge) which matured Indian IT will be able to handle in a better way.

More than outsourcing, the need of the hour is ability to absorb and take part in the growth of emerging economies. Surely, the emerging markets have potential to take the global economy to next level provided it is used in proper way. As an Indian and an Engineer from IT industry, I strongly feel that the growth of Indian industry and particularly IT space is promising. You will see more and excessive jobs getting created in India after this economic downturn (which is likely to recover in another six months flat). To sum up,

1. Please do not generalize things unless you see a trend especially if it is bad.
2. When US/European economy recovers, more jobs will be created in US/Europe and then more jobs will be outsourced.
3. The emerging markets are going to lead the next phase of the growth of global economy and this will also create substantial jobs in emerging economies.
4. When more jobs are created, the consumption will shoot up and this will take our planet to prosperity.

Yep Cloud Computing at striking distance

It was Wednesday morning and you are heading for your office to meet an important customer. Your close and long-time-no-meet friend calls you up as you drive your car. You pick up the call, the car senses that you are on a call and it fixes up an upper speed limit until the call is terminated. You start to have a conversion with your friend. Both of you agree to meet the dineer. At dinner, you guys decide to go for a weekend tour with few of your friends. With hundreds of tourist spots, based on your preferences and your friends' preferences, your mobile gives you few destinations with best deals for air travel, hotel accommodation, tourist guides, cabs. You enter the number of people and just touching the mobile screen once to say "ok". Mobile takes care of making all reservations and gets confirmation. Once all the reservations are confirmed, the mobile runs "traveling salesman algorithm" for your entire trip and gives you the itinerary.

Performing all these operation in mobile will be costly and time consuming. So, these complex operations have to be performed in remote places. The mobile just issues the command and will not be interested to know "how the information was processed". In order for the mobile computing be successful, the integration of mobile with cloud is very important. The cloud can be at service provider's network or the mobile can connect to the cloud of another service provider. The mobile-cloud integration is key and will be cornerstone for next mobile revolution. There are lot of developments having in this space. We should be hearing some stunning announcements in near future. Keep a watch on Google.

12 January 2009

Few snakes are out - World Bank again

The recent mayhem of Satyam's Ex-chairman caused a lot of worries. There are heated debates in Times Now, CNN IBN, NDTV and NDTV Profit. The reporters are doing a decent job in trying to bring the facts to the viewers. It is painful, alarming, disgusting and never-again accident. The "so-called" corporates are trying to prove that they are on par with politicians. The politicians do vote bank politics to give power in order to earn money. The corporates are clever enough to avoid a redundant step of trying to capture the power. The news on Satyam have not dried up yet and in fact there are lot of developments such as grilling of "ex" Chairman, MD and CFO.

Now, few more snakes are out of the park. Again, World Bank has opened its mouth saying that it has barred few more companies. The companies are Satyam, Wipro and Megasoft. All the companies, at some point of time, were trying to give "improper benefits" to bank's staff. World bank has started to dig the mess to find some of its employees have illegal partnerships with above stated companies.

If you are curious to know more about the story, here are the links.
Wipro Story
All Stories

Let us give some time for the corporates to give some meaningful and sensible answers. If I am not wrong, one of the executives of Wipro was trying to justify the deed by conveying that Wipro does not have more exposure (less than 1 million $$$ aggregated revenues for eight years) to World Bank. This clearly shows that Wipro neither cares about its credibility nor its investors. At this point of time, I would like to believe and hope that the bad news (developments of yet another fiasco) of Wipro ends here. Because, even in the case of Satyam, everything started with World Bank and the end is terrible.

So, at this point of time, my question is "who's next".

11 January 2009

Google Search - What is going to be its future?

Google has certainly revolutionized Internet by providing lot of web applications. Google touches everyone's life with those tools and it is quite reasonable to state that anyone who uses Internet would be using at least single Google web applications. Most of their service or tools based on "SaaS". But the cornerstone of Google in "Google Search". Internet search and crawling existed much before Google, however Google search was efficient and marketed very well. From my point of view, the success of Google can be attributed to "Google Search". Again, if we dig the success of "Google Search", it is due to the power of its search algorithms.

Having said that, prior to Google search, the entire search space was fairly static and handful of people were using the search engines. Until then, the necessity for search engine was not pressing thing meaning that the amount of information was huge however people were not interested to know them. During the time frame or slightly before Google's entrance, the entire Internet was undergoing a disruptive transformation. Some of the existing companies were not in a position to get hold of this disruption and many of the companies did not spot the opportunity.

Google's entrance with its search, has totally transformed the usage of Internet and took Internet space to next level. Shortly after that, Tim O'Reilly coined Web 2.0. Web 2.0 has taken many web application to different plane and again Google was spot on and responded well to Web 2.0. In addition to its response, Google created market and made competition irrelevant with its applications.

However, I have feeling that now Google now become an elephant. Because of its revenue from online ads, it is failing to spot another transformation in Search. The data provided by any search is fine but the volume of data being presented is so huge. So the entire "search" space is going to undergo another change where the algorithms will be working based on user requirements. We are seeing websites such as Stumbleupon which are gathering momemtum and this clearly shows that Internet users another level of Internet search.

Also, I feel that any changes in "Internet Search" will be of primary concern to Google as it can directly affects its revenues. For example, if the search works based on user requirements the probability of the user clicking the ads is more. When the ads are clicked, it is money as more and more advertisers/publishers are going to come to them. It is time for Google to be ahead by constantly working in its flagship product "Google Search". It can either organic or inorganic :-). But I feel that there are more chances of Google going in an inorganic way.