Author Archives: sudhans

Facebook GRAPH


I know everyone(at least pretend) uses Facebook and you should be noting that for last few weeks your Facebook homepage must me appearing different. Don’t say me no. It’s all due to new application from Facebook called as GRAPH. The is the 3rd revolutionary application from their stable. The other two were Newsfeed and Timeline.

So what’s Graph, it’s a search application (remember the various graph algorithms we studied in our days of Engineering) and it works in the same fashion. Suppose you wanted to search anything about let’s say about Tiger. Traditional search solutions like Google will return the same results for everyone unless you signed in google and they track your search using the cookies. Facebook GRAPH will use your friends list (Deloitte calls it as Networking) to get everything related to Tiger. If someone in your network had visited Bandipur and commented that its better than Mudumalai, it’s going to influence your decision. Some of us stalk behind people to get info, no need going forward.

You can also have a little bit more insight about graph based search from the below link,

Regarding the privacy, yes Facebook allows to have a control on the visibility/availability of your profile for search.

New ICC ODI rules-An act of stupidity


The all new rules which allows only 4 players outside the circle in non power play overs is a total stupid thing according to me. The bowlers are totally at the mercy of batsmen and they need to constantly reinvent themselves and change the field placings accordingly. We can always expect a 300+ score and we don’t know which is a safe total. Only when the batsmen make mistake the game can come alive or else there is no interest in the match.I see people telling with pride about India’s successive 300+ scores but they escaped despite spirited chase by the opponents due to some good fielding efforts. The rule change is primarily to break the record books where Sachin records will be under threat on going forward. I lost interest to see the game and feel sorry for the Indian bowlers.

Sorting a table in subquery


I recently wanted to sort the records of a table while inserting. We can’t use order by clause in a sub query and  was curious to implement as it solves my issues. Then i found we can use RANK() function for this. Here comes the query,

INSERT INTO TEMP

(EMPID, RK_NBR)

Select EMPID, RANK() OVER (PARTITION BY EMPID ORDER BY ADRS_EFCTV_DT DESC) FROM EMP

We can use this query to when we need to use multiple joins as ORDER BY cannot be used in between. Similarly in some databases like Oracle and Teradata doesn’t allow usage of nested aggregate functions like RANK(COUNT(<COLUMN>)), in such cases we should use QUALIFY function over the result like

Select EMPID, COUNT(*) OVER (PARTITION BY EMPID ORDER BY ADRS_EFCTV_DT DESC) FROM EMP

QUALIFY RANK() OVER (PARTITION BY EMPID  ORDER BY ADRS_EFCTV_DT)=1

Whats happened to Tamil Nadu??


The situation in Tamilnadu looks tense for the past 5 months ever since the Dharmapuri riots. Suddenly it looks like the entire state is divided on caste lines. The state which boasts the strides made in the social development suddenly falls back. Karunanidi & co which frequently speaks on ideals of Periyar becomes silent on the burning issues which clearly shows they are power hungry and no longer interested on their much talked ideals.

They said love marriages will eliminate the social evil called castes but now this happens to be rallying point for all caste based parties which till recently were just fringe players. They all unite under a forum and Mr.Ramadoss goes in air officially and says like Yadavs voting for Samajwadi, Vanniyars should vote for them alone. I have never seen such a power hungry person who will use the fault lines in the system for winning power at any cost.

Its a shame that TN government was like a sitting duck when PMK hoisted its flag on shore temple as if it was their citadel and government was taking action after everything instead of preventing such a heinous crime from happening. Let me come to my personal experience which i tasted first hand.

A guy repeatedly takes a ordinary raw mango without paying, when encountered on the third day, he threatens that he will wipe out entire caste as they are just four houses. The elders are sitting calm and watching the drama to unfold. when  the shop keeper threatens to goto  Police the elders intervene. (f**k these elders who have the responsibility to avoid this at first hand). I was travelling last week by taking risk, i see a van full of PMK people moving infront of the bus and i was guessing that some thing is going to unfold. As expected after few kilometers the bus comes under attack as stone bashing people throw stones at the bus taking the advantage of higher ground. PMK is known for chopping trees whenever there is a protest.

What happened? What should happen next in Srilanka for Tamils ?


Everyone in Tamilnadu has jumped into a chorus for taking action against Lanka for violating human rights during the final phases of civil war. It has become a habit to shout and forget later. No one really cared when the things were bad during the civil war with then CM Karunanidi threatening a fast until death. See the below image and you will understand the drama.

Comedy

Comedy

