Monday, November 27, 2006

Movie Review: Casino Royale

Let me count the number of ways the new Bond is different from his predecessors:
  1. He has the physique of a body builder.

  2. He's not debonaire or suave ("How would you like your martini, sir? Shaken or stirred?" "I don't give a damn").

  3. He gets a testicular whipping from the bad guys.

  4. He doesn't get to use any of the gadgets in the car that has been placed at his disposal (not counting the medical kit).

  5. He is more in touch with his emotional side.
Casino Royale is a very watchable movie just for these things. The poker game brought to mind Enter the Dragon -- competitors from all over the world assembling at the villain's lair (sort of), the presence of a friendly American, etc.

I have only one nit to pick: maybe I'm missing something, but with all the sophisticated means available to transfer money electronically, what was the need to do a physical handover at the climax?

Saturday, November 25, 2006

Zen Koan

The Koan

The master took a piece of chalk and drew a line on the floor. He then said to the disciple, "How will you make this line shorter?" After thinking for a while, the disciple said, "I'd rub out a portion of it".

The master shook his head. He then bent down and drew another line, parallel to the first one, but longer.

On seeing this, the disciple grabbed hold of the master and threw him against the wall of the monastery.

The master was enlightened.


"I have been your disciple for ten years. I have waited on you hand and foot, have cooked for you, have washed your clothes, have swept the monastery all this time, without a word of complaint. During these ten years, not even once have you condescended to teach me The Way. When you called me to your quarters today, I was ecstatic, thinking that I was finally going to be initiated into the Noble Path. Instead, you ask me to solve a puzzle, a puzzle that legions of people know the answer to, either by virtue of having spent their Saturday afternoons watching B-grade karate flicks or by reading enlightened blogs. At first, I thought I'd be clever and ask you 'Shorter than what?', but decided against it. Who knew, venerated master that you are, maybe you had a trick up your sleeve, after all. But oh no, I was giving you too much credit. Come to think of it, I should have seen the signs when you simply waved your hand disdainfully and said 'Cow' when I asked you about Mu.

"And dude, BTW, do something about your B.O."

(Apologies to Joe Hyams)

Friday, November 24, 2006

These are the days

The weather in Chennai sucks most of the time, except for a couple of months after the monsoon, i.e. right about now. The monsoon season is not yet officially over, but I think we are done with the rains, at least for the time being.

Pleasant afternoons, clear blue skies, the warmth of the sun on your face, mellow thoughts, nothing to hurry you, at peace with yourself, catching the pretty young girl's eye, no hints, no promises, nothing, thinking *This* is life, so very mundane, yet so very special.

Thursday, November 23, 2006

Robert Fisk on the Gemayel assassination

From the very last paragraph in the essay:
For if only the Lebanese stopped putting their faith in foreigners - the Americans, the Israelis, the British, the Iranians, the French, the United Nations - and trusted each other instead, they would banish the nightmares of civil war sealed inside Pierre Gemayel's coffin.
I'd like to think that the omission of Syria from the list of foreigners is accidental, but I don't think it is. Anyway, I've pretty much given up trying to understand or analyse why things happen the way they do in the Middle East. It sure makes for some intriguing reading, but you get nowhere.

Bring out the champagne

Last July I cancelled an Air Deccan ticket because the flight was delayed by eight hours (!) and I resolved never to fly with them again. The fact that there was no sight of the refund all this while also rankled me (I know you guys are a low-cost airline, but does that mean you don't even have enough money to pay for a higher mail server disk quota? I'm talking about all the bounced emails I sent you).

I finally got the refund today. I'm somewhat mollified, but I'm not sure whether this is enough for me to consider them as a travel option again. I have had a decent experience with them earlier, so I may end up giving them the benefit of the doubt.

Wednesday, November 22, 2006

Got to hand it to you guys

I've seen my share of bad ads, but the 'e-Serve is now Citigroup Global Services' one with the guy who goes into a little girl's nursery and annoys her is, undoubtedly, absolutely the worst ad I've ever seen. Dudes, what were you smoking?

Smalltalk to the rescue

Well, it finally took Smalltalk to find out the answer to yesterday's question.

It's enough to simply raise the exception in the method that implements the web service API. ActionWebService takes care of converting this exception into a SOAP fault message.

Five lines of code in the VisualWorks workspace was all it took:

