Sunday, October 31, 2004

This occurred to me as I was reading the Rude Pundit's usual castigation of Bush: when you take sides in a bitterly contested fight, you demonise the opposite side. You cheer their misfortunes, gloat over their mistakes and revel in their miseries. But once the battle has been won, I always find that a wave of pity and tenderness washes over me as I contemplate the plight of the loser; all his sins are instantly forgiven. He returns to being a human being as prone to making mistakes as anybody else, probably wracked by feelings of self-doubt and vulnerability.

I wouldn't mind feeling some of this pathos for Bush on November 3 :-)
All the problems related to election fraud in the US would vanish if one thing were to happen: the states agree to cede to the Federal government's authority in the conduct of the presidential election. The federal government could then come up with a uniform method of electronic voting throughout the country. This method can be vetted by a professional body like the ACM (speaking of the ACM, they have devoted a full issue to this topic).

When India, with all the scope for corruption here, can conduct a blemishless electronic vote (at least there have been no complaints of large-scale fraud), the current state of affairs in the US doesn't reflect well on its technological/political maturity (imagine the mortification of having to listen to advice from Cuba and Zimbabwe on how to conduct an election).

Another thing I cannot understand about the American elections is voter registration. Why must a voter be registered as a Republican/Democrat/Independent before the election? Doesn't this sort of invalidate the concept of a secret ballot? Is this a way to ensure that people vote only once? If so, can't this be done without asking people to disclose their voting preferences?
The print and electronic media should desist from mentioning any computer security firm when they release news about new virus threats. No purpose (except free publicity for the company in question) is served by doing so. Why cannot they just say that "an analyst at a leading security firm today said that..."? It's not like anybody would complain (except said analyst, perhaps). Attributing a statement to a source when the source wants to remain anonymous is a no-no, but not its opposite. In addition to putting unscrupulous companies in their place, who knows, we might even see a reduction in the number of threats.

Saturday, October 30, 2004