It didn’t even last a day. Later when he was asked about this episode, he was good enough to dodge by informing that Centre and Rajapaksha cheated him. He didn’t have any guts to come out of UPA since he and his family was under spotlight for 2G spectrum case. Now for narrow political gains for upcoming 2014 general elections he and his son is playing a drama again.

With the death of Prabhakaran, one of my hero’s war came to an end with still some of my fellow srilankan tamils surviving. But now the focus should be on how to find solution and how the Tamils should be integrated with sinhalese. Its very foolish to still rely on the past and we should be careful enough so that we won’t forget the lessons learnt from the past.

Let’s come to the point on why LTTE assassinated Rajiv, our late PM sent IPKF and in the course of time our soldiers lost their morality by raping and doing all sorts of non sense. There was violence in LTTE but they didn’t behave like their African counterparts. Thats the reason they were able to sustain their fight for so long. Angry with the Indian soldiers LTTE assassinated Rajiv. They lost their support in India.

My support to LTTE is always limited because if I support them i don’t have any moral right for supporting India’s cause in Kashmir. I’m first an Indian and later a Tamilian. Support the cause of  Tamils within the unified framework of Srilanka. A healthy neighbor is good for India. Gone are the days were a person can board Boatmail from Chennai to Rameshwaram and get a ferry to Mannar and catch a train to Colombo.

 

Insights of Indian Healthcare system


Following are my insights on how the Indian Healthcare system is functioning. I will start by providing a bird eye view of the system.

Bird Eye View

•Universal healthcare system – No patients are rejected for want of money. (Government hospitals, never charge money for nearly 99% treatments.)
•Healthcare is a concurrent subject – Both state and federal governments are responsible for betterment of people.
•Government’s expenditure on Healthcare is less than 3% of GDP.
•Opened for private sector participation during the economic reforms of 1992.
•Less than 15% of people are insured where as more than 80% of people have  access to telephone.
•Indian pharmaceutical industry is matured enough with government support supplying cheap generic versions of major drugs lowering the cost of healthcare.
•Indian origin doctors constitute the vast majority in numbers, in much acclaimed NHS of UK.
•All forms of medicine like ayurvedic, allopathy and Unani are encouraged by Government.
•Known as diabetes capital of world.
Role of Governments:
•Federal government defines healthcare policies tailored for India through Ministry of health affairs.( e.g.: Pulse polio eradication program)
•IRDA acts as regulator governing the health insurance sector.
•Employees State Insurance Corporation (ESIC)
–All employees earning less than 15,000 must be enrolled with both employees and employers contributing amounts.
–Employees can access free healthcare through its network of hospitals and dispensaries.
•Federal government provides super specialty services through organizations like AIIMS, JIPMER, etc.
•State governments through primary health care clinics and general hospitals. They act as implementers of federal policies like NHRM.
•Railways through its Lifeline Express (Hospital on Wheels) provides services in rural areas.
Role of Private sector and NGO’s
•Its still in nascent stage ever since Healthcare was opened during early 1990’s.
•In terms of capacity by no of beds, Apollo hospitals takes the top slot followed by Fortis healthcare.
•Provides affordable healthcare through their own strategic models like Narayana Hrudalaya and Sankara Netralaya.
•Helps in earning foreign exchange through medical tourism and export of generic drugs.
•Bill & Melinda Gates foundation and USAID are major foreign NGO’s helping India in Polio eradication and along with spreading awareness of AIDS through campaigns.
Health Insurance:
•Its still in nascent stage ever since Healthcare was opened during early 1990’s.
•In terms of capacity by no of beds, Apollo hospitals takes the top slot followed by Fortis healthcare.
•Provides affordable healthcare through their own strategic models like Narayana Hrudalaya and Sankara Netralaya.
•Helps in earning foreign exchange through medical tourism and export of generic drugs.
•Bill & Melinda Gates foundation and USAID are major foreign NGO’s helping India in Polio eradication and along with spreading awareness of AIDS through campaigns.
Key Challenges:
•Creation of infrastructure to increase the number of beds per person especially in rural areas.
•Better insurance coverage.
•Creation of IP’s like indigenous vaccines and molecules.
•Collaboration with private sector through PPP mode.
•Need to control excessive usage of pesticides to avoid cancer and other ailments.
•Creation of better educational opportunities for producing high quality medical and Para-medical staffs.
•Production of low cost medical equipment for better reach and diagnostic facilities.

Why it happens in India alone


For last two weeks, New Delhi was boiling with youth demanding action on the perpetrators of gang rape case. I support their demands but it’s more serious to analyse the root cause behind these cases.

The Indian society is divided into rich, middle and low by some people. For the last two sections of people the sole entertainment is only movies which showcases how the rich lead life. In reality also most of the rich kids enjoy the same before they get serious in life and carry forward their family legacy. This I have too seen personally.