wsdlClient := WsdlClient new loadFrom: 'http://localhost:3000/hello/service.wsdl' asURI.
soapRequest := SoapRequest new.
soapRequest port: wsdlClient config anyPort.
soapRequest smalltalkEntity: (Message selector: #Hello ).
soapResponse := soapRequest value.

Executing this snippet produced a Smalltalk exception; step into the debugger, inspect the transportEntity object, and see the SOAP fault message in all its glory.

Tuesday, November 21, 2006

ActionWebService question

How do I create and return fault messages from the class implementing the web service API? Do I just raise my own exceptions, and the runtime takes care of the rest?

I tried to figure this out by invoking my web service from a) a WSIF dynamic invoker sample class and b) from Ruby's own SOAP client. In the first case I hit a WSIF exception, and I was not sure whether the problem was with the WSIF code or with the way I was just throwing my exception without doing anything, well, SOAPy with it. In the second case, the exception was simply propagated along the SOAP client's call stack. Oh, and using the 'invoke' scaffolding option just throws the runtime error in the browser [*].

The RoR documentation needs to be a lot more organised. I see something like api_method in the ActionWebService::API:Base class, and go to the documentation page, hoping to figure out an answer to my question. Instead, I find that I can't even locate the class there. Throw in modules and mixins, and I don't even know where I should be looking. JDK documentation it sure ain't.

[*] Come to think of it, all successful calls to web service methods using the 'invoke' option produce nice SOAP response XMLs, so if I were doing things correctly, even the error scenario should have produced a response XML, albeit with a fault message (Update: I was wrong; it does).

Shadows of the mind

Horrible prose. I'm just on page 26, and I simply cannot see myself finishing this book. The content may be excellent, but if it's going to take me as much effort to even parse the sentences as to understand the deep logic behind them, sorry, no go. Here's a sample:
I shall need to start by describing some examples of classes of well-defined mathematical problems that -- in a sense I shall explain in a moment -- have no general computational solution.
Taken by itself, I agree that this is not so complicated, but if I were the editor, I would have insisted on something along the lines of
I'll need to start with some math problems that have no general computational solution.
There, that wasn't so hard, was it? Also notice how easier it is on the brain. You just have to let go of the irrational fear that some lawyer is going through the text with a magnifying glass, and is just waiting to trip you up because you said something which you didn't back up in the same fricken sentence.

Monday, November 20, 2006

Now that's what I call a rip-off

A box of 50 blank Moser Baer CD-Rs at Fabmall costs Rs 750 (add Rs 60 for shipping), while the same thing is available at the local computer store for Rs 480. The price might be even lower now; this is what I paid a year ago.


What is usually a 40-minute drive became a 90-minute ordeal for me today evening, because of a detour and a number of traffic jams.

This is just a rhetorical question, but I'll ask it anyway: how can two stretches of the same road that carry the same traffic load respond differently to the monsoon rains, with one holding strong and servicing its users satisfactorily, while the other one disintegrates completely?

The 'Aha!' moment

I guess it had to happen at some point, given the amount of time I've been spending with Ruby.

The ease with which I exposed the ActiveRecord objects' functionality as a web service was what did it for me. Staying 100% inside Ruby code, no mucking around with XML schemas and WSDLs, nothing. I am impressed.

Sunday, November 19, 2006


This is from a really old essay, but I couldn't agree with this passage more:
The word, in the end, is the only system of encoding thoughts--the only medium--that is not fungible, that refuses to dissolve in the devouring torrent of electronic media (the richer tourists at Disney World wear t-shirts printed with the names of famous designers, because designs themselves can be bootlegged easily and with impunity. The only way to make clothing that cannot be legally bootlegged is to print copyrighted and trademarked words on it; once you have taken that step, the clothing itself doesn't really matter, and so a t-shirt is as good as anything else. T-shirts with expensive words on them are now the insignia of the upper class. T-shirts with cheap words, or no words at all, are for the commoners).

Just what the doctor ordered

An easier way to send mobile spam.

Saturday, November 18, 2006

Bloglines problem?

Bloglines hasn't updated any of my feeds since this morning. If I continue with Google Reader for much longer, I might start liking it enough to consider a permanent switch.

Friday, November 17, 2006

ActiveRecord (criminal) gotcha

My foray into ActiveRecord started with this simple bit of code:
require 'active_record'

class Message < ActiveRecord::Base

  establish_connection(:adapter => "oci",
  :username => "someuser",
  :password => "somepasswd",
  :host => "somehost")

  set_table_name "MESSAGE"
  set_primary_key "MESSAGE_ID"
  set_sequence_name "SEQ_MESSAGE"


msg = => "Test message")
Very straightforward, no reason why it shouldn't work, but it didn't: Oracle kept complaining that I was supplying the MESSAGE_ID column twice. No amount of tweaking, googling and tearing out my hair got me anywhere, and I lost nearly a whole day because of this. Finally, out of sheer desperation, I changed "MESSAGE_ID" to lower case.


