Tuesday, January 31, 2006

Haroun and the Sea of Stories, by Salman Rushdie

This is a beautifully written book. A fantasy tale, its central theme itself is the role of stories in life.

The plot revolves around the boy Haroun, the son of a famous storyteller. Haroun's father has lost his ability to tell stories - and Haroun travels to the origin of his father's wonderful stories - a second moon on Earth called Kahani, home to the Sea of Stories. The sea is in danger of being gravely polluted by evil forces who don't believe in stories and its up to Haroun and his friends to save the day.

The writing is wonderfully imaginative and full of humour. A number of names used in the book are taken literally from Hindustani. We have the chatterbox princess Batcheat, the General of Pages Kitab and so on - and the end result of that can be surprisingly funny. Even better than being entertaining, the book serves as a great reminder that each of us has an imagination and its intended to be put to good use rather than put on the backburner while we lead our routine lives.

Monday, January 30, 2006

Six IITians start Paritrana

It's heartening to see young people in India starting a political party. Much of the problems of the Indian political scene - we feel - is due to lack of involvement of new ideas from the younger generation. Lets hope Paritrana can fill the gap.

I'm impressed by the party's ideology, which is based on a system of social organization. So much better than blanket cliched phrases like the 'good of India' and so on (the mission statement of the party, however, I do find very vague). To develop the party's infrastructure, though, we'll need to see a lot of work, and it will be up to the younger generation community to provide the input and support.

Saturday, January 28, 2006

Star Wars - Dark Lord: The Rise of Darth Vader, by James Luceno

Couldn't resist the title and the cover - I bought this book soon after I returned from my trip to India. The story starts just after Episode III ends. Overall, its just about a decent book. Revenge of the Sith (the book) has seriously raised both the writing standards of Star Wars Literature as well as the community expectations, and Dark Lord is certainly not what I'd call a worthy sequel.

The plot is centered around a group of Jedi who survive Palpatine's order sixty-six (ordering the clones to kill all Jedi). The story unfolds as they make their choices and both Vader and Palpatine go after them. In the background, the development of Palpatine's increasingly dictatorial and fear-based Empire is shown. The book also sheds light on a little-discussed but important facet of the Force - the training in the ways of the Sith of Darth Vader. The dissenters of Palpatine - mostly Senators Bail Organa and Mon Mothma also figure in the plot, and the options for opposing the Empire are discussed.

The strength of the book, of course, lies in the fact that the story is spun around almost all the important events after Episode III, and overall its a good story, pretty much a page turner for me. Where the book failed (for me) was that I felt that every issue could have been handled so much better - especially the parts that deal with the Force - the response and thoughts of the scattered Jedi, as well as the dark side training of Vader. James Luceno does talk about the Force in detail - but in my opinion, lacks the depth that Matthew Stover and Timothy Zahn have repeatedly shown in their books.

The only distinguished Jedi character in the book is Obi-Wan and he too is only mentioned in the epilogue. What's more, he is shown to panic as soon as he realizes that Anakin (Vader) is alive and may come to Tatooine and recognize his son, Luke. It takes Qui-Gonn from the netherworld to calm his fears down. Doesn't sound like the unruffled Master Obi-Wan we all know and love, does it? It's the presence of many small things like this that make the book - for a Star Wars fan - slightly ridiculous. The rest of the stuff - lightsaber and space battle descriptions, political maneuvering, some humour - is good; but I really think the basics could have been done much better.

On a related note - lately, Star Wars books of the Clone Wars era have always released only in hardcover at first, and paperback editions always come a few months later. I see this is as pure exploitation of the fans - but I guess now that the movies are over, this is one way for Lucas to make his money. I really didn't mind shelling out the money for a classic like Revenge of the Sith, but spending 40 bucks on this book seems a sheer waste of money. Next book, I might just sit in Borders and read without buying.

On a happier note - Timothy Zahn's Outbound Flight is due to release soon - and given his previous record (Thrawn trilogy, Hand of Thrawn duo, Survivor's Quest) - I have high expectations from this book. Hopefully, next week will find me at Borders.

Thursday, January 26, 2006

Jai Hind!

Country

Wishing all Indians a very Happy Republic Day. This and other snaps from today's celebrations at the Indian High Commission are here.

The poster was created using fd's Flickr Toys.

Wednesday, January 25, 2006

Real-world security

On our network, we have a daemon that continuously port scans all our PCs - basically attempts to hack them and reports any vulnerability it finds. I used to be really impressed with the idea; until I saw some of its reports. Here's the latest.

I get a report of a critical security vulnerability and warning me that if I did not fix it immediately, my system would be disconnected from the network. The synopsis of the problem? "It was possible to access the Windows Registry remotely on your system". Very interesting, especially given that my computer runs Fedora Linux.

