Monday, February 02, 2009

Vitamin C can help beat cancers

Not a very catchy story, is it? Let's spice it up a bit -- "Munch on: Potato chips can help beat cancers":
The mouth-watering chips have long been labelled as a "junk food". Yet, experts have claimed that gorging on a deep-fried potato diet can help people in beating certain cancers.

According to them, chips are rich in vitamin C, which tackles dangerous free radicals associated with cancer growth, and those suffering with the disease can even shrink the size of their tumours by eating wafers, the Daily Star reported.
Why do I get the feeling that this news item has an ulterior motive of persuading people to eat more of a) potatoes or b) junk food? The conspiracy theorist in me leans towards (b) -- potatoes, after all, are proven to be a good source of nutrition (including vitamin C), and there are other, much healthier, sources for vitamin C as well.

Sunday, February 01, 2009

Slumdog Millionaire

Note: Please refer to this for more on the evaluation parameters.

Question #1: The ability of the movie to hold your attention is:
A. Huh, you were saying?
C. So so
B. Very good
D. Let's go out for pizza

Question #2: The quality of stunts/effects/action sequences is:
A. Excellent
C. So so
B. Very good
D. Not really applicable
How can there be two correct answers to a Who wants to be a millionaire contest question, you ask. Bite me.

Question #3: How would you rate the crispness of the dialog?
A. So crispy I thought it was the popcorn
C. So so
B. Very good
D.Stilted and soggy like a wet samosa

Question #4: What about the clicheness index?
A. Completely refreshing and original
C.It's a Bollywood movie. Need I say more?
B. Very good
D. Danny Boyle directed this? Seriously?

Question #5: How would you rate the originality of the plot?
A. Very highly
C.It's a Bollywood movie. Need I say more?
B. Quite original
D. Danny Boyle directed this? Seriously?

Question #6: Believability of the plot:
A. Same thing happened to me a while ago
C. It's a Bollywood movie. Need I say more?
B. Heck, I know Jamal
D. CowboyNeal

Question #7: Quality of the cast and their acting:
A. I am uplifted
C. It's a Bollywood movie. Need I say more?
B. I've seen better
D. Abysmal

If you banish the thought that you have to like the movie -- it's won ten Oscar nominations, A R Rahman put together the music, so you better leave the country if you don't like it, you dirty traitor, and so on -- Slumdog Millionaire is a very average movie. The choice of English for the dialog reminded (I should say brought bad memories, rather) of Sins, another movie I remember for all the wrong reasons.

Except for the younger versions of Salim, Jamal and Latika, everybody else turns in pretty crappy performances. Irfan Khan's talents are criminally underutilized, and as for Anil Kapoor, can't really blame anybody -- there's not much talent to utilize, is there? He could have gone easy on all the sneering, though.

The climax reminded me of The Truman Show, with everybody glued to their television sets, watching the fortunes of their hero ebb and flow, but here the suspense and drama are inherited (stolen?) from the Millionaire contest format than anything else.

BTW, the best scene in the movie is the Bollywood dance in VT right before they start rolling the credits. That says a lot.

Saturday, January 31, 2009

Thanks guys

Nice to know that I'm your most valued customer:

Wednesday, January 28, 2009

It's all about the money (well, for most of us)

From a post by an ex-Google employee:
In one TGIF in Kirkland, an employee informed Eric Schmidt that Microsoft’s benefits package was richer. He announced himself genuinely surprised, which genuinely surprised me. Schmidt, in the presence of witnesses, promised to bring the benefits to a par. He consulted HR, and HR informed him that it’d cost Google 22 million a year to do that. So he abandoned the promise and fell back on his tired, familiar standby (”People don’t work at Google for the money. They work at Google because they want to change the world!”). A statement that always seemed to me a little Louis XIV coming from a billionaire.
Amen to that. I too have heard about similar stories of senior management folks who, having made their fortunes in stock options, feign incredulity and exclaim, "Don't tell me you are in it for the money!", when the sorry fact is that if the next month's paycheck isn't in, it's a question of which bill can you postpone payment for.

Saturday, January 10, 2009

FUD statement of the day

"We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet."
-- Anne H. Milley, director of technology product marketing at SAS

That's right, all free software is baaad.

Gaza

Why does Hamas still persist with not recognizing the state of Israel and calling for its destruction, thereby providing a fig leaf to Israel to carry out its genocide? Hamas' hatred may be justified, but pragmatism dictates that they do what is best for their people. Of course, it's a moot point that Israel would come to reason and start conforming to internationally accepted standards of behaviour once Hamas does this.

Deccan Chronicle 1 - 0 Hindu

Headline in The Hindu:
Order allowing plea challenging appointment of Ananth stayed
Head hurts, trying to figure out whether this is good news for the director or not.

Deccan Chronicle version:
HC reprieve for IIT-M director
Thanks, got it.

Sunday, December 28, 2008

Sunday, December 21, 2008

Lawyers, MBAs and Engineers

From an interview with the president of the China Investment Corporation in The Atlantic:
The best and brightest minds go to lawyering, go to M.B.A.s. And that affects our country, too! Many of the brightest youngsters come to me and say, “Okay, I want to go to the U.S. and get into business school, or law school.” I say, “Why? Why not science and engineering?” They say, “Look at some of my primary-school classmates. Their IQ is half of mine, but they’re in finance and now they’re making all this money.
Nothing new in this, except that the part in italics is a near-verbatim quote of what someone said to me yesterday, after meeting one such MBA.

Friday, December 19, 2008

Well

...now the Videocon offer doesn't sound so bad, does it?
With the handset unit continuing to bleed cash, Motorola was planning to spin the division off into a separate company and focus on its remaining two businesses, which focus on home entertainment and emergency-response communications. Those plans have been scrapped for now given the lack of interest by investors.

Sunday, December 14, 2008

It's All Very Well

... doing macho stuff like sinking pirate mother ships and capturing pirates, but it would also be nice if the Indian Navy could turn their attention to protecting the Indian coastline once in a while.

Saturday, December 13, 2008

Pop Quiz

What do these words and phrases have in common:
puissant, rascally, indolence, diabolical, instrumentality, Kilkenny cat functionalism, nocent, pachydermic
Option A: They were all taken from the Reading Comprehension section of the most recent edition of the GRE.
Option B: They are all from V R Krishna Iyer's article in yesterday's Hindu.

There is a lot of sense in what the retired judge has to say, but this gets buried (should I say 'interred') in the pompous verbiage. To be fair, I get a sort of perverse pleasure watching these words jostle for space before making an uneasy peace with their cohabitants whom they would rather die than share a sentence with normally -- it's almost like reading bad poetry -- but the message gets lost. Some sample sentences:
Are our expensive defence systems so goofy and gullible that hostiles in guile, with brute objectives, can reach a busy city, march inside a seven-star hotel and indulge in diabolical destruction with vindictive terrorism?

Even where Ministers and bureaucrats wine and dine, nocent neglect is writ large

The perspective of the executive at the State and Central levels is bureaucratic and pachydermic; pomp and power of office is the focus.
I wanted to add a few more examples, but for some reason, I seem to have developed a headache all of a sudden.

Somebody please tell her

... that no, it's not OK for her to start prescribing medicine:
"When I started to play tennis, I wanted to be a doctor. I had to choose between tennis and being a doctor and I chose tennis. Now, thanks to MGR University, both my dreams have come true," said tennis star Dr Sania Mirza, HDFTBU
(Alright, I added the prefix and degree to her name. Readers who figure out what HDFTBU stands for will win an honorary doctorate from... never mind)

Saturday, November 29, 2008

... And They Come Out of the Woodwork

Some false flag conspiracy talking points about the Mumbai attacks that are doing the rounds:
  1. Hemant Karkare was killed because he was close to exposing the truth about the involvement of the establishment in the Malegaon blast.

  2. One of the pictures of the terrorists shows him wearing a red thread on his right arm, so the whole thing is a right wing Hindu conspiracy.

  3. Some of the terrorists were seen ordering liquor (gasp!), so again it's an indication that it's a right wing Hindu conspiracy.

  4. All the Jewish/Israeli hostages at Nariman House escaped (factually incorrect).

  5. To top it all: India had a hand in 9/11

  6. Update: The hits keep coming: India, with its large foreign exchange reserves, is pressuring the United States into doing its bidding (whatever that is)
I used to have a lot of respect for Whatreallyhappened.com and Rigorous Intuition, but some of the posts there have left me shaking my head in disgust. There are questions still to be answered, no doubt, but it doesn't behoove folks calling themselves rigorous to jump to conclusions before all the facts are in and start mouthing off (BTW, the tone of certain comments in the Mumbai attacks thread at RI border on the antisemitic).

Saturday, November 22, 2008

Jargon, Jargon Everywhere