But for the other classes, they want to imitate the rich fellows and lead a life like that. So when they don’t get the opportunity they pass lewd remarks on the women and for them all girls/women will be sluts. When they are confronted they get enraged or they are provoked by their rich due to their classy outfits.

With my words i’m neither supporting or against the any people and my view is also a point that has to be summed with other issues.  Kindly let me know your comments on how to ward of this evil from society

Partition, Index in SQL


Partition:

The most widely used partition for improving performance is Range by partition. The data in tables are physically partitioned based on the parameters we choose. It can be daily, weekly, monthly or quarterly based on the volume of data we are processing. Say quarters, the data will be partitioned into four quarters.

CREATE TABLE t1(c1 INT) IN tbsp1, tbsp2, tbsp3

PARTITION BY RANGE (c1)

(STARTING (1) ENDING (99) EVERY (33))

Index:

It is primarily used for better query performance for searching. We can create index for a field or a set of fields. It’s like a primary key index. But it may cause performance degradation. Either we can create clustered index or else unclustered index. Creating clustered index degrades performance as it sorts the data in key order and every time tables will be sorted resulting in longer query execution times.

Best practice:

Create partition and index on same set of columns like below,

……partition by range (Region) create index <idx_name>(Region)

FDI in Indian retail – scope and out of scope – will Walmart sign SoW with India


So finally UPA government under Chidambaram found courage to open up retail sector especially in multi brand format for FDI. Now many people are up in arms against and in the same time there are lot of voices in favour of it. Is it going to really destroy kirana shops and no answer as experts are vary of it. We can hope that it will bring professionalism in that sector.

Image

Currently in retail, many say farmers are in the receiving end as they are not able to get good value for their produce. People argue that farmers will get a raw deal as big retails build their logistics and procure directly from them. But even today farmers who are making use of their intelligence are earning a lot. Those who are averse to the current scenario’s sell them to middlemen often called in commission agents locally. So will they really lose their jobs, i say a big no as they can still act like farmers and can still continue to sell them to multinationals since most of farmers are unaware of this process. To make a change first in this highly globalized world education to the farmers on how this process works in a foremost thing.

Next i will come to kirana shops, they always carry a first mover advantage and a good retailer who is not greedy and reputation will still command a set of loyal customers even if walmart is in neighbourhood. Only thing he needs to do is reinvent himself in this changing times. All walmart stores in single brand retail in partnership with Bharti group are yet to turn black and keeps on accumulating losses. They need to pay a lot in getting a decent place in this high real estate prices.

Indians are big discount buyers and even if big brothers give huge discounts to get high footfalls, it will lose steam once discount is over. (In annual walmart discount sale in US, Indians are the one who stand in queue to enter like booking TATKAL tickets). So at the end they are not going to succeed.

Finally even FUTURE group under retail mogul Kishore Biyani is struggling to book profits and under heavy debts it sold pantaloon to Aditya Birla group. So odds are against them and no worry to Indian kirana stores and a happy ending for them.

How Indian federalism is threatened?


I was forced to write this article as i felt very disturbed with the latest round of  geo political issues the country faces and it really threatens the existence of India as a whole.

The UPA government is grappling issues from across all sectors and i thought of highlighting them individually.

1.Indian Economy

With very high fiscal deficit, lack of political will for fiscal reforms, policy paralysis, crumbling GDP figures and IIP figures, etc,.. I don’t even see any place where there is sun shine. The scams from Coalgate to 2G spectrum is preventing the government from making any policy decisions.

2. Internal Security

Chidambaram who somewhat showed that he can make tough stance against terrorists by revamping the internal security mechanism failed to take state governments on board on NCTC as it somewhat appeared to be encroaching the authority of states. They must have better continued using POTA. Still Maoism and cross border terrorism is continuing unabated.

Coming to the recent ethnic clashes in Assam, BODO’s and illegal Muslim settlers from Bangladesh, the Government handled badly with local clashes spilling over and affecting the life of entire country. The Congress government is in dilemma to balance vote bank and national security.

We can’t feel pity on north eastern states for their plight, as it is self manufactured by them in late 80’s as they violently sent all the outsiders from their states and to stop the violence Indian air force bombarded its own cities. Since there was no free media those days we didn’t know. None ventured there to start any business and it soon became economically backward. The government should repel the acts such as only native state people can buy property in their states which is a handicap in Kashmir and the people can’t feel Indian if there is such acts. The oneness of India is absent in those places till that we will be split in various lines of ethnicity, caste, religion,etc,.