Sunday, September 19, 2010

The biggest threat to India

Ramachandra Guha of “India after Gandhi” fame once visited our lab and gave a talk in our “Kaleidoscope” series. He outlined nine threats to Indian security – Maoists, majority communalism, the divide between the rich and the poor, and so on. Unfortunately, he missed out on three others: the so called liberals and human rights activists, the communists and the UPA.

The common thread to these three threats is that they represent the left in its different colours and flavours. There is the hard-left – the Maoists who are determined to undermine the state militarily, the soft-left, comprising of the activists and the leftists who want to it by sleight of hand, and the UPA who wants to do it by inaction.

Let me elaborate. For long, it has been thought that Muslim and Hindu fundamentalism feeds each other. The most common example is the the Shah bano case and allowing Shilanyas at the disputed site in Ayodhya. One set of fundamentalists got the law amended to undermine women’s rights, and the other got the opportunity to start a ‘communal’ movement. However, what is forgotten in these discourses is the role of the “secularists”, “progressives”, and the “leftists”. While there was widespread condemnation of the Shilanyas and the subsequent yatra, condemnation of the parliamentary amendment was muted. And this is a pattern that is familiar. Secularists who condemn the attack on M.F. Hussain, are suddenly silent when a professor in Kerala has his arms chopped and is suspended from service. ‘Progressives’ who come on to the streets against the burkha ban somewhere in France, don’t venture out when the popular front of Kerala threatens a woman for refusing to wear the veil. Our own Manmoron Singh, who spent sleepless nights at the thought of Dr. Haneef in spending time in jail, had a sound, silent sleep when tens of innocent students (mostly Hindus and Sikhs) were beaten and killed in Australia. In the latest incident, I saw a human-rights activist talk about the suffering of the Kashmiri Muslims without a single nod of acknowledgement towards the suffering of the Pandits, which was one of the worst incidents of ethnic cleansing in the country. The same person went on to call the Panun Kashmir a communal organization – Syed Shah Geelani, a two-state theorist is secular, while an organization founded to safeguard the interests of displaced Pandits is communal!

It is this perverted logic of the leftists, human rights activists, ‘liberals’ and ‘secularists’ that incites majority communalism. It is this logic that clouds reality, and forces governments into taking illogical decisions. See the debate on the AFSPA for instance. There is not a single shot that has been fired by the Army, yet there is all the hullaballoo about withdrawing special powers to it!

Wonder why the “left” acts this way? The answer is simple – leftism needs victims to survive. Leftism needs to oppose. And leftism hates stability. I can go on about this – but I’ll defer that to a later post.

Java is not a good first language

I’ve found that the only way to get back to blogging is by writing some random posts. After a hiatus, it somehow becomes very difficult to write cohesive posts on a single topic. The words don’t come out as easily, the sentences don’t seem right, and I spend inordinate amounts of time trying to come up with enough material for my post. Finally, unable to come up with something I like, I abandon the post and add it to an ever-growing list of drafts that I never re-visit.

Anyhoo, for today’s random post, I talk about the threat posed by Java schools to the software profession and the threats that human rights activists, perverse secularists, and the UPA pose to this country.

First, Java schools. While there is long on-going debate in sociology on whether language determines thought (what is called the “linguistic relativity” principle, or the Sapir-Whorf hypothesis), that question in Computer Science is settled. In the world of programming, language does determine thought. Which is why Stroustrup had put in warnings for C programmers to think object-orientedly. Which is why most imperative programmers take refuge in the := and ! operators of SML when they first encounter functional programming. The language you program in makes you think a certain way. The trouble with teaching Java as the first language is that there is no way teachers can teach the way to think in Java (the object-oriented way) without the students undergoing a course in procedural languages. As a result, students end up thinking in way totally unsuited to the language – a class becomes something you create because the language forces you to, and a place where you dump everything that your program needs. Objects become mechanisms to get at the members without the notion of what it means to instantiate something. Access control mechanisms become a unnecessary distraction – if you want a class to access a member in a different class, make the member public. The signature of “main” - “public static void main (string [] args) introduces problems of its own that have been detailed in ACM papers here and here. Beyond these problems, Java abstracts away some of the most critical concepts in Computer science – pointers, memory management, the idea that resources are finite, and the dilemmas programmers face in using and implementing data structures.

The trigger for this rant is a bunch of interviews that my teammates and I are conducting to hire summer interns. Our target pool are the students from the IITs, most with very high GPAs (think 8.8+/10) and two years into their B.Tech courses. All of them have done 3-4 academic projects, and some of them, internships in places like Adobe. Due to their relative immaturity, what we look for are programming basics – choosing data structures, programming recursive algorithms, and some Computer science fundamentals in areas like networking, OSes, or OOAD (depending on the students’ coursework). To our surprise, we found that while most of the students knew the commonly used data structures, very few could choose the appropriate one for the problem at hand. Still fewer got the implementations right, and most wrote code as though they were in programmer utopia – infinite memory, infinite resources, and nothing bad ever happening in the environment. The bigger problem was that not one bloke I interviewed was able to find and debug problems in their code.

There also seems to be this idea gaining ground, particularly amongst the Phd-types that teach courses at the IITs, that programming is secondary to Computer Science, and what matters is “researchy” topics, like IR, machine learning, large scale algorithms or such. At the same time, there is tremendous pressure on the IITs to evolve from being teaching institutions into research institutions. Because they cannot attract talent at the graduate level, it seems professors are taking the route to make the undergraduate program a research program. Good programming techniques and sound concepts of software engineering become “implementation detail”. And writing good code, tests, and having the ability to debug programs is lost on a whole generation of Computer science undergraduates.

Or maybe I’m just being paranoid.

[Postscript: I realized rather late, that this post had become too huge for me to add my second rant. I’ll be posting it separately.]