Fund Manager Speak:
The macro headwinds for equities are strong with the Reserve Bank of India, in their first quarter review of the annual monetary policy for 2008-09, lowering the growth forecast for the financial year 2008-09 by half a percentage point from 8.5% to 8%.
Translation:
Bad time for equities -- RBI has forecast that this year's growth will be 8% and not 8.5% as previously thought [*].
Fund Manager Speak:
The investment objective of the scheme is to generate capital appreciation from a diversified portfolio of equity and equity related securities.
Translation:
This scheme hopes to make money by buying shares low and selling them high; we are also not putting all our eggs in one basket.
[*] Note the use of the word 'strong' in a negative context; one can almost be mistaken into thinking that some good news is being delivered.

Joel on Friedman

Probably the most succinct, yet devastating critique of Thomas Friedman I've seen, Matt Taibbi notwithstanding:
... Thomas Friedman, who, it seems, cannot go a whole week without inventing a new fruit-based metaphor explaining everything about the entire modern world, all based on some random gibberish he misunderstood from a taxi driver in Kuala Lumpur

Thursday, November 13, 2008

Steps to Build and Run SUIF in Linux

  1. Install these packages:

    * bison
    * flex
    * graphviz
    * gcc-2.95
    * tcl8.4
    * tcl8.4-dev
    * tk8.4
    * tk-8.4-dev

  2. Extract the contents of basesuif-2.2.0-4.tar.gz to a directory of your choice

  3. export NCIHOME=<above directory>

  4. cd $NCIHOME

  5. /bin/sh ./install --with-CC=/usr/bin/gcc-2.95 --with-CXX=/usr/bin/g++-2.95 \
    --with-CXXLINK=/usr/bin/g++-2.95 --with-TCL_INCLDIRS=-I/usr/include/tcl8.4 \
    --with-TCL_LIBDIRS=-ltcl8.4

  6. make setup

  7. make

  8. . nci_setup.sh

  9. make test
To install other packages (I used these steps to build dataflow, suifbrowser and tclsuif):
  1. Extract the .tar.gz file to $NCIHOME

  2. Edit each package's makefile and:

    * Change occurrences of '-ltcl8.0' and '-ltk8.0' to '-ltcl8.4' and '-ltk8.4' respectively.
    * Add -DUSE_NON_CONST to the CXXFLAGS environment variable

  3. navigate to the package's directory and type 'make'
To run the SUIF binaries, set the following environment variables: LD_LIBRARY_PATH ($NCIHOME/solib) and VISUAL_TCL ($NCIHOME/suif/suif2b/suifbrowser/visual_tcl_lib/).

Sunday, November 09, 2008

The Global Financial Crisis

Some random thoughts on the global financial crisis:
  1. People keep calling it a liquidity problem, while it's actually a solvency problem. But in a world of fractional reserve banking and insane leveraging, there's not that much difference between the two, I guess.

  2. Fractional reserve banking may be the root cause of all the evils by causing unchecked expansion of credit and money supply, but would a world where all the currencies are backed by gold be capable of sustaining the prosperity of everybody (or even lifting more people out of poverty), when considering the rapid rise in the world population in the last hundred or so years?

  3. I was impressed enough with the tenets of Austrian economics -- due in no small measure to reading Mike Shedlock's blog -- to go out and buy Economics in One Lesson. While the arguments against government meddling for short term gains are impeccable in theory, one wonders whether it is possible to apply the theory to the real world without causing misery to large segments of the population. Consider this argument against minimum wages:
    When such consequences are pointed out, there are those who reply: "Very well; if it is true that the X industry cannot exist except by paying starvation wages, then it will be just as well if the minimum wage puts it out of existence altogether." But this brave pronouncement overlooks the realities. It overlooks, first of all, that consumers will suffer the loss of this product. It forgets, in the second place, that it is merely condemning the people who worked in that industry to unemployment. And it ignores, finally, that bad as were the wages paid in the X industry, they were the best among all the alternatives that seemed open to the workers in that industry; otherwise the workers would have gone into another. If, therefore, the X industry is driven out of existence by a minimum wage law, then the workers previously employed in that industry would be forced to turn to alternative courses that seemed less attractive to them in the first place.
    In reality, how easy is it for someone to change their career midway through? Unless the assumption is that since it's a minimum wage job we are talking about, one does not need significant retraining for a new career. Also, people sometimes don't want to relocate in favour of a higher paying job, and are forced to put up with lower wages.

  4. One keeps reading about the next round of CDS auctions being the ticking bomb that is going to blow us all sky high, but these D-days seem to come and go without much ado.

Drowning in Oil

From Caroline Baum:
All speculative bubbles have a kernel of truth behind them to justify their existence. This time around it was China and India. These emerging Asian giants were gobbling up all the commodities the world could produce to fuel their rapid industrialization.

It wasn't that the story was untrue; it was old. Growing global demand probably was the reason for the gradual rise in oil prices from $20 a barrel to $40 earlier in the decade, and even to $60 by mid-2005.

It was the moon shot to $147 that took on a life, and a litany, of its own. Emerging nations didn't start gobbling up crude, coal and copper all of a sudden in the middle of 2007.
That sure rings a bell.

Saturday, October 04, 2008

Near-Death Experiences

There's an article about research into 'out-of-body' experiences in yesterday's Hindu (note: the online edition is a truncated version of the print article). I have been fascinated with NDE for quite some time, and so I was looking forward to knowing whether there is any conclusive evidence one way or the other. Sure enough, there is mention of an objective method to collect evidence (emphasis mine):
I wanted to investigate if these experiences could be attributed to the drugs that we gave the patients, to abnormal levels of oxygen or carbon dioxide in the blood and was there a way of verifying the out-of-body component? So I hid symbols on top of cardiac monitors at each patient's bedside which could only be viewed from an out of body perspective.
That sounds promising; reading on:
In June 2008 my book, an academic monograph, "The Near-Death Experiences of Hospitalized Intensive Care Patients: A Five Year Clinical Study" was published by The Edwin Mellen Press. The reason that I chose to publish an academic book is because I believe these experiences need to be taken seriously.
The article then goes into the details of the study, its purported benefits, and so on, but there is no mention of whether any evidence supporting these experiences was found.

Methinks there's no conclusive evidence; or, it's a "buy my book to find out all about it" ploy. Also, what the heck is an academic book? Has it been peer-reviewed like an academic paper?

Friday, September 19, 2008

Predatory Lending

Just when the whole world is waking up to the fact that too much of leverage is a bad thing, there's an ad in today's Hindu for home loans with a 3% down payment. The lender is none other than ICICI Bank, who is also in the news today for the wrong reasons:
Mr. Chidambaram pointed out that the country’s public sector banks, in which the government holds the majority shareholding, did not have any “undue exposure” and whatever they had were in accordance with the Reserve Bank of India guidelines. ICICI Bank, however, did have some exposure and it had made the necessary disclosures.
No surprises there.

Sunday, September 14, 2008

The Best Argument Against Democracy

.. is a five minute conversation with an average voter.

Here's a letter to Deccan Chronicle in favour of the Indo-US nuclear deal:
I have been following (Brahma) Chellaney's articles on the nuclear deal. From the beginning he has been assiduously following a line quite opposite to the one held by the government. In a democratic country, every citizen has a right to express his or her opinion, and Chellaney is one among them. He, however, appears to be a diehard critic of the deal for reasons best known to him.
Excuse me, "reasons best known to him"? Here's this guy, who has been busting his hump, wading through the text of the various documents pertaining to the deal and the NSG waiver, and putting down bulleted points for why he is against the deal, and we still get questions like this.

Reminds me of the Friends episode where Phoebe announces that she wants to carry her brother's baby, and Ross lists a number of reasons why she needs to think this through, and Phoebe's reacts "What's your point?"

Staying on the nuclear deal, there seems to have been a sort of realignment among the supporters and opponents. Hindu started out as a critic, then revised its stance, and is now once again giving prominence to things that are wrong with the deal. DC, on the other hand, started out negative, but is keeping quite nowadays -- Chellaney's columns notwithstanding -- about the various bits of bad news (no columns from Seema Mustafa, too).

Wednesday, September 03, 2008

Of Objects, Classes and Metaclasses

"The greatest talents are slowly mastered" (Lao Tzu)

It started with the metaobject protocol, moved on to metaclasses, and culminated in this paradoxical statement from Wikipedia: "[T]he metaclass of Metaclass is an instance of Metaclass."
  • An object is an instance of a class.

  • A class is a singleton instance of a metaclass.

  • A class is also an object.

  • A metaclass is also a class (as well as an object, of course).

  • A metaclass, being a class, is a singleton instance of a metaclass.

  • Metaclasses are instances of the class Metaclass.
Which, I think, leads us to the Wikipedia quote.

