Thursday, October 13, 2011

RCB Demolished

For a while now, I’ve been pestering my nephews to put their cricketing thoughts on (virtual) paper. I was finally able to corral my younger nephew and get him to write this post.

The Champions League T20 finals RCB VS MI was approached by all with a lot of pomp and hype. Here we were with two sides: the first, a weakened side without its captain and other stars which had made it to the finals fighting all through; the second, sailing through to the finals  chasing 200+ scores on consecutive occasions. Who did you expect would win? A MI team without Sachin Tendulkar or a in-form RCB side with Chris Gayle and Virat Kohli going really strong? I  thought RCB…but RCB didn’t win, did it? Why ?? Below are the reasons:

1. Overconfidence,  having chased down 200 and more on two occasions against better bowling attacks.

2. Maniac team selection by Dr. Vijay Mallya who choose to pay 7.5 crores for a lad who hasn’t even played 50 games for his country but wasn’t willing to pay 5.5 crores for the world’s greatest all-rounder who had performed brilliantly in the previous seasons.

3.Lack of quality cricketers: Being a professional cricketer who plays 5th division for Swastik Union, it disappoints me that I know batsmen who are only 16 and 17 who have greater talent and technique than Saurabh Tiwary and Mohd Kaif. Kaif’s  batting grip locks the wrist which disables the best shots such as the drives.  Saurabh Tiwary didn’t know he had to get onto the front foot to block a yorker. Further, any cricketer worth his name knows that the safest and the best way to score fast runs is by playing straight, i.e. in the “V”.  Chris Gayle and Virat kohli are exponents of playing straight, something that should’ve been a lesson in the nets for Tiwary and Kaif, amongst others. Effectively, RCB went into an international tournament fielding a side without a technically sound middle order!

4. To be able to slog a spinner more often than not you have to get onto the front foot to  hit him with ease. One is expected to take his left foot as sensibly close as possible to the pitch of the ball in order to gain balance, power, and control over the shot. Sadly, Mayank Agarwal got out twice trying to slog a spinner with his feet pointing in exactly the opposite direction of the pitch of the ball.

5. Lack of match practice: On most occasions, the middle order and the lower middle order hardly got to bat as Gayle and Kohli were splendid; therefore  the already useless middle order of RCB lacked the match practice as well. The complacent RCBians  didn’t play practice games so that they could strike some sort of form. Net Practice can never be a substitute for match practice.

6. Bad Captaincy : After Virat, Gayle and Dilshan, the most accomplished batsman in the team is Vettori himself. The moment Gayle and Dilshan were out, Vettori himself should have come out to bat, as on any day he is a proven better batsman than the Tiwarys of the side.

The above reasons contributed to the miserable failure of RCB in the CLT 20 finals. I hope they wont be repeated and will play better cricket in the near future.

Sunday, September 04, 2011

Soothsaying and the Congress party

If recent events have shown something, it is that the Congress party is a soothsayer’s dream subject. If you want to know what the party’s response will be to any situation, you only need to go back in time a few decades and you’ll get the answer.

Let me explain. In 1977, the Congress party was out of power and the Janata party came into power. But they squabbled amongst themselves, and what did Indira Gandhi do? She encouraged Charan Singh to split away, supported him for a while, and then pulled the rug under his feet, which led to elections. Now move the clock to 1989. Rajiv Gandhi lost power, VP Singh and Chandrashekhar squabbled, and Rajiv Gandhi encouraged Chandrashekar to split, supported his government for a few months, and then withdrew support. And the same repeated in 1996.

Similarly, when faced with an upsurge of public antagonism, Indira Gandhi’s first response was to invoke the “Foreign Hand”. Rajiv Gandhi talked about vicious forces that were out to destabilize India when the Bofors scam hit. And today, Rashid Alvi accused a foreign hand (of course, those in the know, know that it is an Italian one) of trying to destabilize India. Indira Gandhi imposed the emergency and foisted all kinds of cases on the opposition; and while the India of 1985-86 wouldn’t let Rajiv Gandhi impose the emergency, he tried his best to muzzle the media by introducing the “defamation bill”. Lo and behold, today we have the “Group of Morons” who are trying to bring in a bill to regulate the media. (Maybe they’ll serve a privilege notice against me as well?)

And while the faces of the henchmen, the a**lickers and the hangers on have changed, their attitudes and languages haven’t changed one bit. See the abuses showered on team Anna if you want proof.

What I’m trying to outline is that despite its dubious claims of having introduced the green revolution, the IT revolution and globalization in India, the Congress party remains a party stuck in the discourse of the 70s. What is further shameful is that the great white hope of the party doesn’t have a single original thought to offer and his family friends (what a TV channel calls ‘Young Turks’) are no better either.

There is no future for the country as long as the Congress is in power. Sadly there is no viable alternative in sight.

(Postscript: To my regular readers: thank you for your enquiries, and I promise I’ll post more regularly in the coming weeks. )

Sunday, April 24, 2011

More on freedom

If my blog were to stand for a single topic, that topic would be "Freedom". I've blogged earlier about the futility of banning skirts, jeans, music, books and so on. Over time, the bans have become more and more ridiculous - women entering a bar, or teachers being forced to wear sarees and so on. But some recent events take the cake.

For instance, Christ College (now Christ University) in Bangalore has banned a chocolate stick. Mahavir Jain college has banned male and female students from using the same set of stairs. Another college has banned standing on campus. What's hilarious is the twisted reasons one hears on why these bans are justified - the staircase ban is ostensibly because the girls' toilet is on the right side of the building and the boys' toilet on the left. Now one wonders - do students climb stairs only to go to the toilets? Or is it the college administration whose heads are in the toilet?