There is a line of argument which goes like this: "both Arabs and Israelis are Semites, therefore to accuse Arabs of anti-semitism is essentially meaningless, because it implies that they are against themselves". Next time you read an article containing the term anti-semitism, mentally replace it with anti-Jewish (which is the article's real intention) and this bogus argument vanishes.

The fact that the charge of anti-semitism is used to deflect genuine criticism of Israeli actions is another matter altogether, of course.
Just finished watching the first part of the State of the Union debate on BBC World. One thing I learned was that Madeline Albright suports India's candidacy for a permanent seat in the UN Security Council. Another was that James Woolsey (former CIA director) was the only person who showed any cognisance of the fact that Peak Oil may be upon us. He rightly stressed that we need to start developing alternative energy sources and should also work on conserving the available resources. This point was made in the context of the emergence of India and China as strong powers and their energy demands in the coming decades.

I also got to see George Soros and Sid Blumenthal for the first time. When you read quite a lot of things written/said by somebody, you form a mental image of them in your mind. When you finally see that person, it invariably turns out that the mental image is at odds with how the person actually looks.
It looks like our government is going to offload its dollars. I don't remember this being reported in our newspapers though (it could be that I missed it).
There is a slew of programs in BBC World this weekend covering the presidential elections in the US. Personas featured include Michael Moore, Sidney Blumenthal and Bill O'Reilly. I foresee a lot of fireworks. I have one question: Was the program featuring O'Reilly recorded before or after the scandal?
My Linux machine has become very sluggish of late. I think the culprit is either YaST Online Update or Gnucash. I noticed the slowdown only after I installed or started using them. Either some security patch or one of the packages required to run Gnucash is causing this problem.

Thursday, October 28, 2004

I had neglected balancing my cheque book for quite some time, so it was no great surprise to see that things were pretty messed up when I attempted to do so recently. It took a marathon session with OpenOffice Calc (that's the OSS equivalent of MS Excel for the uninitiated) and poring over my barely legible cheque book entries from more than a year ago (yes, that's how long it's been since things were fine) for me to get things back on track again.

Flush with the above accounting success, I downloaded and installed Gnucash. After some twiddling around and reading sections of the online help, I have set things up the way I want them. If I continue making entries in Gnucash religiously for the rest of the year, I will know exactly how much I spent on coffee this fiscal...

Wednesday, October 27, 2004

Bruce Schneier has this to say on what works and what doesn't when defending targets against terrorist attacks.

According to Bruce, none of the predominantly used mechanisms (ID cards, face recognition software, screening attendees) work. The one solution that works is:
"...smart security officials watching the crowds. It's called 'behavior recognition,' and it requires trained personnel looking for suspicious behavior..."

But even then, there is no way to stop a really determined terrorist willing to die in the process of committing the act. If he is not able to blow himself up at the location of his choice (bang [pun unintended] in the middle of the spectators in a stadium, for example), he would then do so at the checkpoint where he is about to be busted.

I have a simpler solution: as Michael Rivero is often wont to say, stop messing with other countries' people, and the terrorists will go home. But then what do you do with the home-grown variety? Try to ensure that there are no alienated groups ready to take to violence because they feel that justice is being denied to them. This may not solve the problem completely; there will always be someone with a grievance (real or imagined) that is not being addressed, but application of the 80:20 rule (80% of the violence is due to 20% of the causes) will at least make the problem manageable.

Sunday, October 24, 2004

I think I will buy a copy of Mike Ruppert's Crossing the Rubicon. I have a lot of respect for Mike's opinions and I think this book will throw light on quite a few things in addition to 9/11. But FTW's endorsement of Pinnacle Quest International is slightly disturbing, especially after reading what Daniel Hopsicker has to say about this.

Saturday, October 23, 2004

Suse 9.1 is the best distro I have tried out so far (the others being Debian and Mandrake). Here is where the backing of a company like Novell comes through. No evidence of the annoying little nuisances that I faced with Mandrake (mind you, these annoyances in no way made Mandrake unusable). The only gripe I have is that the 9.1 Personal edition does not come bundled with developer tools (no gcc, xemacs, etc.). You have to go to the Suse mirrors for them.

Update: Turns out Suse already had a fine tradition of reliability and engineering excellence prior to being bought by Novell.

Thursday, October 21, 2004

What do normal people do when they can't sleep? They count sheep. Being a nerd, I have come up with a mechanism suitable for such people (courtsey EGB): trying to determine whether the number 27 has the Wondrousness Property. A number is said to possess this property if it is reducible to 1 by applying these transformations to it:

1. If it is is even, divide it by 2
2. If it is odd, multiply it by 3 and add 1 to the result
3. If the result is 1, stop; else go to step 1

It goes without saying that you have to perform these computations in your head.

Spoiler: 27 does possess this property, but I can assure you that unless you are an insomniac, you will not work your way to this conclusion within a reasonable amount of time.

Monday, October 18, 2004

Firefox 1.0PR (Linux version) has the annoying habit of dying out on me when I click on a link that opens a popup window. This doesn't happen always, but more than half the time. I would have reported this to Bugzilla, but it asked me to jump through so many hoops before accepting a bug report that I lost interest. There is supposed to be a Quality Agent that should kick in when an exception occurs, but no evidence of this so far. The saving grace is that at least the "Profile in use" message doesn't appear when I restart Firefox after the crash [*].

[*] Useful tip to remember: if you get this message after a crash, delete the file called 'lock' in the Firefox profile directory (usually ~/.mozilla/firefox/*default*)

Update: this problem vanished when I moved to Suse 9.1; however I had to fix another issue before I could get Firfox to work in Suse.

Update #2: Nope, the problem still persists, though on a random basis. But at least the Quality Feeback Agent faithfully calls home and whines about the problem now.
The Aussies must be a happy lot, having managed to save the second test. This is where their calibre shows; any lesser team would have lost heart when they have a second innings lead of just nine runs, with two days to go and their top batsmen back in the dressing room (not to mention the prospect of facing Kumble and Harbhajan on a turning/bouncy wicket). But they gamely hung in there and managed to set a pretty decent target for us (who knows, they might even have bowled us out for less than 200 if the weather hadn't turned out the way it did).

Something tells me this series will be very different from 2001. The Australians may even end up winning it.

Saturday, October 16, 2004

I was thinking about how the war on terror started with 19 men armed with nothing more than boxcutters hijacking airliners and slamming them into buildings and metamorphosed into a crusade for the destruction of WMD capabilities in the hands of terrorists and their sponsors. I had already typed these words on the screen:
"It has been more than three years since 9/11 and there is no evidence that anybody has attempted a WMD-based terror attack in this time period".
completely forgetting the anthrax attacks that immediately followed 9/11. This lapse of memory has convinced me that the anthrax attacks were staged precisely to link terrorism with WMD. The way the investigation has been conducted (click here for a good overview of this) has also reinforced my belief. It is almost a certainty that world events would have followed a different course had either 9/11 or the anthrax attacks happened in isolation (i.e. not both of them together).

Wednesday, October 13, 2004

Patiently downloaded Croquet last night. After reading through the short-on-specifics- and hype-laden introduction and FAQ (as Hani Suleiman would say, there is quite a lot of arm-waving going on there), my curiosity was piqued and I decided that the 60 MB download was worth it. Sad to say, but it wasn't. I simply couldn't see where Squeak ends and Croquet begins. It is not very obvious what Croquet brings to the table. Both seem to have a goal of becoming a guest OS (or at least the default desktop). May be I need to dig deeper. But based on first impressions, definitely a disappointment.

Monday, October 11, 2004

Having heard so much about Test Driven Development, I was wondering how easily and effectively I could incorporate this into Vajra. I am currently in the process of writing the native methods for the few classes that the JVM author needs to implement in order to integrate the JVM with Classpath. Each such class has an associated .so file that contains the native methods for that class. If I were to write a unit test for these native methods, let's say for the class java.lang.reflect.Constructor, and more specifically for the method getDeclaringClass(), what would I need?

The native method definition looks something like this:

JNIEXPORT jclass JNICALL Java_Constructor_getDeclaringClass(JNIEnv *env, jobject obj) ;

In order to unit test this method from a harness, I should have these things available:

1) A functional JNIEnv pointer
2) A jobject

Both of these structures are either direclty mapped to internal classes in Vajra, or are members of these classes. If I need to correctly initialise these structures, those internal classes will have to be initialised first. This brings into play the entire internal object hierarchy of Vajra, with all its dependencies, some of which border on the incestuous.

There are two ways I can proceed here:

(a) invoke the virtual machine on a sample class that in turn makes the call to getDeclaringClass() in its main method, thereby invoking the native method

(b) create stubs for all the internal objects I need to be initialised before I invoke getDeclaringClass() from the harness.

Option (a) is the easier option for me, but is more of an integration test. Option (b), while technically the correct way to do unit testing, would involve a humongous effort at setting up the testing environment.

I do not know whether the 'failure' (if I can call it that) of the unit test approach in this instance is due to the inherent complexity of the problem or because I am going about this in the wrong manner. I suspect that the answer lies somewhere in between. It could also be that the design deficiencies in Vajra (a lack of testability) play a part in this.

Sunday, October 10, 2004

Just wondering: are people who do not know HTML (i.e. the non-techies who use their computers only for email and browsing) aware that when one web page is linked from another, the anchor text can be anything at all and need not reflect the actual web page title? I got to thinking about it after seeing Eschaton link to a New York Times story with the caption "Unfuckingbelievable".

Saturday, October 09, 2004

Now this is a great sig (found it on alt.politics):
The GOP recently announced that it is changing the Republican emblem from an elephant to a condom because it more clearly reflects the party's political stance. A condom stands up to inflation, halts production, destroys the next generation, protects a bunch of pricks, and gives one a sense of security while screwing others.