Class diagram (Smalltalk-specific, with a few bits omitted for clarity; also, NumberMetaClass isn't named as such):



I started off with the profound quote from the Tao Te Ching, but I'm not really sure what the utility of this stuff is, unless I'm implementing a Smalltalk virtual machine. Well, I can at least sleep peacefully at night, knowing that if ever I run into the Wikipedia quote again, I know that I can figure it out. Sort of.

Staying on the subject of objects (pun unintended), here's a delightfully candid quote from an interview with Alexander Stepanov (emphasis mine):
Question: I have done a search on Lycos for your papers and I only found two titles: the STL manual and a resume of you presentation of STL to the standardization committee.

Answer: Well, I am lazy, but not that lazy. I probably published 20 papers and a book. Many of them are on different STL sites. (Dave Musser's site probably has several.)

Question: Which book?

Answer: The book is "The Ada Generic Library: Linear List Processing Packages", by David R. Musser and Alexander A. Stepanov, Compass Series, Springer-Verlag, 1989. It is not really worth reading.
Trivia: there are 23 occurrences of the word 'class' in this post.

Saturday, August 30, 2008

Movie Review: The Dark Knight

The first thing that comes to mind when I think of The Dark Knight a week after watching it is the great role played by Heath Ledger. The scene where he talks about his drunk father had me involuntarily touching my face, in anticipation of the gore that mercifully remains off-camera. All in all, a great villain. Pity we won't get to see him again.

Batman, in contrast, is not so great. He is overshadowed in so many scenes; can't blame him really, when you have folks like Michael Caine and Morgan Freeman as co-stars (not to mention The Joker).

The movie may be topical for an American audience, in that it explores things like how too much focus on security could lead to fascism, what people are willing to sacrifice for their personal safety [*], and so on, but these things are of not much interest to somebody who is just looking for a good action movie.

One thing that strained the credibility a bit was the power wielded by the Joker, and how he gets access to all the resources that he commands. Would have been easier to believe if he were a traditional comic book villain with superpowers or a super-weapon.

Oh, I've mentioned this before, but what's with these superhero movies where people are not able to put two and two together and figure out that the caped crusader bears a more than passing resemblance (mask notwithstanding) to the well-known local billionaire?

[*] The denouement of the ferry scene, while inducing the intended swelling of hearts in the audience, seemed a trifle contrived. Maybe it's just the cynic in me.

P.S. The high-tech kidnap scene in Hong Kong would have looked more natural in a Bond movie or in an MI sequel, IMO.

Friday, August 29, 2008

WTF?

I received this in an email from Citibank (italics mine):
Dear Customer,

When did you last abandon the boardroom in pursuit of play? Forsaken corporate schedules in favor of a holiday itinerary? Swapped your starched suit for a glowing tan?
...
Dear Marketroid, if you click on the 'Profile' link on the top right hand corner of this page, you will see my picture. Please note that I am a dark-skinned Indian, and that a 'glowing tan' is the last fricken thing on my mind. Considering the fact that the email was sent from 'india.marketing@citi.com', you guys will have to either a) stop mindlessly using copy from your international marketing *ahem* collateral or b) kindly remind your copywriters that, while they are enamoured with all things western, it wouldn't hurt them to reflect once in a while on the fact that they are in India, where people buy Fair and Lovely, not Coppertone.

Saturday, August 23, 2008

Lisp or Smalltalk?

I have been thinking about doing all my side projects in Lisp -- due in no small measure to taking the time to finally read Practical Common Lisp cover to cover -- and have been playing around with the various Lisp environments and libraries. Impressions:
  1. Programming in Lisp makes one feel good (I know, this is about as touchy-feely as you can get). The constant effort to abstract things away, looking for ways to automate repetitive code fragments, and so on brings with it a real sense of progress (at least from a programming perspective).

  2. Though Lisp shares the concept of an image with Smalltalk, this is not as readily apparent and IMHO as powerful as Smalltalk; for example, I need to load packages through startup files each time I start the environment.

  3. The Lisp environments are not as friendly as the Smalltalk IDEs where everything hangs together, so to speak.

  4. Library support also seems more cohesive in Smalltalk. asdf-install does provide a way to pull packages easily, but there is no way to see what packages are currently installed in the image, what *are* the 'right' packages to install, etc. Not to mention the need to load packages every time using the startup file.

  5. File-based development seems like a regressive step after programming in Smalltalk. For one thing, I don't know if there is an easier way to load the code from all my files than calling load every time I start the environment.

  6. I have a small homegrown wiki application running in VisualWorks which I wanted to see if I could redo in Lisp. After googling a bit and searching the Common Lisp web sites, two frameworks seemed worth pursuing: WebActions (modelled on Struts) and Weblocks (a Seaside-like continuations-based framework). Weblocks seems the more promising, no doubt owing to the advantages of using continuations.
From a programming perspective, I guess it does not really matter whether I choose Lisp or Smalltalk (unless I run into a situation where the use of macros is the only way to get something done), but Smalltalk does score from a convenience perspective. I think I'll stick with ST.

Monday, August 11, 2008

Joke of the day

From a Slashdot comment:
Where did you get your php info? foreach was introduced in PHP4...
I get mine from phpinfo();

Saturday, August 09, 2008

Can you spell 'frame-up'?

From an article in The Hindu about Aafia Siddiqui:
...Ms Siddiqui was arrested by Afghan police in July along with her son — the date is unclear — after they found them loitering outside the compound of the Governor’s house in Ghazni. They questioned her, and on suspicion, checked her bag, in which they allegedly found “suspicious” liquids in glass containers, a bomb-making manual, and some material on New York and its landmarks. She was handed over to the U.S. authorities on July 17.

On July 18 , Ms Siddiqui is said to have fired at American soldiers who were present at the Afghan facility where she was being held, with a rifle that one of the soldiers had left lying around. A soldier fired back, wounding her. Charged in a criminal complaint filed in the Southern District of New York with one count of attempting to kill U.S. officers and employees and one count of assaulting U.S. officers and employees

Saturday, July 26, 2008

Just Saying

Amazon has released information about the cause of the recent S3 outage and what they are doing to ensure that their "performance is statistically indistinguishable from perfect":
Here are the actions that we're taking: (a) we've deployed several changes to Amazon S3 that significantly reduce the amount of time required to completely restore system-wide state and restart customer request processing; (b) we've deployed a change to how Amazon S3 gossips about failed servers that reduces the amount of gossip and helps prevent the behavior we experienced on Sunday; (c) we've added additional monitoring and alarming of gossip rates and failures; and, (d) we're adding checksums to proactively detect corruption of system state messages so we can log any such messages and then reject them.
Except for (d), these actions don't really address the cause, but only mitigate the effects.

Thursday, July 24, 2008

Quicksort in Lisp

Version #1:
(defun generate-lt (value)
(lambda (x) (and (< x value) (list x))))

(defun generate-eq (value)
(lambda (x) (and (eq x value) (list x))))

(defun generate-gt (value)
(lambda (x) (and (> x value) (list x))))

(defun quicksort (list)
(if (<= (length list) 1)
list
(let ((pivot (nth (truncate (/ (length list) 2.0)) list)))
(append (quicksort (mapcan (generate-lt pivot) list))
(mapcan (generate-eq pivot) list )
(quicksort (mapcan (generate-gt pivot) list))))))
Duplication of code in the 'generate-' functions. Need a macro.