And we have more. The World Badminton Federation has banned women from wearing anything but mini-skirts on the court, ostensibly to popularize the sport. Don't worry about all those women who might be discouraged for the same reason! They can all go and take up knitting.

At least the WBF is honest about why they are doing it, unlike the worthies in Bangalore colleges.

Losers, all.

The joys of testing

Years ago, in the group discussion round of my first campus interview, my group was given the topic "The role of testing in the career of a software professional". I went first, making a strong case for testing professionals. I spoke about the inevitability of bugs, the economic cost, user impact and how testing was essential to maintain software sanity. I think I made a good case, becuase I was eventually hired for the job, but I knew I didn't believe a single word of what I'd said. In fact, days after the interviews, I was scared by the thought that my passionate case for testing might actually convince the company to put me in a testing role!

Over the years, I've understood the importance of sound testing. I've also realized how much of an intellectual challenge testing really is. Here you are given a piece of software - sometimes you know the code, and sometimes you don't. Sometimes it has a spec, sometimes you create the spec as you go. The software you are testing might be new or it might be tens of years old, will typically have millions of paths through the code and hundreds of thousands of states (with many thousands that could be wrong). How can you figure out how to make the software fail? How can you unearth the hidden assumptions the developer made? How can you write software so that it can be tested easily? How much of your testing effort can you automate? How do you measure the quality of your testing? How do you know you are done?

I was once the member of an interview panel, and we rejected a candidate for the developer's post. One of the managers in the company turned around and asked us "Is s(he) at least good for testing?". I didn't see how ludicrous this statement was then, but I see it now.

We live and learn.

Saturday, January 22, 2011

How the UPA is educating the public

The UPA government has done a lot for education in the country. From the landmark RTE act, which transferred onto included the private sector, responsibility of educating the poor, to the pointless landmark universities bill and continued tampering with guidance for the institutes of excellence, the UPA has been in the education sector. Of course, these pale in significance to the personal initiatives taken by UPA ministers.

First, the home minister gives us an English lesson, telling us that a consensus does not mean agreement of all concerned, but a majority of all concerned. Since the UPA is under the impression that it is ruling by the consensus of a billion people, how can you blame him?

Next, Kapil Sibal, our effervescent minister for all seasons comes in to give the people a math lesson. He has a new branch of math - let' s call it Sonia math for the lack of a better name. Here, the value of an equation depends on the side of the equation that the reader is in! According to Prof. Sibal, the total loss to the country from the 2G scam is zero! Truly, he occupies a universe of thought much different from our own.

Watch this space for more on UPA history, science and biology. But if you want to see something nice, go here: http://www.digitalnarratives.net/ and send me your comments!

Sunday, November 28, 2010

More Indian sport

I love posts where I can say “I told you so”. After the 2008 Olympics, I wondered if this was a new dawn in Indian sport. The events of the 2010 asian games have strengthened my belief that it is indeed so. True, the shooters haven’t lived up to their potential, and the archers didn’t do as well as they did in the commonwealth games, but take one look at the details of the medal tally, and you’ll see what I am talking about.

A 1-2 finish in the women’s 10k race. A 2-3 finish in the 5k race. Gold in the steeplechase event. Gold in the women’s 400m hurdles after 24 years. Gold in the men’s 400m for the first time ever (unless Milkha Singh won it in his time). Gold in rowing. First time medals in skating and gymnastics. Golds in boxing. This games have been quite good for India.

What is also heartening is the manner in which these medals were won. Take for instance, Joseph Abraham’s last minute push to get the gold or Sudha Singh’s desperate lunge to finish first – how many times in the past have we seen Indian athletes overcome their opposition when placed in such situations?

Rest assured, things will improve. These heroes will now encourage more sportsmen and women in the country to come forward. With government support and strong private sector participation, not to mention rising confidence in Indian abilities, the future looks bright. Of course, the 2012 olympics will tell us how far we have come, but I’m more confident than ever that we have crossed one, if not all the hurdles in the way of sporting success.

Sunday, October 17, 2010

The ‘developer’ high

Most of us in the software profession agree that it is probably one of the few honest professions that will pay you a decent monthly allowance for doing something you love to do. But have you wondered why software development is such fun?

Well, as you expected, I have a theory. I think the reason development is such fun is because of the recurring, never-decreasing highs that one gets. Created a cool, extensible design? You have a high. Found a cool way to randomize a list with just one line of LINQ code? You have a high. Debugged a crazy bug that has haunted you for days? You have a high. Positive customer feedback? Another high. Why, even seeing a “all-green” status on your unit test run – even that can give you a high.

And the best thing about the highs is that their intensity is not dulled by repetition – something a good alcoholic smoker friend of mine certified :)

This is probably a key factor that keeps developers glued to their IDEs.

Putting on my trench man hat, I think this is another aspect that differentiates developers from researchers. Researcher highs are fewer and far-inbetween. You publish maybe 3-5 papers every year. Generating new, workable, and innovative ideas that are different from those in the ‘market’ is gut-wrenching work, and new leads probably occur a few times a year. The situation is even worse for managers who have to wait for a product to ship to feel the high.

There is a flip-side to this. It is easy for developers to fall into the addiction trap – sometimes sacrificing long term health of true innovation at the altar of the regular dosage of customer appreciation highs. Managers and researchers can keep their sights on the bigger prize for longer because their work and training (particularly for the researchers) trains them to think longer-term.

Again, let me add my usual disclaimers about this being a generalization and like all generalizations, not applicable to all people and situations! :)

What do you think?

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.]