(I'm not even going to ask why upper case table names are OK, while upper case column names are not)

Thursday, November 16, 2006

What's up with Blogger?

Blogger's posting interface is behaving weirdly all of a sudden. No Preview option, none of the usual buttons for hyperlinks, spellcheck, etc. [Update: The problem is with Firefox (see a pattern here?). Opera displays the page perfectly]

I downloaded Bleezer and BloGTK (I've tried the second one a long while ago), but couldn't get either of them to work. Bleezer gave a NullPointerException, while BloGTK complained that gtkhtml2 was missing (installed gtkhtml2; nope, same problem).

Next choice: the Deepest Sender Firefox extension (which is what I'm typing this post in, BTW). Had a bit of trouble, figuring out Blogger's posting URL, but things look OK. Only thing is, the Spell Checker seems to be disabled.

Posting seems to take forever; copy/paste entry into Kate, then onto Blogger. Sigh.


I am about halfway through the Pragmatic Programmer book, and have decided to take up a proof of concept project in Ruby. I don't want to go the RoR route; the idea is to do just the domain objects in Ruby, and hook it up to a front-end via SCA/WSDL using SOAP. ActiveRecord seems to be a logical choice for this. Some things I've learned/realised along the way:
  1. You should set the RUBYOPT environment variable to 'rubygems' if you want to use Gems things in your code.

  2. "No configuration files" sounds great in theory, but doesn't amount to much when configuration information is stored .rb files. How much ever this information is legal Ruby code, it's still configuration information (I know, this is an RoR thing) Update: It's actually "No XML configuration files". Weasel wording, if you ask me.

  3. Consider this:
    class Test
      print "In test"
    When this code is executed, the "In test" message is printed. Not exactly rocket science, but it took me this bit of code to realise that what stumped me the other day was the equivalent of the static block in Java.

Advice to Skoda

  1. Selling 35,000 cars in five years is not a big deal. It doesn't warrant a full page advertisement in The Hindu.

  2. Consider changing your slogan. Using words like "obsessed" ("Obsessed with Quality since 1895") brings to mind a stalker, not a respected car-maker.

Tuesday, November 14, 2006

Firefox 2.0 sucks

There, I said it.
  1. Any option that I choose in the Preferences dialog crashes Firefox. The error is:
    (Gecko:4845): Gtk-CRITICAL **: gtk_widget_get_parent_window: assertion `GTK_IS_WIDGET (widget)' failed
    (Gecko:4845): Gdk-CRITICAL **: gdk_window_is_viewable: assertion `window != NULL' failed
    (Gecko:4845): Gtk-CRITICAL **: gtk_widget_get_parent: assertion `GTK_IS_WIDGET (widget)' failed
    /home/rajesh/firefox/ line 131: 4845 Segmentation fault "$prog" ${1+"$@"}
  2. Opening a web page with applets (using Java 1.5 plugin) causes it to hang, not always, but most of the time.

  3. Blogger's spell checker doesn't work.

  4. Right-click on GMail Notifier, choose Preferences: crash.

  5. Even when you've set it up so that links meant to open in a new window should open in a new tab, existing tabs are reused. Again, this is random.
Time to downgrade to 1.5.

Nice sig material

From an old IEEE report on software reuse:
The attribute 'IsOptional' is mandatory.

Voting irregularities

I cannot understand what the fuss is all about re: the irregularities in the American elections. Is it really impossible to get a "true count" of the number of votes? Here's a clue (assuming that one wants to go the manual route): do it slowly, with multiple eyeballs. If you still want to go for electronic voting, put your best brains to work, and come up with a foolproof system, and then pass a federal law that mandates that all states/counties should use this (I think the states can suspend their irrational fear that they'd be subjected to the tyranny of a 'foreign' authority and agree to a one-time waiver of whatever constitutional laws that prevent this).

I almost started gloating about how we run our electronic voting setup nearly flawlessly, but then remembered the absolute farce that was the local elections here in Chennai recently -- though it involved only paper ballots, and quickly put the thought aside.

Is the Indian government playing tricks again?

I am able to access blogspot sites from Bloglines and by using Tor, but not directly -- I get "Internal server error".

Update: Nope, proved to be a temporary problem. Things are back to normal.

Monday, November 13, 2006

Advice to self

Never, ever listen to The Reason when you are feeling the way you do now.

Screw it. Going to play it again. And again.


Why do I blog?
  1. It's an opportunity for me to express myself, to be a 'writer'.

  2. It helps me to find out what I really think about something. Nothing brings out the holes/incompleteness in my thought processes better than writing them down.

  3. It has hopefully improved my writing skills [*], which is always a Good Thing (tm).

  4. I can always point to the technical parts of my blog as a way of showing that I have *some* clue about certain things to prospective bosses/employers.

  5. Who knows, this blog may actually become popular, and I might even be able to retire on my AdSense earnings. Just kidding.

  6. To pander to my ego a bit (OK, not 'a bit'; 'a lot').

  7. It's a recorded history of my life, at least for the last thirty months or so. I think it's safe to say that I have captured nearly all the significant things that have happened to me in this period (at least those things I feel are safe enough to record in a public place).

  8. But the most important reason of all: it's a therapeutic experience; maybe this is something any creative activity will lead to, but the very act of putting together a post is a big pick-me-upper (in fact, I started blogging in April 2004 just to get out of a real down-in-the-dumps situation).
[*] On the other hand, there is this weird thing: ever since I started blogging, I think I have become less articulate in speech. Leads me to think that I have a certain quota allotted to me vis-a-vis communicating my thoughts effectively, and I'm frittering it away on blogging.

Additions to the book shelf

  • Shadows of the Mind by Roger Penrose
  • Zen in the Martial Arts by Joe Hyams
The second book is much smaller (but probably equally difficult to understand), so I think I'll start with that.

Is this a dig at Paul Graham?

From Tim Bray:
Out there in the wild woolly “Web 2.0” world, maybe getting it built quick is all that matters, because after you’ve knocked ’em dead and been acquired, you can use the money from the Yahoo! buy-out to rebuild everything right the second time.
Maybe not.

Sunday, November 12, 2006

Dish TV Sucks: Part 7844

You only read about things like this in the Dos and Don'ts Section of "Designing e-Commerce Web Sites for Dummies" and never expect it to happen to you. Unless, of course, you're trying to make an online payment at Dish TV's web site.

I tried to renew my subscription there the other day. While I was at it, I also wanted to see whether I could add the Star TV channels to my account (yeah, I know I was asking for too much, after my earlier experience, but what's life without hope? Anyway, I had had my confidence somewhat improved by talking to a customer service rep who advised me over phone as to which option to use for the renewal/upgrade.)

I did all the things I was advised to, including entering my credit card details, but instead of getting a "Transaction successful" message, I was informed that there was an error. I had faced this kind of error before (if I remember correctly, I think I was asked to try again after 24 hours, for whatever reason), so I wasn't overly concerned -- this was, after all, Dish TV I was dealing with -- and logged out.

Twenty-four hours later, I reentered my transaction, and it went through. This time I didn't opt for the everything-and-the-kitchen-sink option, but just a regular renewal, so maybe that had something to do with my success.

Cut to me reading my monthly credit card statement three weeks later; there are two back-to-back transactions billed against the same merchant. The transaction amounts didn't look familiar, and I fired up GnuCash to refresh my memory. That's when it hit me; the earlier of the two transactions was the $^%& 'failed' transaction.

The only saving grace is that my Dish TV account has been credited with both the amounts. Thank the Lord for small mercies.

Rubbing-salt-into-wounds addendum: Today I found from my friend's mother that Tata Sky doesn't have any problems functioning when it rains, whereas I have been blessed with 'No Signal' messages from my Dish $#%^ TV receiver for the past three years whenever the satellite dish looked at the cloudy sky and decided it didn't like what it saw.

Trackpad woes

The trackpad in my Acer 1641 has stopped responding. The problem exists in OpenSuSE 10.1, Windows XP (via VMWare) and Knoppix LiveCD, so it's not a software/OS issue. I use an external mouse nearly all of the time, of course, but still, when it has to work, it has to work.

Time to exercise the warranty. Taken together with my keyboard problem earlier, any guesses which four-letter brand I won't be looking at when considering my next laptop purchase?


This is probably the saddest animated film that I've ever seen.

When it rains, it pours.

Saturday, November 11, 2006


Why can't we not be sober?
I just want to start this over
Why can't we dream for ever?
I just want to start this over

                                   -- Tool

Monday, November 06, 2006


Car, sitting out rain
Old SMS messages
Never so lonely.

Saturday, November 04, 2006

Adjusting the laptop display brightness

I switched off the AC power today when I retired yet another casualty of my War on Rats -- the voltage stabiliser -- and the laptop battery kicked in; the display also dimmed perceptibly. Nothing wrong, except that when I moved back to AC power, the dimness persisted.

Per KPowersave my current hardware settings don't allow me change the display brightness. I booted into Windows and tried to install the Acer software that came along with the laptop, but it seems my machine is not an Acer laptop, most probably because Windows is only installed via VMWare.

I am currently left with no option to tweak the brightness. Shouldn't there be some OS-independent, hardware-level mechanism to do this? Some tiny knob somewhere, or a special function key?

Update: Duh. There is a function key combination right under my nose -- Fn + Right Arrow -- for this. To think I wasted nearly half a day mucking around with things like pbbuttonsd and pbbcmd.

Friday, November 03, 2006

So this is how ad fortunes are made

It's been less than ten days since I put up Google ads in my Conexant page, and I've already made $0.61, bringing my all-time AdSense earnings to $1.33.

$999,998.67 to go till I become a millionaire. At this rate, I just need about 40,422 years before I can retire to a tropical island. I better start paying attention to the travel brochures.

Ruby on Rails again

Well well well.

It turns out my brush with Ruby on Rails last year wasn't the end of the story.

I need to put together some CRUD screens at work, and I thought of giving RoR another try.

If I remember correctly, I stopped at the bit where I had to get the connectivity to Oracle working. This time I did a bit more googling and found that a Ruby version of the OCI adapter had been made available since the last time. Installing this didn't take me very far; when I ran the scaffold generator it informed me that it couldn't find the 'Comic' generator ('Comics' being the sample table I created).

Yeah, I didn't expect it to be that easy. Anyway, I found that a decent server side Oracle installation would contain the OCI libraries and header files; I checked our project server, and sure enough, oci.h and oci.lib were there. Back to building the adapter from the sources.

Success. I was able to finally see some CRUD screens in action.

I am still not enamoured with RoR, though. The reason: I simply couldn't grok the bit of generated code in the controller class which prevents POSTs. Is it a DBC thing? Is it a static block as in Java? Do the commas mean something special? Do I really care?

Firefox 2.0

Yesterday Firefox went crazy on me. Attempting to add a bookmark in any of the four ways crashed the browser, not just randomly, but every frigging time.

I thought I'd run it from the command line and see if any console messages were thrown. Big mistake; turned out that v1.5 had precedence in the path, and it grabbed this opportunity with both hands. It first informed me that Firefox was not my default browser, and asked me whether I wanted to make it so. It then proceeded to trash my extensions and themes gleefully: none of them worked when I opened 2.0 again.

I left things in this state last night. Before embarking on a painful download today morning, I wanted to check whether I could tweak the profile files and fix things. I renamed the extensions.cache and extensions.rdf files, and voila, the add-ons returned as if nothing had happened, and even had the gall to pretend to ignore me when I asked them where the fsck they had been.

Thursday, November 02, 2006

Outing Xymphora

Here's a thought (an unfounded one, I hope): considering that Xymphora is most probably Canadian, is named Andrew -- as evidenced by the RSS feed information -- and had a root canal this Monday, wouldn't this be sufficient information for somebody with enough resources at their disposal to track him down?


Joel is now blogging about SQL injection attacks?

Wednesday, November 01, 2006

Cricket talent in India

Nirmal Shekar writes:
In an age of boosterism and saturation coverage of a sport that is almost a religion in this country, truth tellers are not easy to come by. And, it is for this reason that Dilip Vengsarkar, Chairman of the BCCI's National Selection Committee, must be applauded for his courage and unblinking honesty.

"To be honest, India doesn't have exceptional talent now," Vengsarkar told pressmen after chairing a meeting to select the Indian team for the ODI series in South Africa.
Here's a contrarian thought: Vengsarkar's statement could be construed as an indirect assurance to the current crop of overpaid bozos in the team that their places are safe, and they don't have anything to worry about hungry youngsters nipping at their heels.

It's not really a contradiction

From a Guardian article via The Hindu:
Polls are relatively straightforward. When compiled reliably they are supposed to tell a story in digits. That story may be contradictory (people say they want more social services and less tax)...
It's not a contradiction because there are ways to fund social services through means other than taxation. I haven't thought this through, but what about the government competing with private companies by providing services, and using all the profits to fund social programs? They can also make money (which they do already) by running lotteries.