Version #2:
(defmacro generate-comparator (value fn)
`(lambda (x) (and (,fn x ,value) (list x))))

(defun quicksort (list)
(if (<= (length list) 1)
list
(let ((pivot (nth (truncate (/ (length list) 2.0)) list)))
(append (quicksort (mapcan (generate-comparator pivot <) list))
(mapcan (generate-comparator pivot eq) list )
(quicksort (mapcan (generate-comparator pivot >) list))))))
Looks elegant, but can we make this even more concise?

Version #3:
(defun quicksort (list)
(if (<= (length list) 1)
list
(let ((pivot (nth (truncate (/ (length list) 2.0)) list)))
(append (quicksort (mapcan (lambda (x) (and (< x pivot) (list x))) list))
(mapcan (lambda (x) (and (eq x pivot) (list x))) list)
(quicksort (mapcan (lambda (x) (and (> x pivot) (list x))) list))))))
Seven lines of condensed confusion. Not to mention wreaking havoc with the layout of the blog.

(Blog post inspired by a) a rekindled interest in Lisp and b) a sudden urge to share the joy of having found a non-gratuitous use for macros)

Update: Version #4:
(defun quicksort (list)
(if (<= (length list) 1)
list
(let ((pivot (first list)))
(nconc (quicksort (remove-if #'(lambda (x) (>= x pivot)) list))
(remove-if #'(lambda (x) (not (= x pivot))) list)
(quicksort (remove-if #'(lambda (x) (<= x pivot)) list))))))

Saturday, July 19, 2008

Who Moved My Chees(y Distro)?

[Warning: boring post about Linux distros]

Kubuntu has been my distro of choice for more than a year; I had reached a point where the download-new-distro-spend-a-week-tweaking-it was no longer appealing. Every once in a while the urge to go distro-hopping would hit, but the comfort zone of status quo would prevail.

But the cheese did move one day: KNetworkManager would drop connections at random, not remember the wireless router's SSID, and so on, and things got fairly annoying. Not to mention the fact that things were, on the whole, not as zippy as they used to be. Time for a change.

I decided to give OpenSuse 11.0 a try. After a few false starts with the ISO download (see problem with KNetworkManager above), SuSE was up and running, but no go. What with my peeves with KDE 4.0 and the problems with the Java plug-in (1.5 would crash Firefox while 1.6 would make the applet disappear after one or two operations), I quickly abandoned it.

I have tried out MEPIS in the past, and except for the sound problem found it to be very good. True enough, 7.0 turned out to be equally good, but the sound problem seemed to have been carried over from 6.5. But this time a quick modprobe snd_hda_intel took care of it (Did I try this before? Not sure), and so here I am, with SimplyMEPIS 7.0 as the distro de jour (well, not exactly a day -- I plan to use it for at least six months).

Good things about MEPIS:
  1. Very zippy

  2. Comes with a lot of stuff already bundled, so you don't have to look beyond the CD for things like the Java Runtime, Skype, etc.

  3. Better handling for wireless (KNemo in place of KNetworkManager)
The not-so-good things:
  1. Some of the bundled packages are slightly outdated (Firefox, Postgres)

  2. I found some random weirdness with the mounting of other partitions. For some reason I couldn't get them to mount on a directory I had created in the root partition. Instead, I had to allow them to be mounted as /mnt/sda*, and then create a symlink to this directory.

Sunday, July 13, 2008

Put a Shark in Your Tank

There's this story about how Japanese fishermen put small sharks in their fish tanks to keep the fish fresh and better-tasting till they reach the shore. A Google search for the title of this post will give you the full story.

I have nothing against this story -- kudos to the Japanese fishermen for solving their problem in an innovative manner. What I do take exception to is holding up this story as motivational lesson:
Instead of avoiding challenges, jump into them. Beat the heck out of them. Enjoy the game. If your challenges are too large or too numerous, do not give up. Failing makes you tired. Instead, reorganize. Find more determination, more knowledge, more help. If you have met your goals, set some bigger goals. Once you meet your personal or family needs, move onto goals for your group, the society, even mankind.

Don't create success and lie in it. You have resources, skills and abilities to make a difference." So, put a shark in your tank and see how far you can really go!
That's all very well, but there's another -- admittedly pessimistic -- way of looking at it, from the perspective of the poor fish: no matter what you do, nothing matters in the end; you will end up getting eaten anyway, so you might as well surrender to the shark and get it over with ("Oh, these poor humans will end up with not-so-great-tasting fish? Bite me").

Also, just because the fish taste better, it doesn't mean that they had a hoot, trying to save their asses from the %^&# shark.

Sunday, July 06, 2008

Something to Think About

"Have you imagined commodities like steel, crude oil, red chilli, pepper and gold is [sic] a highly potential [sic] investment option. Read on to see why? [sic]" begins an ad in The Times of India today. It goes on to quote figures like 47.58% for cardamom, 25.22% for gold, and 23.80% for crude as the returns in the derivatives market for these commodities, and pitches for a training course on derivatives.

Two points:
  1. Per a report by a United States Senate subcommittee entitled "The role of market speculation in rising oil and gas prices", a speculator 'does not produce or use the commodity, but risks his or her own capital trading futures in that commodity in hopes of making a profit on price changes.'

  2. The folks who enroll for the above mentioned course are already suffering from the actions of people whom they are trying to emulate ("I guess I'll have to take the public transport to attend the classes because petrol is so expensive these days. Those ^&*$ speculators!").

Saturday, June 28, 2008

Here's an idea for a startup project

I was (re)reading Paul Graham's older essays [*], and was thinking about his contention that one can get ideas for startups just by reading a business newspaper for a week.

Well, I didn't do that, but here's an idea all the same.

The IT Department has taken to electronic filing of tax returns in a big way, and have published an XML schema for this, in addition to launching web services for consuming the electronic filings.

I have been using this system for filing my returns, and have found the procedures in place quite cumbersome -- last year it was Adobe Reader , with all its quirks and bugs, while this year it's an Excel document that serves the same purpose, though not very well.

Now, if somebody comes up with a tool that does this job in a more user-friendly manner, I'm sure there would be takers. Mind you, the tool would not be very complicated, so one cannot charge more than, say, 50 bucks for it, but there's still some money to be made.

There is already a web-based solution for this (taxsmile.com), but it involves storing your personal finance data in somebody else's servers. The tool I have in mind will be a purely client-side solution, one that will simply take your data and create an XML version of it that you can upload to the IT department's website yourself. What the hell, one might even go all the way and put in the functionality to upload the XML file as well.

Things like piracy, ease of installation (think applets) are to be worked out, but hey, this is just a blog post, not a pitch to a VC.

[*] I know, I said earlier that I had stopped reading them, but his essays keep appearing on Reddit's front page, and let me be honest -- he does write well, and makes you question a lot of things.

Dave's Back

... and with some good stuff as usual:
I guess I need to pause here briefly to fend off a barrage of e-mails railing against my ‘racist’ reference to Barack Obama as a “whitish black guy.” For the record, I am not suggesting here that a black man cannot be articulate and well groomed. No, what I am suggesting is that what is fundamentally racist here is the fact that Mr. Obama is universally referred to as “Black” or “African-American” despite the fact that, according to my exacting mathematical calculations, he is actually precisely ½ black and ½ white. Wouldn’t it then be just as accurate to refer to Obama as “White” or “European-American”? Why is he disqualified from inclusion in the Caucasian ‘race’ even though he is every bit as white as he is black? In labeling him as “black,” aren’t we really saying that his bloodline is tainted? Aren’t we saying that, even though he has Caucasian blood, it isn’t pure enough for inclusion in the Master Race?

Two Words for Paul Krugman: Um, No.

I am usually in agreement with Paul Krugman's views, but not with this one:
What about those who argue that speculative excess is the only way to explain the speed with which oil prices have risen? Well, I have two words for them: iron ore. 

You see, iron ore isn’t traded on a global exchange; its price is set in direct deals between producers and consumers. So there’s no easy way to speculate on ore prices. Yet the price of iron ore, like that of oil, has surged over the past year. In particular, the price Chinese steel makers pay to Australian mines has just jumped 96 per cent. This suggests that growing demand from emerging economies, not speculation, is the real story behind rising prices of raw materials, oil included.
If the emerging economies continue to grow at more or less the same pace as for the last two or three years (and, in fact, are even slowing down, like in the case of India), where is this alleged "growing demand" coming from?

Thursday, June 26, 2008

Germany 3 - 2 Turkey

... and Semih Şentürk can STFU at last. Maybe it's just me, but I found his repeated gesture of putting his finger to his lips and 'silencing' the opposite team's fans after scoring a goal incredibly obnoxious.

BTW, the loss of pictures from the stadium from the 75th minute or so onwards, just when things got interesting was, well, unique.

Sunday, June 22, 2008

Hilarious

Gail Collins:
... picking a running mate is -- no disrespect intended -- like picking a pet. How much time are you planning to spend with the little fellow? How much exercise will he be getting on an average day? On the extreme, you have the William Wheeler model ("There's the living room. Go find a corner and sleep in it") On the other end, there's the Cheney version in which the pet takes over the chequebook, diversifies the family investment portfolio and starts strafing at the neighbour's cat.

There's a place for one-touch passing

... and it isn't in front of your own goal. When you have the opposite team's fowards breathing down your neck, the safest thing to do is to boot the ball, and hard.

I'm referring to the Russians. Not that they came to grief because of this, but they did make their supporters' hearts skip a bit. Having said that, to thrash a team as strong as the Netherlands with such delightful one-touch passing is something special.

Arshavin is going places next season, no doubt about it.

Saturday, June 21, 2008

Yeah, That'll Do It

From The Hindu:
...the general apprehension is that of yet another bout of monetary policy tightening by the RBI - which could lead to increases in lending rates with respect to automobile, housing and consumer loans.
New loans will become dearer, alright, but how's this going to have a direct bearing on the family budget? OK, I get it, below-poverty-line families thinking about buying a car, a house, or a flat-screen TV will balk at the high EMIs, and will therefore have more disposable income to spend on luxuries like food, thereby offsetting the pinch of higher prices. Bottom line is, this will not have a first order impact on inflation: the fuel prices hike is too much of a countervailing force on the other side.

On a side note [*], now that the inflation rate has reached truly alarming levels, the captains of industry have woken up. Not out of concern for the common man, but about sustaining economic growth:
Inflation is not only a concern for the government but also a concern for the industry.. [the unabated rise in prices] reduces the space for fiscal and monetary policy maneuverability without seriously impacting growth.
[*] Come to think of it, the concern over a rise in lending rates for say, flat-screen TVs, actually ties in with the worry about sacrificing economic growth. Silly me.

Quote of the Day

From a letter in today's Hindu:
The message that is loud and clear is: if you want a free helicopter ride plus your photo on the front page of national newspapers, sit tight on the main railway track and hold the nation to ransom.

Friday, June 20, 2008

Spot the Irony

Obama has to vehemently deny the 'slur' that he's a Muslim, while the EU is being chastised for blocking Turkey's entry into the Union:
All this is wrong-headed. Turkish membership of the EU is important - Bush is right about that - for historical reasons as overarching as Europe's debt to the nations Yalta imprisoned. No more important bridge could be forged at this moment between the Christian and Muslim worlds.

Thursday, June 19, 2008

Fsck You Fridays

Dear cubicle dweller,
  1. Tired of having to put up with colleagues who refuse to respond to your emails unless you copy their supervisor in the email and/or tag a return receipt notification?

  2. Do you feel like smashing your fist on the face of the punctilious jerk who a) rejects your IT request form because you had selected the wrong category and b) refuses to respond to emails asking him to enlighten you as to what the fricken correct category is?

  3. Are you sick of HR folks whom you talk to 24 hours ago about your problem, but who feign complete loss of memory and ask you to start from the beginning all over again?
Fret no more, because 'Fsck You Fridays' is here. Every Friday, between 3 and 4 PM, one workstation on each floor will be open to you and your fellow cube-dwellers for you to express your unalloyed love for the above-mentioned folks. Just walk up to the screen, type in the employee number of the person you would like to bless, a short description as to why you love them, and press 'Submit'. The object of your affection will instantly receive a missive (anonymous, of course) that encapsulates your sentiments, accompanied by a cheap plastic hand (life-sized) performing a one-finger salute.

Thrilled? Jumping with joy? Wait, there's more. Employees winning more than ten tokens of affection in a month will be entered in a monthly 'Screw You Sundays' raffle where...

Regards,
Corporate Cross Functional Team on Motivation and Employee Empowerment (CCFTMEE)

REST

I have been coming up to speed on REST for the last couple of days or so. Some obvious and some not-so-obvious things I've learned:
  1. REST may be the architectural style on which the World Wide Web was built, but it's not exactly tailor made for web applications (accessed by humans from browsers).

  2. Since REST favors a stateless mode of interaction, transactions will have to be done outside REST (not even sure if this is possible), or we'll have to treat each service invocation as atomic, and build compensating transactions a la BPEL.

  3. REST mandates that we model the application in terms of resources and representations. Not sure how well can this be mapped to the domain we are modeling. It's easy to say 'think in terms of resources, not services', but dressing up an itinerary creation service as an itinerary creator object (sorry, resource) doesn't cut it, IMHO.

  4. We need an HTTP client to program to a REST service; support for PUT/DELETE in browsers is not available (yet?). Don't know whether this can be done in JavaScript.

  5. If we want to architect a web application whose service layer is implemented in REST, we will need two web/application server layers -- one to receive the request from the browser client, and another that actually implements the service. The two layers can be collocated, of course.

  6. This is a minor nit: since one of the strengths of REST is the uniform interface, there is no interface specification (equivalent of WSDL), and we cannot generate the service invocation code automatically.

  7. More network traffic as we need to transport more information to the service because of its statelessness.

  8. Authentication information needs to be sent with each request. This implies that the first layer in point #5 will have to manage the session data if it is servicing a user logged in from the browser application. The scalability benefits are therefore not available to this layer.

  9. Issues like locking, concurrency, etc. seem tricky. I haven't thought this through yet, but off the top of my head, things like including a timestamp field in the representation seem necessary.

Saturday, June 14, 2008

That's a new one

Spammers/Hackers have now taken to insulting their potential targets: there's an email in my spam folder with the subject 'You look really stupid rajesh.jayaprakash' with a link to a Windows executable called video.exe, which is probably malware.

Commitment

Yuvraj Singh has agreed to present the Man of the Match award at a Euro 2008 match on Sunday. Nothing of significance here -- he is supposedly a Man United fan and would love to meet Ronaldo -- except that if the Tri-Nation final on Saturday spills over to the reserve day, i.e. Sunday, there will be a conflict in his schedule.

Turns out that Carlsberg's first choice was Dhoni, but he declined on account of the above potential schedule conflict. Considering that Dhoni is also a keen football fan, this says something about his commitment, doesn't it? Or does it have more to do with his being the captain of the team?

Friday, June 13, 2008

Thursday, June 12, 2008

It's Ten Years Later

... and Bilic is now standing in the Croatian team dugout, not as player, but as team manager. Managers are getting younger all the time -- Southgate is another player-turned-manager who comes to mind -- but it still feels odd to see Bilic, earring and all, try to appear comfortable in a suit.

Incidentally, Bilic is best remembered (at least by me) for being given hell by the French fans in World Cup '98 for making Laurent Blanc miss the final because of an ill-deserved yellow card acquired on account of Bilic's histrionics.

Monday, June 09, 2008

My VA Smalltalk Experience

  1. You need to register to download an evaluation copy. Strike one.

  2. The setup program complains about the non-existence of '/usr/local/VASmalltalk/7.5', which needs to be created manually.

  3. Run the setup program; hit error "Runtime Error -- couldn't open file with UnixProcess". Readme.txt says you need csh, or you can try fooling the installer by creating a symbolic link to bash and naming it as 'csh'. Strike two.

  4. Not wanting to cut corners, you install csh. The error goes away, and you are able to complete the installation.

  5. OK, how do we start VA Smalltalk? Turns out you are not done with the installation yet. Need to run a program called 'vasetup'. This creates a copy of the image and other files.

  6. You try starting VA by running the command 'xterm -sb -e abt&'. Nothing happens, except for the screen flickering for a moment. Go back to the documentation, and find that there are a number of things you still have to do, starting with tweaking the abt.ini file followed by changing the ownership of the manager -- whatever that means -- and a whole lot of other things that may be necessary with Linux.

  7. By now you are pretty much at the end of your tether and decide that it's simply not worth it. Strike three. rm -rf /usr/local/VASmalltalk
It's 2008, and the fact that I'm using Linux shouldn't mean that I need to jump through so many hoops. These guys need to make things way, way simpler. They can look at how VisualWorks does things, for starters.

Thursday, June 05, 2008

The Left is at it again - Part 2

They will not be man enough to walk out of the government and bring it down, but still want to earn brownie points with the public through protests and bandhs against the fuel prices hike. Fscking hypocrites.

Wednesday, June 04, 2008

Blah?

I received the latest VMWare Corporate Email Newsletter today. By definition, there's bound to be a lot of corporate blah-blah in it, but it was quite surprising that somebody in VMWare itself seems to think so:



The culprit (if you could call it that) is Gmail; since it doesn't display images by default, the alt text is all you see when you open the email.

Sunday, June 01, 2008

Movie Review: Indiana Jones and the Alien Skull

(I know, the name is not quite correct)

I've either reached the limits of my tolerance for these action flicks, or the latest edition of Indiana Jones really sucks. Either way, not the most enjoyable way to spend a Saturday afternoon.

For a change, let me try being more objective about my review; I'll lay down the parameters for evaluation and their respective weightages first, then rate the movie along these parameters ( * cough enterprisey cough *):
  1. Ability to hold viewer's attention (25%)
  2. Quality of stunts/effects/action sequences (15%)
  3. Crispness of dialog (15%)
  4. Clicheness index (15%)
  5. Originality of the plot (10%)
  6. Believability of the plot (5%)
  7. Quality of the cast and their acting (15%)
Ability to hold the viewer's attention: Though the movie doesn't grab your attention and refuse to let it go, it doesn't drag on, either. Three stars.

Quality of stunts/effects/action sequences: I expected better from an Indiana Jones sequel. Pity that they couldn't come up with something decent even for the climax. Two stars.

Crispness of dialog: Some of the dialog between Dr Jones and Mike raises a few chuckles, but pretty lame otherwise. Two and a half stars.

Clicheness Index: Exhibit A: Old couple on an expedition bickering with each other even as they save each others' lives. Exhibit B: Expedition goes into a cave in the climax, expedition does something inside, everything comes tumbling down, expedition (minus expendables/villains) hauls ass. Been there, done that. One star (the parameter name is misleading, actually; the higher the stars, the better the movie. Please send me a change request -- please use form CCRF020 -- filled out in triplicate, and I'll see what I can do).

Originality of the plot: This is the fourth (?) movie in the franchise. Need I say more? Two stars.

Believability of the plot: I'm willing to cut some slack here, this is Indiana Jones, after all. Two and a half stars.

Quality of the cast and their acting: I like Harrison Ford quite a lot, but he seems to be getting too old for this kind of stuff. The rest of the cast just seem to be along for the ride, except maybe for the Russian lady villain. Two stars.

Overall rating: 2.2 stars

Now for the subjective part:
  1. Is it just me, or was there an attempt to revive the Cold War propaganda? I'm talking about the evil Russians who slaughter innocent indigenous tribes and cut down the rain forests.

  2. Which kind of idiot tries to use a snake as a rope to rescue people drowning in quicksand? Staying on the subject, Dr Jones' exposition of the difference between quicksand and drysand even as he is being sucked in was instrumental in taking away half a star from the Believability parameter.

  3. Every movie has a satori moment, a sort of tipping point when (a) you realize that the money spent on the ticket was worth it or (b) you want to slap yourself on the forehead (a la Priety Zinta in the IPL semis). For me, this moment occurred with Professor Oxley's "They are in the space between spaces" comment. I leave it as an exercise to the gentle reader to figure out whether it was in the context of (a) or (b).
On second thought, I'm going to deduct 0.1 stars because I couldn't get the irritating theme music out of my head till 11:30 PM.

Saturday, May 31, 2008

How does a breeze become a wave?

Is Thomas Friedman writing editorials for Deccan Chronicle now?
The question of majority thus satisfactorily resolved, the stage was set for the birth of the first BJP government in South India: the saffron breeze that swept the north has begun to blow in the south. However, no one will take a bet on whether the breeze will convert itself into a wave in the coming years and bestow on the BJP the status of a major political player in the South as well.

Sunday, May 11, 2008

How to Retire Early

The latest issue of Outlook Money has a story on how to retire early (no, it doesn't advise a glass of hot milk at 8 PM). It features the stories of five people who managed to do this successfully. Being the skeptic I am, I didn't have much confidence in their advice, but I wanted to see what these five people had done.

To cut a long story short, if you want to retire early in life, do one (or all) of these things:
  • Get a golden parachute, and let your wife continue to work (retiring early doesn't apply to your spouse, apparently)
  • Spend a lot of time overseas, leverage the exchange rate, quit your high-paying job and become a consultant
  • Make your fortune as a partner in a PE firm (that's private equity; yeah, three months back I too would have gone 'huh?')
  • Buy two houses (live in one; use the rent from the other for living costs)
  • Sell your stock options
In other words, if you want to become rich, you should make a lot of money. Gee, thanks a lot, I only wish I had known this when I was starting out on my career.

Saturday, May 10, 2008

Staying on the IPL

... I think the way the commentators mention the name of the sponsors every chance they get ("DLF Maximum Sixers", "Citi Moment of Success" and so on) is simply disgusting.

Kapil on the IPL

Today's Hindu has an interview with Kapil Dev. As expected, it's about his take on the IPL. There is a hint of sour grapes ("What stops film stars from playing a T20 match in the IPL"), some doomsday predictions ("...club culture will command a bigger loyalty than State or even country") and a dash of wishful thinking ("The BCCI is finished as an organisation"), but we should give credit where it' due: no one can deny Kapil's efforts in lighting a fire under the BCCI's ass with his ICL initiative. To rub salt into his wound, some BCCI official even had the gall to say that he had been dreaming about the IPL for years. Considering Kapil's contributions to Indian cricket -- his 1983 World Cup triumph is about 1,743,449 times worthier that the Twenty20 World Cup victory, notwithstanding all the hype surrounding the latter -- the least the BCCI should have done is to have roped him into the IPL in some administrative capacity.

Thursday, May 08, 2008

Amen to that

I've always felt that the talkers were winning (or have already won) the battle against the doers, and this quote from Sam Smith (via Xymphora) nailed it for me:
We have created an economy based not on actually doing anything, but on facilitating, supervising, planning, managing, analyzing, tax advising, marketing, consulting or defending in court what might be done if we had time to do it.
India is not there yet, but give it just another decade or so.

WSIF Provider for Spring

Rather than have folks leave a comment or email me about my WSIF Spring Provider implementation, I have uploaded the files (sources and sample WSDL) to my web site.

Thursday, May 01, 2008

KDE 4.0

Reasons I don't like KDE 4.0:
  1. No way to customize the panel - can't change the size, transparency, auto-hide, etc.
  2. No way to change the menu to, say, the classic view.
  3. Speaking of the classic view, changing the icons does not change anything.
  4. Limited options to configure the clock. It's now on a par with the %$^# Gnome clock (one of the reasons I switched from Ubuntu)
  5. Cannot manipulate the contents of the system tray.
  6. Cannot move the icons around in the panel.
  7. Where do I specify shortcuts for the menu items?
  8. The options for keyboard shortcuts is a subset of what I used to see in 3.5.
  9. Where is the option to hibernate?
  10. On the whole, it's just a Vista wannabe - widgets and all.
While I'm on the subject, I might as well bitch about Firefox 3 as well - the GrayModern2 theme is yet to be ported to v3; I am left with a poor substitute: Phoenity Modern.

Monday, April 14, 2008

Heirs Try To Freeze Nizam's Funds

The heirs of the Nizam of Hyderabad are trying to get back the millions of pounds of family funds held in a frozen account in a London Bank. Reminds me of this great quote from a recent Anti-Empire Report:
"Get off this estate."
"What for?"
"Because it's mine."
"Where did you get it?"
"From my father."
"Where did he get it?"
"From his father."
"And where did he get it?"
"He fought for it."
"Well, I'll fight you for it."

StS2008 Coding Contest

I've been working on my entry to the Smalltalk Solutions 2008 Coding Contest for the past three weeks or so, and it's been a pretty good experience so far: at last, an opportunity to work on a non-trivial Smalltalk project. The decision to provide three months for the contest is a great one; it gives sufficient time to put together something worthy. I'm sure there are going to be some great entries, but I'd be more than happy even if I manage to submit only a minimal (yet fully functional) entry.

Thursday, March 20, 2008

Movie Review: American Gangster

It happened with Just Like Heaven two years ago, and it again happened with American Gangster the week before last: one can see the microphone at the top of the frame in at least a third of the scenes. In fact, it was so bad at times that it would have been an improvement if they had handed out hand mikes to Denzel Washington and Russel Crowe. I doubt that the movie editors would have overlooked such an obvious thing, so the blame most probably lies with the folks in the theater projection room.

I initially thought I'd say something about the movie's plot, the characters and so on, but two weeks after watching the movie, the fiasco with the microphones is all that I can remember. Oh, and how the protagonists try to prove who's the most testosteroney of them all.

Quote of the day

A metamodel is a model used to model modeling itself.
-- MOF 2.0 Specifications

Wednesday, February 27, 2008

Moview Review: National Treasure: Book of Secrets

Cliched scenes, too-clever-by-half dialogue, lame sidekick, over-the-prime hero, a plot that requires one to a) leave one's incredulity at home with the family dog and b) be the village idiot to find interesting -- you name it, National Treasure has it. The saving grace is the climax; not a particularly engaging one, but nonetheless a huge improvement when compared to the rest of the movie.

Some scenes that stand out for all the wrong reasons:
  • The ease with which the sidekick hacks into Buckingham Palace's network
  • Photographing the wooden piece by making use of the camera at the traffic light (and of course getting the $%@^ sidekick to hack into the police database to retrieve the photograph)
  • The absolutely irritating conversations between Ben Gates' parents

Saturday, February 23, 2008

Playing the stock market

From William Blum's Anti-Empire Report:
...there are numerous significant information gaps and misconceptions in the choir's thinking, often leaving them unable to see through the newest government lie or propaganda trick; they're unknowing or forgetful of what happened in the past that illuminates the present; knowing the facts but unable to apply them at the appropriate moment; vulnerable to being led astray by the next person who offers a specious argument that opposes what they currently believe, or think they believe. The choir needs to be frequently reminded and enlightened.
He might as well be talking about the financial press. I have been following the stock market for the last month or so (not to mention losing some money as well), and the one thing that struck me after reading the daily reports on movements of the Sensex is how the reporters unquestioningly quote the market players' take on things. You either find incredibly banal, motherhood statements like "More than 50% of India's exports are to the United States" (to account for the fall in the stock prices of companies which rely on exports for their revenue -- conveniently forgetting that the same companies' shares rose yesterday when the state of the American economy was practically the same as today), or plain deceitful stuff like the now-infamous "decoupling" theory.

Thursday, February 21, 2008

SMS Polls

Deccan Chronicle runs an SMS poll everyday, asking for readers' opinions on one of the burning issues of the day ('Do u thk v shd lynch SRK pblcly or in prvt?'). Now, what kind of folks take part in such polls? It's not like all the entries are placed in a lucky draw or something. If people still send in their votes, it's either because they are interested in shaping public opinion (i.e. vested interests), or they think voicing their opinions will lead to a more informed public discourse.

Both of these reasons don't seem plausible to me, especially in light of the poll numbers; invariably the percentages are too round for my liking, like 60% ayes and 40% nays: it's exceedingly unlikely that the total number of votes was a multiple of 100. Yeah I know, the stated percentage can be reached for any total, say, 50 (30/20), but this actually leads me to my postulate: I suspect that the totals are usually less than 100. Knowing DC, I wouldn't be surprised if they were actually in the single digits -- a DC reporter, his editor and the typesetter voting 'Aye', and said reporter's wife and dog voting 'Nay'.

A look at the results of yesterday's poll: 76% for 'Yes', 24% for 'No'. Hmmm, what's the smallest number that yields whole numbers for these percentages? 25, I think. I bet the DC folks are jumping with joy.

Wednesday, January 30, 2008

Movie Review: Halla Bol

My first impression on leaving the theater was that I liked Chak De India better, but I changed my mind on further reflection. Right from the initial scenes where the cynicism of Bollywood society is laid bare, to the gripping finale, Halla Bol grabs your attention and doesn't let go (alright, maybe it does let go a bit during the inevitable, but mercifully few songs).

This was my first Ajay Devgan movie (sue me), and I must say, he has presence; lots of it. He may not be as good looking as the Bollywood hunks who cannot act their way out of a paper bag, but makes up for it with the intensity he brings to his role.

Some of the scenes are over the top, like when Ajay Devgan's character pees on the Persian carpet at the minister's house (where did they get hold of this guy, BTW? They might as well have replaced him with a cartoon), or when Pankaj Kapoor's truck develops bullet-proofing capabilities when he makes his dramatic appearance to save Mr Devgan. There are also some made-for-cinema coincidences (including the above-mentioned appearance of Pankaj Kapoor at the right place at the right time) like the old director's granddaughter being a forensic pathologist who plays a vital role in the revival of the murder case, but these can be overlooked in light of the movie's other redeeming qualities.

The movie also ventures into controversial territory, with party cadres (Shiv Sainiks?) going on the rampage against Devgan, and leaders of the Muslim community offering support to him (BTW, his refusal to accept their help because he believed that he could get justice in a secular country seems more like a nod to political correctness than a portrayal of how things are in real life).

All in all, definitely a must-watch movie.

(In other news, hell froze over at 19:21 IST today. The met department attributed this event to an oath a certain individual took re: Bollywood movies about a decade or so ago).

Wednesday, January 23, 2008

Joel, Meet CMM

From Joel on Software:
To reach this sweet spot, we borrowed an idea from Sakichi Toyoda, the founder of Toyota. He calls it Five Whys. When something goes wrong, you ask why, again and again, until you ferret out the root cause. Then you fix the root cause, not the symptoms.
Fishbone analysis by any other name smells just as CMMy. To be fair, blogging about all the outages and what you're doing about them is a novel, Web 2.0 wrinkle.

Maybe it's just the cynic in me, but doesn't it sound like a way to save money instead of blindly giving a rebate to all customers who suffer a downtime?
We let the customer decide how much they want to be credited, up to a whole month, because not every customer is even going to notice the outage, let alone suffer from it.
And Joel, you might do well to keep an eye on Michael; his email seems like he's doing quite a nice job of managing his boss, if you know what I mean.

Sunday, January 20, 2008

Simplicity

Yesterday I was at the Trivandrum airport, waiting to catch a flight back home, when a friend pointed out that the Chief Minister of Kerala was about to board a plane. I looked around, and sure enough, there was a doti-clad person, walking purposefully towards the boarding gate. What caught my attention was that there was just a single policeman accompanying the Chief Minister; no retinue of self-important sycophants jostling around. I know nothing about Kerala politics -- levels of corruption, development, and so on -- but this was a refreshing change from the personality culture that is prevalent in the rest of the country.

Ironically, I witnessed something completely at variance with the above scene, just two days ago at the same airport: a huge retinue of supporters expressing their adulation (via man-high garlands and slogans shouted at the top of their voices) for a bishop of all people.

Monday, January 14, 2008

The Jallikattu Controversy

Public opinion seems to be in favour of the ban on Jallikattu, as evidenced by the letters to the editor in The Hindu. There are a few voices opposing the ban too. Here's one:
Animals suffer at the hands of human beings in many ways. They are overloaded and tortured in agricultural fields, used in transportation in inhospitable terrain and circumstances, and held captive in zoos and homes. They are sacrificed in religious functions. Considering all these, the so-called ill-treatment of bulls, which are nurtured throughout the year, one day is nothing.
Consider this analogy: Two people are beating up a person, one with a heavy club, the other with a much smaller stick (but big enough to cause pain to the victim). Per the above logic, we might as well allow the second guy to continue his actions. Here's another one:
The apex court verdict does not take into consideration the views of the stakeholders, in this case the villagers, bull-owners and tamers
Conveniently leaving out the uber-stakeholder, who's getting chilli powder thrown into his eyes and being set upon by ten or twenty 'tamers'.

Saturday, January 12, 2008

It's different this time

From The Economist:
The authors show that, although details may vary, banking crises follow the same broad script. Each blow-up is preceded by rising home and equity prices; an acceleration in capital inflows driven by optimistic foreign investors; a rapid build-up of debt; and--immediately before the storm hits--an inverted V-shaped path for the economy, with growth first picking up and then faltering.
The quote refers to the American economy, but it could as well be referring to India.

I have been subscribing to the Economic Times for a month or so, with a view to making some money in the stock market (changed priorities and all that). It's been a pretty mixed experience; not investment-wise -- I am yet to dip a toe into the waters -- but in terms of gaining insight and understanding. Will probably post something on this later.

Sunday, December 16, 2007

Alright, Stop it Already

I have written previously about jokes in Reader's Digest that are predicated on taking a well known idiom or expression and rewording it in order to produce a punch line. Here are two more examples of this despicable technique from recent issues:
A rope walks into a pub. The barman says, "You were in here causing trouble. Go on, get out."

The rope shuffles outside and winds his top half round his bottom half, vigorously rub his head against a lamppost then goes back into the pub. "Oi!" shouts the barman. "Didn't I just throw you out?"

"Nah, mate," says the rope. "I'm a frayed knot."
I'm afraid not. Get it? Ha ha. The next one:
One man hated that his wife was always nursing sick birds. At home he found a crow with a splint on his beak sitting in his favourite chair. On the dining table a feverish eagle was pecking at an Aspirin, while in the kitchen his wife was comforting a shivering little wren that she found in the snow.

"I can't take it any more!" he said. "We've got to get rid of all these darn..."

His wife cut him off in mid-curse. "Please, dear," she said. "Not in front of the chilled wren."
Oh, I get it. Not in front of the children. Bwahaha, stop it, you're killing me.

Movie Review: I am Legend

[Warning: spoilers]

Let's start with the name of the movie: I am Legend? What kind of a crappy title is that? Talk about egomania.

The movie piques your interest initially, what with the scenes of overgrown New York streets with not a human being in sight, deer and lions having a free run, and all that, but this wears off quickly, once you are filled in on how this miserable state of affairs came about. The rest of the movie is very depressing, with no turning-of-the-tide moment, with the protagonist going through one misfortune after another [the family pet gets killed, for God's sake (a totally unnecessary Old Yeller moment thrown in for good measure, too) -- how much more dystopian can you get?].

There are so many holes in the story:
  1. How does Dr Neville get to set up a well-barricaded house, with a state-of-the-art lab in the basement, in the face of all the turmoil and confusion (we are told) that accompanies the virus outbreak?

  2. What's up with all the folks who get turned into 'mannequins'? Why have their bodies not decomposed/turned to dust/whatever? (Update: Well, it turns out they are mannequins, probably set up by Dr Neville to tide over his feelings of loneliness.)

  3. Couldn't the doctor have hooked up earlier with any other persons who are immune to the virus?

  4. Where does the electricity come from? I'd have asked the same question about the fuel, but they show Dr Neville pumping it from a gas station, so I'll let it go and assume that he has not run out of gas for three years because he is getting his supply from various gas stations all over the city.

  5. Why doesn't he escape with the woman and the kid at the climax? Why the need for sacrifice and martyrdom?

  6. Why does he leave the dog to roam around freely when there is a real danger of the dog running into the den of darkness seekers (or whatever the heck they are called)?

  7. We are told that the bad guys have de-evolved completely, i.e., they have lost all their human qualities and have become like animals, but they still retain the intelligence to device a clever trap to try and capture the good doctor.
Minus two stars out of five.

Aamir Khan on Black

Well, if I'd sat through the entire movie and had done a full review of Black, it would definitely be in alignment with Aamir Khan's take (sorry, the quote is from DC, so no link):
The sensibility wasn't right for me, I couldn't make out if they were living in a museum or a library or a church. The performances were over the top.
No doubt referring to Big B's fricken British accent.
Most importantly, it was about a child who had these problems, an alcoholic person comes and says you have to leave her alone with me for forty days, and he slaps her around. I don't know of any parent who would agree to that.
Ouch. And I wasn't even thinking of the pedophile angle.

Wednesday, December 12, 2007

Dish TV Sucks: Part 9564

  1. You log in to the web site and are asked to change your password. You change your password, but when you try to log in using the new password, you get an error saying that your password contains invalid characters. You disable this validation by turning off JavaScript temporarily, and voila, you're able to log in. Sigh.

  2. You enter your credit card details and click on Submit. Payment gateway error. Against your better judgement you repeat this three more times, and hit the same error each time. A part of you is worried that you've actually paid them four times, but a phone call to Citibank reveals that no transaction has gone through. Whew. Come to think of it, I think I should consider moving this to the (non-existent) "Why Dish TV is Great" list.

  3. You try the credit card payment the next day, and it goes through. Only problem is, the default option in the renewal screen is for the basic package; therefore you do not get the full complement of channels. And it takes you one hour of arguing with the call center person -- after waiting patiently for 24 hours for the activation to kick in -- to figure this out.

  4. You ask to be put through to the supervisor so that you can complain about the poor service, and are asked to give your phone number; the supervisor will call you back. You do so, not really expecting a call back. Your expectations are met fully and completely.

  5. The IVR system is faulty; it works with certain mobile phones and not with others.

  6. Staying on the subject of the IVR, you select the option for English, and are connected to a representative who impresses you with his chaste Hindi.
Alright, maybe there is one item that can go on the "Why Dish TV is Great" list: for all their other shortcomings, the set top box's interface is miles ahead of Tata Sky in the usability department. Ironical, when you consider how badly their web site's usability sucks.

Tuesday, December 04, 2007

Blackwill Booga Booga

From The Hindu:
Indian cities could be targeted by extremists who could lay their hands on nuclear weapons once Iran develops them, the former U.S. Ambassador to India, Robert Blackwill, said here on Monday.

“If Iran acquires nuclear weapons, some Arab countries may follow suit and who knows what western city or Indian cities such as Delhi or Mumbai could be a target,” he said at a session at the India Economic Summit
.

Thursday, November 29, 2007

ClearTrip.com

My first impression of cleartrip.com was a negative one -- their TV ad where a person sees a good looking woman in a bar and removes his ring so that he can pretend to be single (what's up with these brain-dead advertising folks? [*]) -- but a visit to their web site left a positive impression on me. Clear design, works fine in Firefox, an excellent summary page where you can mix and match flight options... what more could one ask for? Not to mention the fact that you can use said excellent summary page and identify the flights you want to take, and then mosey over to the airlines' own web sites and book your ticket, saving yourself at least a couple of hundred bucks <evil grin>.

[*] Before a certain commenter (I know who you are, BTW) jumps on me and calls me dumb, let me make myself clear: it's the inappropriateness of the wedding-ring-as-marital-status indicator in the Indian context that I'm ranting against.

Tuesday, November 20, 2007

And the winner is...

Open source software.

For some reason, I couldn't open my Gnucash data file after installing Kubuntu. A post to the gnucash-user mailing list produced suggestions from some helpful folks, but they didn't fix the problem.

An hour or so of digging into the sources (made possible in no small measure by the log messages in /tmp/gnucash.trace) and tweaking the XML validation code, and three years of data accessible once again. Phew.

I still don't know what the long term effects of the tweaking will be, but for the moment I'm happy that I am able to make changes to the file and save them successfully.

I also have to figure out for how long am I going to be running my own fork of Gnucash. I guess the best option would be to use the 'forked' Gnucash to open my current data file as an archive file, but use the plain vanilla Gnucash and create a new file for everyday use.

Wednesday, November 14, 2007

Resident Non Pakistanis

Well, it's now the turn of the Pakistanis: there was this picture of a bunch of them crossing the Wagah border to attend the India-Pakistan ODI at Mohali, at a time when their country is in complete turmoil. It beats me how can these people sit in a stadium and cheer their team when their fellow countrymen are spilling blood on the streets, opposing the military crackdown.

Wednesday, November 07, 2007

Resident Non Indians

I've always wondered what to call folks in India who are Indians only by name and nothing else; the kind of people who go to wine and cheese parties, greet one another with pecks on the cheek instead of the traditional namaste, celebrate Halloween in Chennai (gag) and so on. A lot of colourful expletives come to mind, of course, but I'll settle for RNI: Resident Non Indians.

I came across this moniker a couple of days ago in Deccan Chronicle. Though I know it's practically impossible to search for any article older than 24 hours in the DC web site, I googled for the phrase all the same and found that it has been in existence for quite some time -- the hijacking of the original phrase (NRI) seems obvious in hindsight -- but has not exactly been used in the context I'm referring to.

Staying on the subject of Deccan Chronicle, some obligatory DC-bashing: their daily supplement contains a section called 'Party Whirl', where a stringer with a cheap digital camera goes (probably uninvited) to various parties in town and clicks pictures of guests for tomorrow's edition. The 'journalist' doesn't even bother to take down the names of some of the party goers; instead you find pictures with captions like 'This lady was seen enjoying herself' or some such tripe. Somebody just shoot me.

Friday, November 02, 2007

Sheesh

I left the sound on during the commercial break for a change, and regretted it immediately: a car carrying a bunch of beach bunnies stops near a surfer dude; the girls break into song -- I don't remember the lyrics, but the gist is that they are feeling naughty, and would the surfer dude like to rub some sun tan lotion on them?

How many times must it be drummed into the heads of the bozos who come up with such crap? Indians are not looking to acquire a sun tan. We want to look Fair and Lovely (tm) or Fair and Handsome (tm), depending on whether we are beach bunnies or surfer dudes.

Monday, October 29, 2007

What's your point?

There's an article about terrorism (nope, don't bother with the link) in today's DC by Kuldip Nayar. Nothing wrong with this, except that a) the article adds nothing to the discourse b) it doesn't add any new bits of information c) it does not provide any insightful commentary. Then what *does* it do? Here are some samples:
Every Indian must ask himself why terrorism is rearing its head in the country.
OK Chief, why is terrorism rearing its head in the country?
The terrorists who attacked the dargah are hardly concerned with Jayaprakash’s message of non violence.
No sh*t, Sherlock.
It has a bit to do with poverty or lack of education, but more with fundamentalism.
You think?
What happened in Ajmer or Ludhiana may have been a violent protest against pending cases of injustice.
Sigh.
New Delhi’s problem is that it has no well-thought-out, long-term strategy to tackle terrorism. There are ad hoc efforts, with little coordination between the Centre and the states. The United States, a larger country than ours, has not experienced any act of terrorism after 9/11. The reason is that the intelligence agencies there work hard, not like those in India which do not follow up even prior warnings. India is a soft state which requires to change its attitude, but it does not need another special police force or a harsher law.
In other news, the Sun rose in the east today.

Not a bad idea when you think about it

Here's a way to make the "more educated and initiated class in India" participate in the electoral process in greater numbers: make voting via SMS possible.

The idea is from Arindam Chaudhuri's "column" from one of the full page ads for IIPM that assault our senses periodically (the saving grace is that they seem to have changed the "Dare to think beyond the IIMs" to simply "Dare to think beyond").

Wednesday, October 24, 2007

Gutsy Gibbon

Ubuntu has taken all the fun out of installing a new version of a distro. Whatever happened to the thrill of discovering via Slashdot or Reddit that a new version is out, patiently downloading the ISO, looking at the current installations and deciding which distro/partition to jettison for the new version, going through the actual installation, finding that the new version has nuked your wireless networking (just kidding)...

Gutsy Gibbon is out, and the only indication I had of its availability was a message in Update Manager to the effect that a new version (7.10) was available for upgrade. Well, the blame is actually mine, as I've not been to Slashdot and Reddit for something like two months.

Anyway, 946 MB worth of downloads later, my desktop is more or less the same (heck, it's practically the same) as it was before the upgrade. I know that there are new features -- the login screen that appears on waking the laptop after hibernation displays an additional button called 'Leave Message', for one thing -- but they aren't readily apparent.

I ended up changing my windows theme to Slate Horn Blue just to remind myself that I have upgraded to 7.10.

OMG I got an email from Kareena Kapoor

Here's an email I received yesterday (some content edited to prevent the accrual of thoroughly undeserved publicity to the folks involved):
Hi Rajesh,

Right from the time I was a little girl, I looked forward to the festive season.

Friends, family, parties, the festive aura and looking your best – that’s what makes it so special. Things are no different today. And to make sure I am fashionably festive this season, I have the young and talented designers at <deleted>.

I have personally experienced the latest fashion collection which revels in a riot of colors from the bold to the earthy and a variety of silhouettes and cuts. See how I look and download some vibrant wallpapers and screensavers by clicking on the links below.

Dip into this ocean of innovative and colourful fabrics and prints, which will be difficult to find anywhere else. Most of these are already my favourite possessions: Shirt-dresses, Printed dresses, Kalamkari Ghagra Skirts and Cool Embroidered Tunics. I am enjoying every bit of it and hope you have your share of fun too. I am sure you don’t want any misses in your wardrobe.

You can share the hottest fashion trends and your personal experience at <deleted>,at kareenakapoor@<deleted>

Let <deleted> and me help you get fashionably festive this season.

Wishing you and your Family a Very Joyous Season!

Kareena Kapoor
The sad part is that there are enough clueless people who will actually think that they got a personal email from Kareena Kapoor.