The network security people, of course, have no clue why this is coming up. Any Linux geeks out there who have any idea? Is this a Fedora Core 4 easter egg by any chance?

Friday, January 20, 2006

I Dare! - Kiran Bedi A Biography by Paramesh Dangwal

In a 2002 poll, Kiran Bedi was adjudged by "The Week" magazine to be the most admired woman in India. After reading this book, I was not at all surprised. For a woman who starred at tennis and managed to get fame even as a traffic cop, her achievements spanning crime prevention, police training and being an advisor to the UN have only become greater.

The popular myth - that nothing can be done about the inefficiency, lethargy and corruptibility of Indian government service - gets powerfully dispelled. Throughout much of her career, Kiran Bedi has done nothing but get more service and productivity out of the staff that were assigned to her. From changing the traffic situation in Goa with a mere 25 cops to getting the respect of the outsider-unfriendly state of Mizoram as Police Commissioner, her ability to marshall her resources shines through. What's amazing is that it often took just this one person, and maybe a few others to cause massive changes in the police systems and operations. I began to believe at the end of the book that the critical mass required for change - even in a system that can be as rotten as the indian civil service - is not so huge after all.

This is basically a book about leadership. Leaders basically act as catalysts for positive change. While today leadership in literature is mostly about CEO's, the magnitude of social change that Kiran Bedi has started is (to me) much more impressive than that. One of her famous postings was as Inspector-General of Tihar Jail in Delhi. Before she arrived, it was known to be a hellhole. Drugs, physical abuse, corruption, disease, prisoner deaths were common. In the short span of two years, she converted the prison into "virtually an ashram" in the words of the press - which in involved man-management of over 8000 prisoners and hundreds of staff - all of whom were beset by common problems. The book tells the story of the innovative methods - mostly rehabilitation and correctional efforts managed to change a place like Tihar in such a short span of time. Another aspect of undaunted leadership is that Kiran Bedi often found huge opposition from politicians and others who didn't like her making changes to the system - and she manages to accept these realities and still carry on her work at the same time.

Kiran Bedi herself is the author of four books and runs two voluntary organizations - Navjyoti and India Vision, and has a PhD from IIT Delhi in Social Sciences.

Saturday, January 14, 2006

India vs. Pak - 1st Test, Day 1

I hope Team India has got the message. This is not the Pakistan team we played in 2004. I watched every ball of today's play and that fact is imminently clear.

The pitch, of course, is flat - perfectly suited to batting. That fact only partly explains the scorecard at the end of the day's play (326 for 2). The other factor is that Pakistanis seem to have turned into something they were hardly ever accused of - professional, solid cricketers. You miss so much of a test match if you simply follow it online or watch highlights. While there was little assistance for swing or bounce from the pitch today, the Indians did bowl very tightly in the first session and to some extent, the second. Younis Khan and Mohd. Yousuf were shining examples of "playing the ball on its merits". The number of good balls they went after were few and far between, and any loose balls - Kumble bowled quite a number - were dispatched. The Pak team of two years ago might easily have lost six wickets under the same conditions - because they appeared then to be a team without a plan, the only visible intent was to go out and bat. Today was a whole different story. If today's attitude is a trend, we will find it very very difficult to win this series.

As far as the Indian bowling is concerned, there is just one word to describe it - lacking in ability, as both Imran Khan and Sanjay Manjrekar put it. On a pitch like this, they can do precious little to get wickets except hope for the batsmen to make a mistake. Pathan and Agarkar are painfully slow only around 80 mph, and without bounce or appreciable swing, their good balls are easy to defend and the bad ones easy to hit. A question asked in the discussion is a very good one - why has it been ages since India had a genuine pace bowler? Can it be that among the millions of people who play competitive cricket in India - there are no good genuine pace bowlers? Agreed pitches in India are not suited to seamers - but on a surface that lacks pace and bounce, a bowler who's just plain fast should theoretically do better than people like Pathan or Agarkar who aren't fast but can achieve decent swing and bounce if assisted by the pitch. But I digress. With four specialist bowlers, and only two seamers; its painfully obvious that we are not going to make an impression on Pak pitches. Zaheer should have been played, not just to give Dravid more options but to explore and get the seamers used to the conditions - you cannot expect to win a series in Pak without a good pace attack. We have quality spinners for wickets that turn - if they can't do much in Pakistan (and it was quite clear they can't), then both spinners have no business being in the playing eleven.

Lets see how things go tomorrow. Pakistan are looking at a declaration after 600. Looks likely that we'll get one or half a session tomorrow to bat. It will be good to compare Pak's pace attack against ours.

Tuesday, January 10, 2006

Cricketing music

