Friday, September 23, 2011

Lokpal Is Not The Magic Wand

Anna has created the national movement which has shaken the masses to action and the government on its table.

However, the citizens of the country are shouting against the graft as if its the only problem that we have - the magic wand of the Lokpal will just solve all out problems and we will have the Ramrajya. But corruption is not the only problem we face. True, Lokapal will create transparent systems and we should aim for it. However some of the problems which we face are not due to the graft but because of the poor decision making, weak foreign policies, populist measures etc. as well. Here are some of the few:

1. Environment: This is a global issue. But we needs to put up a firm step. We are the country that will be one of the worst affected by the environment changes. We need a well thought out framework which gives us sustainable development and living.

2. Insurgency: Matters related to national security are kept under black covers and these matters cannot be scrutinized publicly. Issues of Kashmir, North East states and Naxalism cannot be solved by mere force. We need strong public opinion and political willpower to rise above petty differences and provide long term peaceful solutions.

3. Security forces atrocities: AFSPA is a menace for the people in North Eastern States and Kashmir. Even if we keep that aside it, a lot happens in the police stations as well. Section 197(2) of IPC, 1973 Code of Criminal Procedure and various state laws provide various immunities to police and security forces. Its not a surprise when they have been alleged about false encounters, forging evidence and human rights violation. We need better training, proper equipment and effective intelligence, not more of Daya Nayak's.

4. High-handedness of elected politicians and higher officers: A series of transfers follows every appointment of CM and PM. Mostly based on the loyalty and affiliations of officers than professional excellence. Also, the statues and parks constructed by UP's CM Ms. Mayawati are legal. So is the change of the Indian Railways headquarters from Delhi to Kolkata by Ms. Mamta Benarjee. From hikes in salaries of MPs and MLAs to the various amenities enjoyed by higher ups are legal, many times without justification.

5. High Population: Everyone talks about corruption, but none discusses its most prominent reason.

   '''High population and paucity of resources to satisfy them'''

With India's population set to become maximum in coming decades we will face food, water, energy and health problems unprecedented. We need more than just adverisements for population control.

6. Social inequality: Inequality in out society based on gender, caste, religion, region and ethnicity is deep rooted. Making the laws doesn't actually help. Untouchability is a crime, but it is still practiced in many parts with impunity. Reservations have become a political issue. Societal changes need altogether different movement.

Friday, August 26, 2011

Why Anna's Fast is Famous and Sharmila's Fast Still Finding the Grounds



The recent fast by Anna Hazare in Delhi at Ramlila Maidan has found the massive support. Also called second freedom struggle, August Kranti and other names by various media; the movement has gathered unprecedented momentum.

All over the country people are organizing processions, human chains and protests in whatever way they can. The so called middle class or salaried class which is considered politically dormant has come up openly to support the movement.

Any fast would be compared to the ten year plus fast by Irom Chanu Sharmila of Manipur. She is fasting for the repeal of AFSPA from North-eastern (NE) states of India. Critics have drawn flak over negligible support for Sharmila in other parts of India. Her demands are graver and her fast so long that it has passed any standard benchmarks of fasting. The debate will continue, however the reasons for little support for Sharmila's cause and massive support for Anna's need to be pondered:

Communication With Masses: She is being kept in judicial custody. This has cut her from the public contact and the media. While Anna is in continuous communication with media. Team Anna even appeared on reality and competitive shows on TV which are watched by masses.


Specific Cause: Her demand for repeal of ASFPA which is applicable NE states goes unnoticed as it hasn't affected the masses in India. Its sad but true that masses do not connect to Sharmila's cause.

Lack of Proposed Solution: Anna proposes a solution to corruption as Jan Lokpal. Repeal of AFSPA is a very legitimate demand. However Sharmila's demand doesn't put a solution about how the insurgency and extortion happening in NE states should be tackled.

AFSPA: This is a vicious circle. People cannot come out in support of Sharmila like they have come out for Anna. Forces can simply disrupt any protest without the need of a reason.

Team Anna: Anna is surrounded by able and experienced people who are capable of handling various aspects of mass protest. Kiran Bedi, Arvind Kejriwal, Prashant Bhusan, Shanti Bhushan, Santosh Hegde etc. have managed the various aspects of the movement like [see this]. Their insight and knowledge about working of government, police, media and law kept the authorities at bay . The protest went like clockwork as if all steps were already well planned and considered heavily. Remember how  protest by Baba Ramdev went haywire.


Friday, July 22, 2011

Found the distant tower at last

You can see the tower in the red circle below, visible from IIT Guwahati:


 And here I found it:



And it tool me these broken stairs to reach to it:


Similarities between IIT Guwahati and Hogwarts

1. Both have lakes, hills and variety of flora and fauna, making the walks in the campus pleasurable.

2. The headmaster in Hogwarts and the director in IIT are revered by many and also hated by many. Both are kind to students.

3. The ministry in the magical world and MHRD in India both interfere in the respective institutes a lot, sometimes with comments in newspapers and sometimes with policy changes.

4. Students in Hogwarts searched for secrets passages to get out of the castle. Students at IIT fish for loopholes in computer network to download movies and do other stuff.

5. Hogwarts has houses. IIT has hostels  much to similar effect. Competition in high during annual festivals in both.

6. The best one -- while the outside world thinks that students are doing magic or making up cool stuff, they are just scrapping through the syllabus to get the grades.

Wednesday, May 18, 2011

the Boy With the Lamp




 Once a wise man wandering in the jungle saw a boy carrying a lamp. The wise man stopped the boy and asked, "Do you know where the light is coming from?"

The boy blew away the lamp and asked the wise man, "Do you know where the light has gone?"

Monday, March 14, 2011

Flattening abitrarily nested lists in Python

Lists are one of the three most important data structures in Python, other being dict and str, (tuple is the younger cousin  of list). The lists can be arbitrarily nested with any kind of data inside them, e.g.

['a', [1, 2], (3, 4, 5, [7, 8, ['gnu', 'linux']]), ['a', 'b', 'c'], [['d', 'e', 'f'], 12, [13, [14, [15,]]]]]


The objective is flatten nested lists of this kind to a single list. It can be simply stated as to remove all square brackets (and parenthesis) and retain only square brackets at the end, while maintaining the order of the items as they appear in the nested list. One of the simple solution can be:

def flatten(l):
    '''Flatten a arbitrarily nested lists and return the result as a single list.
    '''
    ret = []
    for i in l:
        if isinstance(i, list) or isinstance(i, tuple):
            ret.extend(flatten(i))
        else:
            ret.append(i)
    return ret


Run this on the example and you get:

['a', 1, 2, 3, 4, 5, 7, 8, 'gnu', 'linux', 'a', 'b', 'c', 'd', 'e', 'f', 12, 13, 14, 15]


Can this be made more Pythonic and efficient. Any ides?