One of the many wonderful things about being in India. Five sports channels. The crucial part is - at any given time, at least two will be showing cricket. I've been home for three days and all three nights, I've slept off watching cricket at night. No better lullaby than "Thats an excellent drive.. he came to the pitch of the ball and excellent transfer of weight into the shot..."

Can't wait for Friday morning - I cannot remember the last time I saw an India-Pak test match at home.

Thursday, January 05, 2006

Resolutions

Resolutions

Research topics in Computer Science

I recently got an email out of the blue from somebody asking me to suggest a topic for a PhD in Computer Science. I can only think of three responses to such a question.

The instinctive response, of course, is to tell the person to go consult an astrologer - whose input I figure will be much more useful than mine. Hey, at least it won't be totally random.

The second response is the truly random response. Think of the most complex terms in Computer Science and plug them together to concoct a topic. Fortunately, this is something that a charitable soul at Purdue has already done.

The third response can be classified in the "smart-alec" category. Simply return with a list of all possible topics in Computer Science which squarely puts the ball out of your court. Also guaranteed to cause complete confusion in the best case and mental degeneration in the worst.

Probably a fitting way to sum it up would be to borrow the Oracle's dialogue from the Matrix: "You seem like a nice guy, and I hate giving good people bad news."

Wednesday, January 04, 2006

Java vs. C

Joel Spolsky, recently wrote an article talking about the dangers of letting CS courses in universities move to Java from C, Scheme or Lisp. I'm not sure I agree with that point of view entirely.

His basic claim is that "Java is not, generally, a hard enough programming language that it can be used to discriminate between great programmers and mediocre programmers." The reason? From his point of view, the Gods of programming are those who are familiar with two main things - pointers and recursion. Since Java doesn't have pointers and most Java courses or programs don't bother about recursion, he thinks dumb people can find it easy to write in Java. He believes C or scheme or lisp is needed to "weed out" the dumb programmers.

Here's my perspective - as a programmer, I am quite comfortable with pointers. I just rewrote (ported) a piece of MATLAB code to C, line by line, and since it was full of matrix operations, it was full of pointers. I have implemented pointer-based hashtables, written geometric collision-detection code using pointers and grids of pointers; and I was happy doing it. I've even done some assembly language programming on DSP chips. That was tough, no doubt about it, but given that I did it when I was basically a novice, its not all that bad. I've been programming on Java rather irregularly (I'd much rather code in C++ any day), but I've done complex projects like compiler design or AI implementations in Java. And I still find it hard to design and write a good program in Java.

Here's my take on pointers. They're boring. I use them all the time, and yes, your program will segfault and give you weird errors. Most people believe that debugging that requires some kind of great depth in understanding. It does not. All it requires is patience, attention to detail and caffeine. Its a process of following the thread of reference changes until you find the bug. You learn from your mistakes when your mistakes are in concepts or fundamentals. With pointers, mostly the mistake is you incremented the wrong value, or added something when you should have subtracted. Nothing very profound.

I must admit I missed Joel's point about recursion. Probably thats because I don't know Scheme or Lisp, which deal very specifically with recursive programs. I've implemented identical recursion routines in C and Java (depth-first search and dynamic programming problems come to mind) and the difficulty level has been exactly the same.

There is no doubt that using a lower-level language results in more frequent errors. But is a good programmer one who works on the most error prone language? Even an expert C programmer will screw up at times, and probably more than an expert Java programmer, because pointers are inherently error-prone. If all you want is for a programmer to be able to write difficult code, why C? Why not ask all the schools to train people with punch cards and machine language programming? Clearly we don't want to do that - we know we can eliminate a lot of errors by using higher level languages. And then people talk about knowing the basics. Sure, an implementing a linked list using pointers does illustrate the concept behind it. Any CS 101 course (including that in a Java School) will do the same, and the "bright" kid should not need to painfully work at pointers to understand what the relative merits are of various data structures. In my C class my professor reminded us, "You should all implement a pointer-based linked list. Exactly once in your life. After that, use the libraries."

Joel speaks of 6.001, an extremely tough course at MIT that bad programmers are very likely to drop out of. When I met CS undergrads during my stay in MIT recently, they spoke of 6.170 (which is taught in Java) being as tough as 6.001. While Java and C can be used for the same purposes the intent of each language is different. I think people who program in Java are much more proficient in thinking about high-level, large scale software design (enterprise databases for example) and C coders are much more comfortable with aspects of low-level programming (the Linux kernel). So if you want to judge how smart a Java programmer is, asking him about pointers and recursion is perhaps a bad idea; asking him about OO design and looking for the right answers will probably work better.

The bottom line is that training in Java and C gives you slightly different skill sets and I don't think its fair to say that Java is too dumb a language to judge a good programmer by.