Wednesday, December 28, 2011

a piece of py: renaming files

I hate spaces in the names of files. It's a quirk of my personality. I prefer CamelCase as an alternative. I used to like a mix of lower case letters, hyphens and underscores, but that was before my world of Unix and Python was dominated by Java.

However, I am a member of the minority and so I often end up with folders and files whose names aspire to be sentences (or at least parts of speech like nouns, prepositions, pronouns and the occasional verb [To be DELETED: ugh!). Today was one of those days. I had a folder full of PDFs, each with a name of the form Last, First.pdf. I would have preferred a name like FirstLast.pdf. The easiest way to do this was with some shell-fu or Python-fu (with due apologies to the GIMP). I tossed a coin and chose Python. I fired up PythonWin and started working on fragments that would eventually unite into a single one-liner to rename them all (sorry JRR). I wasn't smart enough to reduce it all to one line (I needed the imports and I was not a lambda knight).

import fnmatch, os
# basedir is a string representing the full path to the folder
# containing the poor PDFs
for pdf in fnmatch.filter(os.listdir(basedir), '*.pdf'):
  new_name = ".".join(["".join(reversed(pdf.split('.')[0].split(', '))), 
                      pdf.split('.')[1]])
  os.rename(os.path.join(basedir, pdf), os.path.join(basedir, new_name))

Of cours,e I could have skipped using new_name completely:

import fnmatch, os
# basedir is a string representing the full path to the folder
# containing the poor PDFs
for pdf in fnmatch.filter(os.listdir(basedir), '*.pdf'):
  os.rename(os.path.join(basedir, pdf), 
         os.path.join(basedir, 
                 ".".join(["".join(reversed(pdf.split('.')[0].split(', '))), 
                 pdf.split('.')[1]])))

I think this might be the first time I used reversed(), but since it was a relatively recent addition (2.4 to be precise), I didn't feel too bad. Had I written this code before 2.4 had been released, I would have been forced to use reverse(): this also reversed the list, but did it in place and did not return the list; I would be forced to reverse the list first and then send it onto the join conveyor belt.

I also like how just adding brackets as bookends to items separated by commas, I get a list:

["".join(reversed(pdf.split('.')[0].split(', '))), pdf.split('.')[1]]

Mission accomplished. With some learning to boot. Not bad for a few minutes of work.

Monday, December 26, 2011

pentahexed: the tale of a misleading manifest

If you have worked with Oracle's JDBC drivers before, you are no doubt familiar with ojdbc5.jar and ojdbc6.jar.

Oracle tells you that ojdbc5.jar contains Classes for use with JDK 1.5. It contains the JDBC driver classes, except classes for NLS support in Oracle Object and Collection types and that ojdbc6.jar contains Classes for use with JDK 1.6. It contains the JDBC driver classes except classes for NLS support in Oracle Object and Collection types.

Take a class oracle/core/lmx/CoreException.class from each JAR, send it to file and you are not surprised with what you see:

(for oracle/core/lmx/CoreException.class from ojdbc5.jar): compiled Java class data, version 49.0 (Java 1.5)
(for oracle/core/lmx/CoreException.class from ojdbc6.jar): compiled Java class data, version 50.0 (Java 1.6)

Open the manifest of each JAR, however, and you see something interesting. The value of Created-By is the same in both JARs: 1.5.0_30-b03 (Sun Microsystems Inc.). How can a JDK 1.5 compiler know about JDK 1.6? Surely, this has to be something lurking in the scripts that needs to be fixed. It also wouldn't hurt to use a newer version of Ant (the value of Ant-Version) is Apache Ant 1.6.5 (the latest version is 1.8.2).

Saturday, November 26, 2011

dhanush unleashes linguish

The viral attack of why this kolaveri has found a very unlikely (and rather unfortunate) victim: The Language Log. Why? Surely not because the Tabloid of India had something to say about it. Was it because the WSJ had a piece on it? Sigh.

Friday, November 25, 2011

revisiting wallace

After I had tried to catch up with the works of Sidney Sheldon and Robin Cook, it was inevitable for my attention to turn to Irving Wallace, another name familiar to fans of Sheldon, Cook, Ludlum, Cussler and Clancy. Wallace, if you didn't know it already, was responsible for encouraging Sidney Sheldon to publish his first novel The Naked Face. This might explain why s*x features a lot in the works of both writers. Research was more important to Irving Wallace than to Sheldon and he made sure his books were full of its fruits (consider books like The Seven Minutes and The Word); the experience for me as a reader was hardly as unpleasant as it was when I was unfortunate enough to read the works of Dan Brown, another purveyor of research.

But I digress. I just finished reading an old hardbound copy of The R Document that I had picked up at a book sale organised by the public library. I was surprised at how fast I had finished it, but I was also relieved that it was not as painful as The Pigeon Project. The latter also tried to be a travelogue of Venice while we follow Tim Jordan in his attempt to save the formula for yet another elixir for youth. The biggest problem with the novel is that it isn't hard to predict the end and once you have done that all the suspenseful goings-on are just not suspenseful anymore.

The R Document, on the other hand, is a conventional thriller with the appropriate twist and surprise tossed in ever so often to season the proceedings. The novel follows Christopher Collins, the Attorney General of the United States, as he races against time to find out more about a mysterious "R Document" that seems to be a rather nasty side of the 35th amendment (which is a new amendment to the Constitution that allows the powers-that-be to suspend the Bill of Rights during times of national emergency). Once again, you can predict how this is all going to end. But this time, Wallace does not try to do more than deliver a standard thriller while showing off his research on politics and the constitution of the United States. There is no travelogue. There is no sequitur into unrelated sub-plots. This is the stuff of efficient black and white low-budget thrillers (and in the hands of a competent journeyman that black and white thriller would have been a far better piece of art than this piece of pulp). Since this is fiction for the masses, it would be unfair to expect complex characters or a genuine sense of intrigue and dread. This novel was written 45 years ago, but could easily have been written today about the Patriot Act of 2001. That topical stroke of luck makes The R Document more memorable (is that too strong a word?) than The Pigeon Project.

commerce versus process

I asked Google about "my passport" and the first link in the results is Application Status, which is a page hosted by the Bureau of Consular Affairs telling visitors how they could check the status of their application for an American passport. Results about Western Digital's products appear only later.

Saturday, November 05, 2011

dirty ditties

Bappi Lahiri famously insisted that A. R. Rahman had lifted the ho in Slumdog Millionaire's Oscar-winning jay ho from his hit rambhaa ho from Armaan. In Anuvab Pal's book Disco Dancer (dedicated to the cult classic starring Mithun Chakraborty), he is even quoted as proudly claiming to have brought the ho to Bollywood. Would he then concede that Vishal-Shekhar's ooh la la from The Dirty Picture owed a debt to a certain song composed by A. R. Rahman for Rajeev Menon's Minsara Kanavu?

Regardless of such trivial quibbles, Bappi seems like the perfect person to warble this lusty duet with Shreya Ghoshal (who would have thought she'd pick a song like this instead of a strain of romantic yearning?). The song starts off feeling like an uncensored alter ego of R. D. Burman's chunarii sambhaal gorii before shifting into a nostalgic paean to the disco-laced 80s dominated by Bappi-da. Bappi gets to pay tribute to himself in (as far as I can remember) his second song for Vishal-Shekhar. He couldn't have asked for more.

it was a pleasure to be amma

I was pleasantly surprised and very impressed when I visited the Anna Centenary Library. I love the public library system in the US and always wished that something similar had existed in India (the British Library in Pune was the closest, but it offered only paid subscriptions and a catalogue mostly limited to the United Kingdom). For the first time, I saw hope as I explored the floors of the library.

And then Amma's crusade against all the edifices erected by her predecessor headed to Kotturpuram. The library was Amma's next salvo against Anna. Once again she wanted a hospital in its place. So far, such a hospital has not been set up in India. By establishing a super speciality hospital dedicated to interests of children, it is certain that Tamil Nadu would [sic] emerge as the top ranking State in protecting the interests of children, she was quoted as saying.

And what happens to the contents of the library? Amma plans to move them to the proposed Integrated Knowledge Park on the DPI (Directorate of Public Instruction) campus in Nungambakkam citing some reasons for this being a very ideal place. Nobody said anything about whether her government plans to be fair with space. I find it hard to believe that they're going to match square foot for square foot and floor for floor. Books in a bookshelf are likely to end up packed in boxes.

But I exaggerate. I shouldn't be cavilling about this. After all, a hospital is a noble thing to have (I trust that the hospital will be generous to all children in need of medical assistance). But so is a library. Surely there are condemned structures around town that can be torn down and replaced with her hospital. Surely there are other locations in the metropolis that deserve a facelift for the better.

But Amma must have this building.

Not because its location works better for a hospital than for a library.

Not because its interior design and layout are more conducive for hospital beds, labs and offices than for bookshelves, reading desks and couches.

But because Anna made it.

How people can elect such bickering people into office is beyond me.

Mercifully, the Madras High Court has restrained the State government from moving the library. Perhaps good sense will prevail and I'll still expect to see books on shelves and see people sitting at the desks reading and studying instead of dealing with the smell of disinfectant.

(the title of this post paraphrases the opening line of Ray Bradbury's most famous book, which seems quite appropriate for the occasion)

Wednesday, October 26, 2011

eternal riders of pune

After a fresh experience of the roads in Pune lasting several days, I am ready to conclude that the average Puneite on the road (on foot, gripping the handle of a motorised two-wheeler or a bicycle, helming an autorickshaw, car, van, bus or truck) has three significant qualities: he or she is discourteous, he or she is selfish and he or she is suicidal. Despite this lethal combination of qualities, he or she seems eternal. untouchable by death. amar. imagine that. The font of eternal life must exist in the murky miasma of the traffic jams in Pune: how else does one explain the lack of significant fatalities on the roads when everyone (regardless of their size or the size of their mode of conveyance) is trying to squeeze into every available space of every size at any imaginable speed? That woman sliding between a bus and a jeep passed through without a scratch; that scooterist swung cleanly a breath away from the noggin of a large van; those two cars crissed and crossed by a motorcyclist without affecting his path or angle at all. Unbelievable.

Friday, October 21, 2011

you pay for the space: the annoying things are free

Cellphone screens in the dark. Think of fireflies with Asha Parekh-ian (or Nanda-esque) derrieres. They are annoying. Distracting. Especially when you are trying to watch the movie.

Cellphone ringtones. They are annoying. Distracting. Especially when you are trying to listen to the dialogue uttered by the characters in the movie that you have been trying to watch.

Inconsiderate. The people who paid for the seats they are sitting in and insist on continuing to use their cellphones to send text messages, receive and check text messages, make calls and receive calls without being courteous enough to switch their phones to silent mode. The cinema hall is just another place to hang out and presumably what transpires on the screen is akin to the unfortunate band that plays music while you dine in some faux star restaurant.

Except that the film and the band are not the same thing.

Could you please take your call outside?, I lean over and say to the girl sitting next to us, who, after a conversation louder than the booming sound of the film playing in the hall, has decided to talk on the phone,

It's an important call, she replies, failing to see why I should have a problem with this. I continue to be polite and inform her that the volume of her conversation is louder than the volume of the film (which is why I have a problem -- because I paid to listen to the film and not to her). Her reply is priceless: You could have said it in a more polite way (or words to that effect).

Is it time to take a leaf from Falling Down and go watch movies with a baseball bat in tow? Is that the only way to get such inconsiderate, discourteous (and seemingly clueless) people to behave? Why doesn't the management of the theatre/multiplex request people to be courteous? Why aren't there any ads like the Don't spoil the movie by adding your own soundtrack ad that plays at the AMC theatres? Why doesn't someone take a hint from the Alamo Drafthouse? (the uncensored PSA is here)

Monday, October 17, 2011

entomical cojones

Look carefully at the glass wall for the customs office (or some office dedicated to a similar function) at the airport in Pune as you walk from the check-in counters to the place where the security check is conducted and you will be informed (among other things) not to take khus khus and (I kid you not) beetle nuts into Dubai (or the Gulf, unless I am mistaken). Surely they meant betel, unless those parts of the world regard the family jewels of the members of the Coleopteran order as either a culinary delicacy or something as precious as a rhino's horn.

Thursday, October 06, 2011

jobs all over

Last night, when I read that Steve Jobs had passed away, I switched to the Hacker News tab and refreshed it to read what the world had to say. I saw something I had never seen before: every single one of the 30 items on the first page was about Steve Jobs. It was worth a "screencap": steve jobs on hacker news

My favourite tribute so far (aside from the austere bold link on google's main page) was the image here.

Tuesday, October 04, 2011

super seven: the fox is on fire

All hail Nicholas Nethercote!

When Mozilla launched Memshrink to finally do something about all the memory that Firefox never seemed to let go until it had to shrug, I discovered Nicholas Nethercote's blog. Since then I have been reading every new post on his blog, enjoying his writing style and also learning a lot about performance tuning and about the innards of Firefox (I didn't know just how much sqlite was used in all those add-ons). I also waited eagerly for Firefox 7 so that I could see the results of all these fixes and last week I didn't hesitate a moment when I saw the pop-up in the system tray telling me that Firefox 7 was available. Mercifully, the only hacks I needed to get two add-ons working were familiar ones that I had effected when Firefox 5.0 was rolled out.

A few minutes later, after Firefox was back up and running, I could see the difference. I spent some time playing with about:memory?verbose, because the output now contained information about the various compartments that were using memory. Firefox was not lurching to chomp away memory. Instead, it seemed more well-behaved and offered strong testimony to everybody who had worked hard to plug all those leaks and free all that heap.

The only cloud in this silver sky was a news article screaming that Chrome was poised to take over from Firefox as the second most popular browser. Perhaps all these fixes have come too late. Perhaps the article didn't analyse the data correctly and fairly. I don't care much right now as long as Firefox 8 promises to shed even more lard.

Saturday, September 24, 2011

non-vegetarian vegetable

The local Indian store has a modest section offering vegetables each labelled in English with often liberal spelling. Redish was just something to warm you up and prepare you for Bison Bites aka Snack Gaur. Rest assured, O shocked vegetarians. This was not the bison served up to complement a sip of cold carbonated cola; this was just a typo too much for trichosanthes cucumerina, also known as your friendly neighbourhood snake gourd. You may now breathe again.

Sunday, September 11, 2011

old-time poetry

I found some amateur verse from the old electronic archives today. I seem to have written it in October 2002, when I used MARTA more often than I do now; here goes nothing:
walking steadily to keep time
with a bus approaching
it's a race to survive
the fumes and fury
of rush hour

why do they desert me
when I'm in a hurry
i see too many of them
when I'm not

PS:: The title is a play on the name of a rather interesting store that I discovered some months ago (the only branch in Georgia, as it turns out)

operation yellow boots

Anurag Kashyap does it again and this time around he's not the producer, but the director and one of the writers of the film. Having already been witness to one of the most unlikely places to hear a quote from Jim Morrison, we are not as surprised when, after she asks Chittiappa Gowda the gangster when she should come (to pay off the gangster in happy endings), the gangster, already oozing comic menace, goes if you come today, it's too early; if you come tomorrow, it's too late; you pick the time; tick tick tick tick tick tick; tick tick tick tick tick tick. This not only fits his character because he is a Kannadiga ganster, after all but ensures that those who have never been lucky to have heard (and seen) the cult favourite from Operation Diamond Racket get a chance to right the wrong. Priceless!

PS: Earlier in the scene, when we first see Chittiappa, he's watching the video of a film song (that sounded like a Kannada version of Ilayaraja's raajaa raajaathi from Agni Natchathiram) on the tube. Does anyone know which movie that was?

Thursday, September 01, 2011

deeply ambiguous

The poster for Deep Blue Sea features two living creatures -- a shark and a lady in distress. Does the tagline "Bigger. Smarter. Faster. Meaner" refer to the shark, the shark's gaping maw or the threatened rack?

Friday, August 26, 2011

bearable exposition

I get the feeling that all writers churning out candidates for the mainstream bestseller lists have to deal with exposition a lot more often than writers of works that are less mainstream. Some of these writers turn this devil around and decide to take the opportunity to show off all the research they have done (Crichton did this well; Dan Brown does not).

Intermission: Can you imagine Anthony Burgess writing A Clockwork Orange in the style of Dan Brown? The book would have been thicker and loaded with interleaved explanations of nadsat and descriptions of the prison, its architecture, its history and who knows what else. A title like Fruits and Mechanics would have topped this cake of futility.

I'm on a Michael Connelly buffet right now and the 8 books I have read have introduced me to exposition of various flavours and of varying levels of subtlety (or the complete lack of it, in some cases), but his exposition never strays beyond the realm of the police procedural and the court room. This, I think, is a good thing. It would have been unbearable to wade through a mini-treatise on the architecture of the courthouse just as we were about to begin an interesting trail.

Some of the books are written in the first person. This allows the writer to be more liberal in the exposition, because, after all, this is supposed to be a man or woman telling you a story. The more details you get, the better. A lot of exposition that might otherwise stick out like a sore elephant in a regular third-person narrative goes down easier when Jack McAvoy or Mickey Haller is writing to you, dear reader.

I tend to prefer little to no exposition (which is why I admire the bold stroke of the glossary in Vikram Chandra's Sacred Games: you read the tale with its natural rhythms and later use the glossary to understand the vernacular), but I can understand the need for it in mainstream fiction. Besides, fitting it into the narrative without losing the reader is not trivial. Given this, I liked the few examples from the 8 books I had read so far, where the exposition was adroitly placed just like a shot/reverse shot scene where the cutting didn't bother you. Here's an example from The Brass Verdict (I have taken the liberty of marking the relevant sections):

"Two arrests. ADW in 'ninety-seven and conspiracy to commit fraud in 'ninety-nine. No convictions but that is all I know for right now. When the court opens I can get more if you want."
I wanted to know more, especially about how arrests for fraud and assault with a deadly weapon could result in no convictions, but if Cisco pulled records on the case, then he'd have to show ID and that would leave a trail.

Tuesday, August 23, 2011

may which force be with you?

Both Rediff and Hindustan Times have something to say about Force, the remake of Kaakha Kaakha. Unfortunately, both disagree on what seems to make this production special enough to merit a news item.

Rediff says: What will make this film stand apart from his other films is that Amin claims he has not used cables in Force at all, a vital element in action sequences.

HT says: Film's action director Allan Amin told the tabloid: "John is a physical guy so the action was all high octane. We did use cables for certain sequences[...]

It gets even better when both disagree on the weight of this motorcycle that John Abraham chose to lift himself without wires instead of eliciting the services of a stunt double. Rediff insists that the weight of the bike was 200 kilograms, while HT is confident that it was only 150 kilograms (it's still heavy enough to merit a "wow," but "really heavy bike" does not sound attractive enough in a news article). Perhaps a special feature on the DVD of the film will include a section dedicated to trivia to console us all.

Spoonerism alert: The Rediff article begins with a reference to a film called Rang De Sabanti (you know they are actually talking about this).

Saturday, August 20, 2011

did NDTV use a machine to transcribe an interview?

A couple of months ago, NDTV published an exclusive (they said it) interview with A. R. Rahman conducted by Prannoy Roy. The interview is mostly a piece of fluff with each subsequent question often having nothing to do with the previous one. There are a couple of nuggets of trivia, but they hardly make this piece worthwhile. The most irksome thing, however, is evidence that the transcriber was clueless, the editor was asleep or that the transcriber was a machine and that there was no editor. How else does one explain Y R Muttu instead of Vairamuthu and Jammu Sukand instead of Jhamu Sughand? Who can tell? Who knows? Who cares?

Monday, August 15, 2011

send the BSIFA back in time

Although Edward X Delaney was perhaps his most famous creation, Lawrence Sanders also created another interesting detective called Timothy Cone, an ex-Marine working as an investigator for Haldering and Company, a Wall Street firm specialising in corporate intelligence (in plain English: he investigates deals and mergers that reek of foul play). He is, needless to say, brilliant; he is also rather eccentric (otherwise he probably wouldn't be an interesting character). The tales of Cone are short, all written in the simple present tense (for creative reasons unknown) and collected in two volumes, The Timothy Files and Timothy's Game. Their lasting value, however, lies not in the plots and the twists (a lot of which are just surprises -- only Cone really can really put the pieces together), but in the scenes of intimacy between him and his boss Samantha Whatley (yes, they are having an affair unbeknownst -- they hope -- to the other people in the office). I was not surprised that Sanders valued such scenes, since he had devoted entire novels to desire, lust and coupling (you can't go wrong with titles like The Seduction of Peter S and The Passion of Molly T). What I was not prepared for was that his descriptions of the moments between Cone and Whatley seem to almost parody themselves with poetic flourishes, pithy phrases and often laughably inane choices of words. Allow me to present a sample from the works collected in The Timothy Files:

but they cannot deny their bodies' appetites, and when their hormones take over, they go berserk.

they're two stick figures, all bony knobs and hard muscle. their mating is a furious battle, not against each other so much as the emptiness and lunacy of their lives. when they strain, it is not to punish but to break out into another world. oh, look at the meadows and the daffodils! the lawn they seek is bliss.

it's such a sweaty wrestle, not quite hysterical but frantic enough. and
when they're done, staring at each other with dulled eyes, reality comes
seeping back, the real world takes over again. but something remains ...

they're like two rough hawsers, braided, rasping against each other and welcoming the scratch. in no way are they gentle or tender, because they are both hard, hurt people, wanting to get out. and this is the only way they know.

so there are no proclamations of love or undying passion. instead there is is a gritty intenseness, both of them serious and hoping. their coupling is a partnership of two bankrupts, as if all their liabilities combined might show up in black ink and make them wealthy.

they really do get out with each other, as attuned as a duo of violinists, howing and scraping in unison and losing themselves in mutual harmonies. carried away and lost with closed eyes and seraphic smiles, loving life and its surprises.

finally, ignited again, they come together in a different mood: all murmurings and soft twistings. they couple in a drugged tempo, slow and lazy, as if this night might last forever.
later, drowsy and satiated, they lie entwined, peering at each other with dazed eyes. they say nothing of what has happened, not wanting the moment to slip away -- as it inevitably does.

BSIFA was a reference to this

Friday, August 05, 2011

a reference in time

I often start reading books by authors after watching films based on them. Sometimes it takes just one film. This was the case with Tell No One that got me started on Harlan Coben or the case with The First Deadly Sin, which sent me off on a Lawrence Sanders trip.

With Michael Connelly it took two films years apart. I caught Blood Work, simply because it was a Clint Eastwood film. Years later (a few weeks ago, to be precise), The Lincoln Lawyer provided an example of competent handling of familiar tropes (see also: Vacancy). A visit to the library yielded my first Michael Connelly book, Angels Flight. The absence of an almost certain apostrophe in the title may be a coincidental nod to a similar flourish in Finnegans Wake. Although this was part of a series of books featuring Hieronymus "Harry" Bosch (no relation to but named for the Dutch painter with the same name), it worked well as a work in itself. The end of page 76 of the hardbound edition yielded an interesting surprise:

Next to the stairs a lighted bus stop had been cut into the steep hill. There was a fibreglass sunshade over a double-length bench. The side partitions were used to advertise films. On the one Bosch could see there was an ad for an Eastwood picture called Blood Work. The movie was based on a true story about a former FBI agent Bosch was acquainted with.

Things get clearer on page 78:

The bus stop hadn't been used. Rider came up next to him and followed his gaze.

"Hey, did you know Terry McCaleb over at the bureau?" she asked.
"Yeah, we worked a case once. Why, you know him?"
"Not really. But I've seen him on TV. He doesn't look like Clint Eastwood, if you ask me."
"Yeah, not really."

This was a reference that proved very interesting, not just because it linked my first Connelly book to the first film that I had seen based on his work, but also because the reference seems to break the rules of time: Angels Flight was published in 1999 and Blood Work was released in 2002 (the book was published in 1998). I know what you're thinking -- did Connelly do to this book what George Lucas did to the Star Wars trilogy years later? He probably did not.

A more reasonable explanation would be that Eastwood had optioned the book, but that the actual filming started late and consequently the film hit the marquee in 2002. An interview hosted at the Barnes and Noble page for the book suggests that this is indeed what had transpired:

Jim Charter from Ames, IA: Hi, Michael. I just finished ANGELS FLIGHT and loved it, of course. I have to know, though, if you were just playing with us, or is Clint Eastwood really going to make BLOOD WORK?

Michael Connelly: Your guess is as good as mine. Eastwood optioned the story last year and hired an Academy Award-winning screenwriter to adapt it. That is where it stands right now. In that respect the mention in ANGELS FLIGHT is fantasy

There you go.

Saturday, July 23, 2011

the guacamole of his own deception

Imagine, if you will, Jack Nicholson stepping out of Chinatown and Johnny Depp walking off the set of Fear and Loathing in Las Vegas and both of them getting into Seth Brundle's telepod. Rango seems quite like the result of the teleportation. I am thinking more of the chameleon and the poster, but the film owes a huge debt to Chinatown, among other films, and Nicholson was in it. The film also has a Hunter S. Thompson "cameo" and that's what Depp's film was all about. Even the poster seems to ring a trippy bell.

The film runs high with numerous riffs on and references to films like Star Wars canon, Sergio Leone's westerns and Apocalypse Now and these references zip past your eyes and ears at a pace that respects your attention. The more you know about the movies it quotes from, the more you are likely to enjoy it, but even if you just walked in hoping to be entertained, you are not going to be disappointed.

Johnny Depp turns in a splendid performance behind the microphone and finds able support in the rest of the crew (which includes Alfred Molina, Bill Nighy, Ned Beatty, Isla Fisher, Harry Dean Stanton, Abigail Breslin and Ray Winstone). If you love Westerns, and especially the ones that Sergio Leone directed, you will find a lot to enjoy here. The narrative sticks to the familiar tale of a hero's journey (see also: A Bug's Life, Kung-fu Panda) mixed with the familiar trappings of a Western. The colours are bright and glorious, the animation detailed and the film itself is a marvel. Where else does one find Mariachi owls, Wagner on banjos, a bank that stores water and a rattlesnake with a gattling gun for a rattle? Gore Verbinski and ILM have made a fine film that really and truly holds its own in a genre that has been dominated by Pixar.

Wednesday, July 13, 2011

listen and pronounce

Dear Indian IT professional[sic],
I regret to inform you that the word iteration is not pronounced as eye-te-ray-shun. The correct pronunciation is it-a-ray-shun (I could use the International Phonetic Alphabet here, but I fear that it would only confuse you). I understand that English is a very strange language: the idea is pronounced eye-di/dee-ya(a), but the word instead is pronounced ins-ted. When one wants to understand how to pronounce a given word, one could, I believe rely on a dictionary or thesaurus or just listen to other people (who, hopefully, are not stricken by this affliction as you are) talk. Saying I Traitor (see how it spells!) when you mean Iterator can only offer your listeners some reason to chuckle (or perhaps they have already been driven to apathy after hearing the likes of you talking on and on as if you had some misplaced sense of self). Until dictionaries that are regarded as standard references defer to the multitude of your ilk and accept eye-te-ray-shun as an alternative form of pronouncing iteration, please consider being gentle on the ears of your listeners while also making you a better speaker.

Thank you for your patience and time.

belly buddoor

While watching the extremely liberated and entertaining Delhi Belly a mild sense of déjà vu hit me.
  • Three friends/roommates in Delhi
  • a scooter that goes kaput at inopportune moments
  • spoofs of pop culture
  • getting accidentally involved in criminal goings-on

The answer: Chashm-e-Buddoor, Sai Paranjape's cult classic comedy from 1981.

I do not mean to suggest that the Abhinay Deo-helmed film is a rip-off or that Akshat Verma was taking a hint from Sanjay Gupta and running a DVD of Chashm-e-Buddoor endlessly while doodling out ideas for his script. I just found it interesting that two films I enjoyed had such common elements.

Saturday, July 09, 2011

the roaring jeepbuster

Coming soon to theatres is Singham, the Bolly-remake of the Tamil blockbuster with Ajay Devgn (is this what they call dropped-A tuning?) stepping in for Suriya/Surya. The trailer featuring the title song has everything any lover of the opulent waste, the audacious stunts and fuming masculine grimaces of constipation that had been hallmarks of South Indian pulp cinema, usurped by Bollywood in a rage of remakes in the 80s and 90s and then left to thrive in the home base. taathaiyaa over to arrays of Dhols, colour-coordinated vigorous dancers, synchronised steps, a well-fed virile moustache (coconut oil, makkhan and lots of spirit gum). Watch kicked goons trip the loop fantastic as they defy the ordinary laws of Physics that work well in the IIT JEE, but not in the world of commercial cinema. Take a break to watch our hero fire a single shot at a jeep to send it flying (I kid you not!). The poster itself is quite cool, but I really like the teaser poster that was released some weeks before. That one just features a lion (Singham, duh!) with the letters of the title drawn out like a trim for its mane. The accompanying trailer offers more aerobics than the one with the title song. One only hopes that the obligatory romantic interludes are kept to a minimum, so that the lion's share of the film is devoted to conflict, confrontation and cracking jaws. It has just one curious oddity: it ends with the camera running in at a low angle to Devgn's face as he spits out his wheezy weak punchline: jis me.n hai dam to fakt baajiraao si.ngham. You see there's just a wee problem in how he pronounces fakt. फ़क्त is not how a Maharashtrian would pronounce it. There's no nuqtaa, which means it should be pha (try saying pa and ha at the same time and you'll get the idea) and not fa; and despite being written as फक्त, it's pronounced फक्तं (that's phakta for you). I wonder now if this was a weak attempt to toss a faux cuss word into the laps of the censor and then smile in all innocence.

By the way, does anyone know more about the name Shikre? I'm familiar with Shirke, but I don't think I've seen the name that Prakash Raj's character sports in the film. His name in the Tamil original referred to Murugan's vehicle of choice (the connection between that and a lion is left as an exercise to the reader).

zingers

If Google had been called Thirty instead of Google, their recent foray into social networking could have given Jeetendra his most profitable endorsement contract.

Does I am Bombay to know qualify as an Indian entry in the tome of rhyming slang? ("dying" replaced by "Bombay" (Bombay Dyeing))

I would like to trademark the term Pan Parag (पान पराग) Developer to refer to developers who always seem to think "One class is not enough; I must write several classes to do something simple" (of course you remember the ad featuring Jalal Agha!)

How's this for the opening line of a story or book?: a granola bar fell out of the box and to its death

I'd like Prem Chopra to make a comeback as a sleazy Bollywood villain with the line My name is Madan; show me your badan (बदन)

Watching bad Telugu movies is a gulTi (गुल्टी) pleasure

Q: What did God say to Jesus on Good Friday?
A: Hang in there

Flamingo of the Fundament would be a great English title for the 1961 film Aas ka Panchhi (आस का पंछी)

Software builds are like hearts; they are bound to be broken

RIP rasika

Rasika Joshi passed away on Thursday, July 07, 2011 after a long battle against cancer, robbing us of a great actress. She was 39. I was unfortunate never to have caught any of her work on the stage and only had her stellar turns in the films that got made when RGV's Factory was at its most fecund: the daring role of the prison bully in Ek Hasina Thi, Vishnu Prasad's annoying mother in Gayab!. The maid in Vaastu Shastra seemed like a weak echo of characters she had already played, but, if the film was an indication, the Factory had begun to sport some warts. By the time she showed up as Mrs. Dave in Go, the Factory was sputtering and when she appeared as Shiva's mother in Johnny Gaddaar, Sriram Raghavan had moved out of the Factory. As she seemed to become a frequent fixture in Priyadarshan's films, RGV continued to try and get her, even if it was a blink-and-you-might-miss-her role, for his films (Darling, Ram Gopal Varma ki Aag) and even for his forthcoming Not a Love Story. From an acquaintance and a fan, Rasika, you will be missed.

Sunday, July 03, 2011

vishal's next(s)

As seems to be the norm, there are numerous notes about Vishal's next venture.

The first is the sequel to Ishqiya and is called, until further notice, Dedh Ishqiya. Vishal, of course, will only be producing (and, one assumes, handling the songs and music). Shooting is supposed to start either at the end of 2011 or some time in 2012. It seems almost certain that Vidya Balan is not part of it while the other regulars are. It is unclear whether Kangna Ranaut and Madhuri Dixit will be part of the sequel.

The next is the much-hyped adaptation of Chetan Bhagat's 2 States and might (finally?) see Shah Rukh Khan collaborating with Vishal after the last opportunity for Mr. Mehta and Mrs. Singh came to naught. Rumours suggested that Priyanka Chopra was slated to play Ananya to SRK's Krish, but the actress has reportedly cleared that up: she is not part of the film (yet?). There are rumours that Asin might be the one, but rumours will be rumours. Things may start moving only in 2012.

Evidently bitten by sequelitis, Vishal is also working on Kaminey 2, but without Priyanka Chopra. More is not known.

The thread with the most surprises, however, has been for a film called (currently) Daayan. This not only sees Vishal collaborating for the first time with Ekta Kapoor, but also has a very surprising choice for the male lead: Emraan Hashmi. Evidently, this choice drove several A-list actresses away, including Rani Mukerji, but the latest rumour indicates that Vidya Balan, who did not make the roster of Dedh Ishqiya might snag the eponymous role. Little else is known about the film except for the premise of a guy doing the rounds with three lassies (which makes the choice of Hashmi not so surprising given his ouevre), one of whom is a witch.

Vishal is also working on what might well be the first in the pack to make it to the marquee: a romantic comedy with Ajay Devgn (TAFKA Devgan) and produced by Kumar Mangat. The title might surface in a few weeks.

After being a part of the launch of Mafia Queens of Mumbai by S. Hussain Zaidi and Jane Borges, Vishal has reportedly bought the rights to one of its chapters. Anything more might happen only after the cinematic adaptation of 2 States gets done (or abandoned).
[Cross-posted on the Vishal Bhardwaj blog]

Saturday, July 02, 2011

short notes

(being an exercise in clearing out old notes that never developed into posts)

As soon as dil kyo.n ye meraa started streaming into my ears, I knew that Rajesh Roshan had finally managed to fix one of the problems that has plagued his ouevre. With Kites he had finally found someone to arrange (take your pick from Dhrubajyoti Phukan, Prasad Sasthe, Anirudh Bhola, Taufiq Qureshi and Jaikishan Vanjari) and mix his songs (Eric Pillai). So what if the song sounds like Pritam or even M M Kreem (in his better days)? It's still a huge leap forward from the material from the last few years.

Did no one else notice the modified riff from Shipping out to Boston by The Dropkick Murphys in ra.ng Daale.n on the soundtrack of Lafangey Parindey?

Here's how the connections work on the soundtrack of Break ke Baad. Monica Dogra, who makes her Bollywood singing début duuriyaa.N (is the nod to Sheryl Crowe's Soak up the Sun intentional or just an accident?) is the Shaa'ir in Shaa'ir+Func, her dance/rock/electronic outfit with Randolph Correia. Now, Randolph Correia also happens to be the guitarist in Pentagram, whose lead singer is Vishal Dadlani, who also happens to be the Vishal in Vishal-Shekhar, who happen to be the music directors for Break ke Baad.

Wednesday, June 29, 2011

the little things

I procrastinated when Firefox wanted to upgrade itself to version 4 from 3.6.x and now, thanks to their new aggressive release plan, I had to jump right over to version 5. I'm still opening new windows instead of tabs thanks to "View in New Tab" moving up to number one in the context menu for a link -- It's amazing how I seem to have adjusted completely to moving to the second option automatically.

With just a stray kaa and the onomatopoeiac funaa, is the soundtrack of Luv Ka The End the closest a Bollywood soundtrack has come to having English titles for all the tracks? (the tracks are Love kaa the End, Tonight, Freak out, The Mutton Song (truly entertaining, I might add), F.U.N Fun Funaa and Heppy Budday Beybee #6).

Do you know what a DART is? The acronym, of course. Presumably, it's a Daily Activity Report Tool (which, no doubt, measures the litres of water that you used or the reams of a**wipe you consigned to the bin or the number of web sites you visited during the working day). And it's something Indians should be proud of, because according to the results Google gave me when I searched for it, it appears to be a PIO (Product of Indian Origin). I think there's a startup working on a spin-off based on the things you do very often during a working day. It's called the Frequent Activity Report Tool.

what film might have well been about DBAs trying to revive a dead Oracle instance? wake up SID.

Monday, June 27, 2011

72: what could have been

Would it have been like 1972, which boasted Apna Desh, Jawani Diwani, Mere Jeevan Saathi, Parichay and Seeta Aur Geeta among others? None featured in the nominations for Best Music at the Filmfare Awards for that year (conferred in 1973). Perhaps it is best to relish the music and pray that one discovers something new -- something in the arrangement, a forgotten unreleased version, outtakes, session recordings -- in all the soulful effervescent music he had produced. Time to go back and enjoy the complete version of one of my favourite RDB-Asha duets, sharaabii aa.Nkhe.n. As with a lot of his songs, I can't bear to watch what transpired on the screen (even though it's Helen, there's also Rakesh Roshan with that moustache and one of those funny mops). When will someone master this and toss it out on CD?

Saturday, June 18, 2011

poetasteless: case study of yet another movie review from rediff

The review of Bheja Fry 2 hosted at rediff is written by Ankur Pathak, who, one fears may have studied English from some institution dedicated to imparting some training in the language to IT professionals in India. One suspects that the writer may also have some interest (or -- shudder! -- credentials) in some school of business. How else does one explain something like this:
And a host of mortifying mishaps follow, where a deserted emotion called humour is expected.

Alas, it never boarded the ship at first.

mortifying mishaps is the fruit of an adventurous foray into alliteration. The review is loaded with many such phrases that could serve well as rejected names for flavours of ice creams abound: overall evolution, bustling firecracker, sensual proximity, massive puncture, stressfully written, fittingly lifted, forcefully enacted, romantic inclination, brainless bummers.

flounders drearily swimming away into unending boredom works as an unintentional nod to the lyrics of Pink Floyd. falls horizontal lacking any kind of variations is the stuff of lyrics of yore, as is breathe the ocean-air easy (excuse the inappropriate hyphen), but mostly couriers his angst without any aggression and asks for an[sic] urgent medical help reflecting mental disability are just some of several signs of incompetent writing (another being It is exclusively separate what a rock star of an actor Vinay Pathak is). I am not sure I understand (aside from the misplaced hyphen) the point of a fragment like he is drafted scenes like showing his radium-watch to a freaking Talwar. Is a freaking Talwar a f*cking sword? What the dagger!

Was the editorial board (should it exist and be competent enough) at Rediff.com was on vacation or asleep when this article was submitted for review? Perhaps the editors wanted to let Mr. Pathak go ahead and make a fool of himself. There seems to be no other explanation for misplaced commas, the random use of double hyphens (when one or none would have sufficed), the incorrect use of hyphens (radium-watch, two-three), the incorrect use of apostrophes in plurals and the use of inappropriate verbs (how does one land a film? how does one over-stress on anything?)

In closing, one cannot help using a line from the article to describe the efforts of the writer of this inconsequential, boeotian, gaumless, insulse review: His intentions often unclear, his actions are misleading.

PS: Unless astrological malaise has affected him, Mr. Amole Gupte spells his first name as Amole and not Amol.

Sunday, June 12, 2011

the good thing about loud people in the office

is that you can sometimes expect to hear them utter some gems that make your funny bone dance:
the end result is always to publish a result

first time a second field you have overridden

change that [X] also so we can see that how the [X] can change

Unless commitment is made, there are only promises and hopes; but no plans.. (the speaker was not Salman Khan)

Wednesday, June 01, 2011

englITsh: thanks for your input

englITsh: a neologism describing a variant of English cultivated and learnt in corporate IT workplaces.

Dear PersonWhoLearntEnglishInIT,
The phrase thanks for your input was born and sired in the world of specious corporate talk and has no place in regular conversation; regular conversation is the kind you have with people and not mendacious forms of life dressed in expensive wrinkle-free polyester with unrelenting vacuous smiles on their faces. Thank you so much for listening to me and Thank you for those useful suggestions are some alternatives that fall gently on the ears while also sounding more polite, more genuine and more meaningful. This is not a game of plug and socket. This is about talking to people. Get IT?

Tuesday, May 31, 2011

the most bizarre case of lost and found

My first reaction when I read it was WHAT?. On a recent trip to the USA, Bollywood actor Rishi Kapoor decided to search for his former co-star and headliner of the yesteryears, Raj Kiran (surely you remember Arth, Karz, Hip Hip Hurray) and finally managed to find him ... in a mental institution in Atlanta. I don't know what to say or write. This is worse than the lonely fate of Tony Vaz.

Sunday, May 29, 2011

selling seashells on the shores on bollywood

बेईमान मोहब्बत is one of the songs from Shankar-Ehsaan-Loy's ouevre that does not quite sound like one of their songs; it does not yet bear any of their trademarks. I was listening to it again a few days ago and I noticed some interesting lapses in pronunication that I had probably missed because I was enjoying the song. The line in question is the second line of the mukha.Daa: जो रांझा थे वो चले गए. There's a palatal consonant () followed by a dental consonant () and this makes the line tricky to say right, especially when you're singing energetically and not reciting poetry.

The song opens with Shankar Mahadevan singing these lines and he can only muster जो रांझा ते वो चले गए. When it's Gayatri Iyer's turn she flubs the palatal with जो रांजा थे वो चले गए. KK wins the battle when he gets to the microphone with the right palatal and the right dental.

It's still a nice enjoyable song.

hitchgopal varma?

In chapter three of his book Spellbound by Beauty, Donald Spoto writes:
Hitch could certainly take credit for his visual inventiveness, and for his brilliance in adding to a script precisely the right images, the proper tone and atmosphere. But screenwriters from [Charles] Bennett in the 1930s to Ben Hecht in the 1940s, Samuel Taylor and Ernest Lehman in the 1950s and Evan Hunter in the 1960s all quickly realised that this director's gift was not for writing dialogue but for minimising it and allowing action and reaction, gaze and glance, to tell stories. Perhaps because he wanted to write the script entirely on his own but could not, he often resented his writers, who quickly knew not to expect gratifying compliments.

As I read this passage, I found myself thinking about a similar problem with Ram Gopal Varma, whose Factory promised to offer cinephiles different stories interpreted without the trappings of mainstream convention, with interesting technique and in different creative voices. Unfortunately, if one looked at just his jaunt in Bollywood, one noticed that his writers (who even turned director under his wing) were soon fleeing the coop and trying to make hay elsewhere. The reasons may have been myriad and most of them have always acknowledged the value of their formative time with RGV. But the steady departure of competence has left RGV and his Factory hollow. Without decent writers, the quality of his recent output has been on the decline. Long gone are the likes of Saurabh Shukla, Anurag Kashyap, Sriram Raghavan, Shimit Amin, Prawaal Raman and Manish Gupta.

Spellbound by Beauty is Donald Spoto's third book on the life and work of Alfred Hitchcock. It is also likely his most controversial, because it describes the often "difficult and even painful circumstances" under which the leading ladies in his films had to work. I own a copy of (and highly recommend) The Dark Side of Genius: The Life of Alfred Hitchcock, the second book in the series.

Saturday, May 28, 2011

true and really true: what's the difference?

I was forced to return to the murky depths of the Java-Web Services marsh and specifically to the quadrant dominated by Axis2 and a variation of it adopted by a behemoth peddling an enterprise-grade application container. This is what they called nostalgia (for those who do not enjoy etymology, that almost literally means a return to pain). As the flashbacks ensued, I found myself drawn to an old favourite in the Axis2 code base, org.apache.axis2.util.JavaUtils. The class contains several methods that seem dedicated to an exploration of verity and falsitude. Here are the methods devoted to the truth, the whole truth and all variants of it.

/**
   * Tests the String 'value':
   * return 'false' if its 'false', '0', or 'no' - else 'true'
   * Follow in 'C' tradition of boolean values:
   * false is specific (0), everything else is true;
   */
  public static boolean isTrue(String value) {
    return !isFalseExplicitly(value);
  }

  /**
   * Tests the String 'value':
   * return 'true' if its 'true', '1', or 'yes' - else 'false'
   */
  public static boolean isTrueExplicitly(String value) {
    return value != null &&
        (value.equalsIgnoreCase("true") ||
            value.equals("1") ||
            value.equalsIgnoreCase("yes"));
  }

  /**
   * Tests the Object 'value':
   * if its null, return default.
   * if its a Boolean, return booleanValue()
   * if its an Integer,  return 'false' if its '0' else 'true'
   * if its a String, return isTrueExplicitly((String)value).
   * All other types return 'true'
   */
  public static boolean isTrueExplicitly(Object value, boolean defaultVal) {
    if (value == null) {
      return defaultVal;
    }
    if (value instanceof Boolean) {
      return ((Boolean) value).booleanValue();
    }
    if (value instanceof Integer) {
      return ((Integer) value).intValue() != 0;
    }
    if (value instanceof String) {
      return isTrueExplicitly((String) value);
    }
    return defaultVal;
  }

  public static boolean isTrueExplicitly(Object value) {
    return isTrueExplicitly(value, false);
  }

  /**
   * Tests the Object 'value':
   * if its null, return default.
   * if its a Boolean, return booleanValue()
   * if its an Integer,  return 'false' if its '0' else 'true'
   * if its a String, return 'false' if its 'false', 'no', or '0' - else 'true'
   * All other types return 'true'
   */
  public static boolean isTrue(Object value, boolean defaultVal) {
    return !isFalseExplicitly(value, !defaultVal);
  }

  public static boolean isTrue(Object value) {
    return isTrue(value, false);
  }

Needless to say, there are similar methods that handle the dark side. Jack Nicholson's famous line from A Few Good Men would be the best summary of a code review, should one ever happen.

Monday, May 23, 2011

gender-agnostic love

I was listening to दस बहाने from Dus today and remembered how, when I had heard it the first time, I wondered if the singers were actually saying दस बहाने कर के ले गए दिल instead of दस बहाने कर के ले गयी दिल. I am quite sure now that it's the former. This is a strange choice of conjugation, because the references to the loved one use उसकी and not, as one would expect, उनकी. Of course, one does not look to Bollywood as an informal school of Hindi grammar (surely one remembers how Guru Dutt convinced Majrooh Sultanpuri to go easy on the grammar in सुन सुन सुन सुन ज़ालिमा for Aar Paar). What I found even more interesting this time around was that the song almost completely eliminates any notion of gender. Both KK and Shaan go on and on about the other one and the heart and so on and Vishal Dadlani tosses in DJ toasts every one and then to punctuate the dance floor number, but never (well, almost never) is there a sign that we're talking about her. It makes you wonder if this was because the song was originally written to be sung by girls. Now that it's just the boys singing, one also wonders if nobody noticed that it might have become the trendiest paean to gay guys all around except for one pesky detail (remember I had said almost): one of the lines Vishal Dadlani spits out is you stole my heart from me girl. girl is the clincher. He just saved this song from being an ode from him to him. Bring on the two large sunflowers and whack them against each other.

Sunday, May 22, 2011

BSP revisited

I stumbled upon an article featuring a review of the code of the Doom engine. I wish someone had written something like this years ago ...

One of the classes during the undergraduate days required that students deliver a short presentation on some piece of technology they had found interesting. I was interested in computer graphics and games. I was especially fascinated by Doom -- a friend had introduced me to the shareware version of the game and I got my first taste of addiction when I found myself sitting up late one night trying to get past a level without being killed by balls of flame spat out by ugly imps lurking behind closed doors. When Id Software released Quake, I also discovered BSP trees. An article in the now-extinct Dr. Dobb's Journal and articles written by Michael Abrash about working at Id Software (the "Ramblings in Realtime" series) had me hooked. Abrash also made studying computer graphics more exciting. He restored the joy of making the simple things work while the textbooks offered Bresenham's algorithm in a dry academic tone. When I found a copy of Michael Abrash's Graphics Programming Black Book (now out of print, but the PDFs are legally available online) in the bookstore, I did not hesitate in snagging a copy and reading the chapters over and over. Since I was not destined to approach the eerie smartness of Jon Carmack, some of things Abrash wrote about did not immediately make sense. Admittedly, I would have had to "get my feet wet" in code before I could appreciate them or even understand more of the items in Jon Carmack's .project and .plan files in the days when finger was used to support a form of micro-blogging. I also remember

My presentation was an experiment in fonts and slide styles, which made a label like avant garde more appropriate than educational. Since it was all meant more for a grade than for sharing knowledge (although a few classmates were interested in the idea and noted that my enthusiasm for it was evident), nothing more came out of it, although I continued to follow Id (even after Abrash quit) for years and also continued reading articles about game programming. I just never became a competent game programmer.

Sunday, May 08, 2011

pithy words in the style of a bestseller

In the third part of The Tenth Commandment by Lawrence Sanders, our protagonist Joshua Biggs has just participated in a ploy to get one guilty party to spill the refried beans on the other (arguably more guilty) and begins to wonder about justice and how it does not always seem absolute:
I should have been exultant but I wasn't. It was the morality of what I had done that was bothering me. All that chicanery and deceit. I would have committed almost any sin to demolish [primary guilty party], but conniving in the escape of [guilty party that was the object of the ploy] from justice was more than I had bargained for. And I had connived. I had worked almost as hard as [police office] to convince [guilty party that was the object of the ploy] to betray [primary guilty party]. It had to be done. But as [police officer] had said, [guilty party that was the object of the ploy] was going to walk. An accomplice to murder. Was that fair? Was that justice?
I realised I didn't really know what "justice" meant. It was not an absolute. It was not a colour, a mineral, a species. It was a human concept (what do animals know of justice?) and subject to all the vagaries and contradictions of any human hope. How can you define justice? It seemed to me that it was constant compromise, molded by circumstance.
I would make a terrible judge.

Edward X Delaney managed to find his own way of dealing with this dilemma, but Sanders unfortunately never wrote another novel featuring Joshua Biggs, so we'll never know what Mr. Biggs did.

Friday, May 06, 2011

music is a nail

Although he hasn't been churning out much stuff in the last few years, the once-prolific Bappi Lahiri still manages to deliver his little scoop to the delight of all those who relish a smidgen of surprise in their news. This time the bejewelled bopper has decided to rope in a famous name for a chitty-chitty ditty called I Got the Music in a film called Will to Live (surely the Hindi version will be titled जी ले ले जी ले ले). After he had elicited the services (in voice and flesh) of Samantha Fox for Rock Dancer, Pritam had bested his record with Snoop Dogg showing up on the soundtrack of that film with a title whose terrible spelling was inspired by unfortunate numerological ideas. Bappi ain't gonna take no jive from the man whose torrent client offered a higher return on investment in the department of plagiarism than Bappi-da's ears. So now welcome M C Hammer, who will write and perform some rap on Bappi's track. Will Mr. Burrell do better than Shri Dev Anand who had ensured that Mr. Prime Minister would have something to keep it in the canals of Bollywood infamy? Will Bappi-da outshine Park Chan-Wook? Will Mr. Burrell resort to a reissue of his classic hits after the fruits of the collaboration are made available to the ears of the world? Or will it all be गान with the wind?

While we wait, it's time to sneak another look at his tribute to Michael Jackson (if you are lucky, you can snag a copy of the release from United White Flag, a label whose website is a remarkable fusion of eyecandy with eyesore).

Tuesday, May 03, 2011

real panic

Have you seen Panic Room? If you have, do you remember the scene when Meg Altman (Jodie Foster) calls 911 and is asked to hold? I remember the entire hall groaning a nod. Somehow, it seemed right to a lot of people. How about a real-life example?
X calls 911 to report an accident and is asked to provide the address after which the operator asks for the zip code
X:
911 operator: that's Cobb County. You need to call the Cobb County Police Department. (and cuts the line).

Fact. Not Fiction. To avoid such problems in future, please keep a list of phone numbers for the police departments in all 159 counties in Georgia and also the PD for the city of Sandy Springs.

Sunday, May 01, 2011

the joy of comments

(in code, I mean). Truth is funnier than fiction. Comments in source code, to be precise. Consider, for example, the following worthy addition to the list of classic lines for fortune cookies:
// later is to be
or a declaration of principles:
// THIS method is not calling anywhere
or a declaration of the laws of the jungle:
// All transactional processing classes are responsible
// for calling this method and for providing what action is provided
or perhaps an example of stating the obvious:
// This abstract class houses default and common
// implementation for some interfaces

// This class is the message-driven bean implementation class
// which acts as the listener to queues which hold the messages that affect other 
// business objects
it is unclear why the following comment should even appear in code (perhaps the reader is not expected to be a developer):
// It is restricted to change this API without testing all the references
how does one say a lot without making much sense? how about (some of the funny names in camel case are euphemisms to protect the innocently dangerous; any others are changes just to keep the legal eagles awbay):
/*
 * DefectNumberInOneTrackingSystem Fix : Added this flag becoz
 * misspelledMethodName() in Abstract Object Check Against Null String of
 * FieldThatCannotBeDisclosed String While in This Defect Although it was Not
 * ______ Update But then also FieldThatCannotBeDisclosed string was
 * Not Null Becoz the default value stored in database is
 * 0.0 So it is Not Null and MisspelledFieldName Become true and
 * Then it dont set the AnotherFieldThatCannotBeDisclosed if it is True...See
 * DefectNumberInAnotherTrackingSystem
 */
{includes material that previously appeared hereabouts}

Wednesday, April 27, 2011

covering goodbye

(based on a true story)

departure I: two years ago

Saying good-bye is never easy but it time for me to move on. Today is my last working day at [redacted name of employer]. We have had a very productive and fruitful journey over the years at [redacted name of employer]. I am proud of all we have achieved together, and will cherish all the friendships I have formed here.

It was not an easy decision for me to resign from [redacted name of employer], but the timing was right. As excited as I am about what the future holds for me, I will surely miss all of you.

[...]

Thanks for all of your hard work and support over the years.

departure II: a few hours ago

Saying good bye is never easy but it time for me to move on. Today is my last working day at [redacted name of employer]. It was not an easy decision for me to resign from [redacted name of employer], but the timing was right. As excited as I am about what the future holds for me, I will surely miss all of you.

I would like to express my sincere appreciation to all of you for your support, understanding, patience, cooperation and encouragement. I will always remember my time at [redacted name of employer] for the personal growth it afforded me and for the numerous friendships I made.

Best wishes for continued success and please keep in touch.

Two different people departing with similar words (and mistakes). Reusability at its corporate best.

Saturday, April 23, 2011

the deadly sins of lawrence sanders

Ever since I first watched David Fincher's Se7en and read about the Deadly Sins series by Lawrence Sanders, I had meant to try reading them. Years later, I caught the cinematic adaptation of The First Deadly Sin starring Frank Sinatra and mourned the lack of a DVD release that was faithful to the film's original aspect ratio. It took me another two years to finally settle down to read one of the books in the series. Since I had already caught the cinematic adaptation of the first edition, I would have found it hard to start at the beginning (Edward X. Delaney had already appeared in The Anderson Tapes, but that book had nothing to do with the deadly sins). I started instead with the last book in the series The Fourth Deadly Sin. The book told me a lot about Edward X. Delaney's weakness for sandwiches (Sanders, like Hitchcock in Frenzy, appreciates how well murder and food go together) and what a good role model he would have been for software development teams. I liked the details about the procedural often mundane aspects of the investigation of a murder and the rather uncomplicated revelation of the murderer and the motivation for the crime. Although I was not completely impressed, I saw enough to make me want to try another entry in the series.

I decided to go back to the beginning and read The First Deadly Sin and was pleasantly surprised. Lawrence Sanders was on a creative roll with this book. The book opened with a section dedicated to Daniel Blank, the serial killer whom Delaney is forced to pursue and begins to explore his character. We do not see a murder until a few chapters later. Sanders then switches to a section dedicated to Delaney and continues moving between Blank and Delaney as circumstances and the investigation bring them closer to each other. There are only hints of Delaney's weakness for sandwiches, unlike the remaining books in the series that devote time and pages to the different sandwiches he makes for himself. The ending of the book is unlike that of the movie (which, for me, was tonally more appropriate) and, in addition to offering geographical closure (we begin and end the book at Devil's Needle with Blank) also offers food for thought if you are looking for allegories. The police procedural got its due but Sanders also found time and space to tell us more about both Daniel Blank and Edward X. Delaney. Cop and Killer often seem like "doubles" and Delaney needs to think like Blank in order to try and understand him and his killings.

I turned my attention to The Second Deadly Sin and began to see patterns, some of which made me uneasy. I started getting the feeling that Sanders either lost the creative muse that fuelled The First Deadly Sin or had managed to pick a leaf from the assembly-line writing of Sidney Sheldon. The book opened with a murder, just like The Fourth Deadly Sin and, again just like the The Fourth Deadly Sin,it was clearly committed by someone whom the victim knew well. Everything else until the revelation of the killer's identity is an engaging exploration of Delaney, his familiar battle with departmental politics, his almost secretarial approach to detective work and more sandwiches. The book was a satisfying page-turner, but offered nothing else, unlike its predecessor.

I just finished The Third Deadly Sin yesterday and the feeling that Sanders had run out of gas got even stronger. The book opens like The First Deadly Sin by introducing us to the killer, but Sanders does not seem interested any longer in giving Zoe Koehler as much room as he did Daniel Blank. The first chapter ends with a murder just like the second and fourth editions in the series. The second chapter opens with Edward X. Delaney and his sandwiches and also makes this book structurally similar to The First Deadly Sin as we switch between Zoe Koehler and Delaney's investigation. Once again, we see Delaney dealing with the idea of the killer being a woman, but he does not seem as interested in understanding her as he was when trying to track Daniel Blank down. Sanders tries something different by having Delaney and his wife argue about women's liberation -- it doesn't help that the killer, who suffers from the rare Addison's disease, embarks upon these killings when she deals with the crimson curse. It's a pity that he does not choose to explore the idea of blood-letting and the nosebleed in Australia. Sanders seems to have instead dedicated his time to churning out a bestseller. As things move to a conclusion, the writing gets sloppy. We get expository dates and times that insult our intelligence. The novel also ends with geographical closure (Zoe's apartment) in tribute to the first book, but in a more tonally sound fashion.

After having read all four, I can see why Sanders never got around to writing any more. I would like to think that he just never got an idea that would justify an entire book offering something more than the now-familiar tropes (Delaney getting pulled out of retirement, Delaney's sandwiches, Delaney's notions of crime and punishment -- the Dostoyevskyian angle appeared in the first book and never came up again). If I had to rank the books starting with the one I liked most and ending with the one I liked the least, I'd choose The First Deadly Sin to head the list, followed by The Third Deadly Sin (I have a weakness for serial killers and books where I don't have to sit and wait for a "grand revelation"), The Second Deadly Sin and The Fourth Deadly Sin (being a weak shadow of the second book).

Friday, April 22, 2011

how do you puke in Java?

RuntimeException up = new RuntimeException();
throw up;

the demonstrative manager

Allow me to introduce you to a burgeoning breed of managers. The ilk shares several traits with existing strains of Manageris Vulgaris, the genus of airheads sired by the booming industry of Information Technology in the South Asian continent (to be more precise, the land of Bhaarat). Familiar is the curious talent for lapping up the noodles of crapspeak (going forward, synergy, stakeholders) while remaining clueless about the fundamental elements of English grammar (the question mark and the period are used interchangeably and one often has to read the email aloud with various emotional and tonal flourishes to determine which mark of punctuation would be most appropriate; brevity is replaced by a mouthful of randomly abbreviated words that make you wonder if the writer was in a hurry to get to a rendezvous with Mother Nature).

The new mutation of this species has a fresh appreciation for deixis. To understand what such an individual means in a single sentence without any context is more challenging that deciphering a haiku written by Mirza Ghalib. Consider the following example:

You send me those. I will check if that is what all people is doing. If yes, then we will have to do this.

The writer of this wondrous explosion of verbiage would have been so much more comfortable writing monologues for the Oracle in The Matrix than being effective in professional communication.

I leave you with a sample from a less-qualified exponent of this demonstrative delivery. Fear not, dear reader, for this person will also rise in the ranks and demonstrate some fantastic foinery:

Right now we are doing like that only. If we do like this then we need to [...]

Monday, April 18, 2011

smart little 555

image courtesy: http://www.555soaps.co.in I've just started reading The Third Deadly Sin by Lawrence Sanders, the last (I had started with The Fourth Deadly Sin, returned to The First Deadly Sin and wrapped up The Second Deadly Sin two days ago) and page 15 had an interesting little nugget:

Homicide at the Grand Park on February 15th. Victim of stabbing: George T. Puller, 54, white male, of Denver, Colo. Anyone with information relating to this crime please contact Detective Sergeant Abner Boone, KL-5-8604

KL-5 is nothing by 555, that favourite exchange of movies and TV shows (and books, as this exhibit reveals).

And now, back to familiar tropes and Delaney's sandwiches.

Thursday, April 14, 2011

the tome of my god

His name is Eli and he is on his way to the west in a post-apocalyptic world. He is played by Denzel Washington and that was not all that made me think of Will Smith (I Am Legend). The montage set to How can you mend a broken heart? took me back to the frivolous bit of bathing in I, Robot while Stevie Wonder's Superstition played on. But I do the the Hughes Brothers great injustice by reaching out for such comparisons. They didn't rub it in that Eli was so fitting a name for a man walking across the country with the Bible (hint: Psalms 22:2-3). They kept the tone of the film consistent without getting enamoured of the special effects (even though some of the heavy digital dressing of the skyscape was a bit too obvious). I had enjoyed the way the attack on the house was presented -- thanks to careful planning and obvious post-production -- as a seamless adventurous shot with the camera tracing arcs that never distracted me and kept me interested in the action. I liked how elements from the western (a lone man drifting through towns, people building communities and worlds for themselves and a character humming a tune by Ennio Morricone) were mixed into the film without making it an exercise in blending genres; the narrative never yielded to exposition in order to tell us more about how the world had ended up this way -- it remained first a drama, a tale of conflict between people and values and a story of a personal quest. I could forgive the obligatory product placement, because the brands

The Hughes Brothers also gave me a chance to see another wonderful performance by Denzel Washington. Interestingly enough, it was the ending of the film that sealed it. What was otherwise an (as always) earnest measured performance became a very careful honest subtle interpretation. I went back to the beginning and started watching scenes, listening to lines, watching the big fight scene (and realising how the inspiration for it also made sense) and admiring just how honest everybody had been to me. The quote from Johnny Cash (Live at Folsom Prison) which had elicited a mild chuckle now seemed to mean even more. I found myself adding more meaning to the way scenes had played out.

I also found myself thinking about the ideas that the film had explored, even though I was not too convinced that the film had handled them well. The film could not resist the temptation to remain, despite its ambition, something better for the average viewer than the mindless action flick. There was more restraint, but there were also the familiar lapses that irked (the gun with infinite ammunition, for example). Although I would still pick The Road for being a more compassionate, subtle, complex exploration of the human condition in a post-apocalyptic world, I enjoyed The Book of Eli for being so much better than I had expected it to be.

Monday, April 11, 2011

when wisecracks collide

I was watching Taken once again and there was a point in the film where Liam Neeson meets an old collaborator in France and utters one of many memorable lines I am retired, not dead.

Some time later, I was back to reading The Second Deadly Sin by Lawrence Sanders. Edward X. Delaney has struck a conversation with bartender Harry Schwartz, who has recognised him from when he was Chief of Precinct 251. As the content flows from page 12 to page 13, Schwartz has asked Delaney what he has been up to, since he is no longer with the force:

"This and that," [Delaney] said vaguely. "Trying to keep busy."
The bartender spread his hands wide.
"What else?" he said. "Just because you're retired don't mean you're dead. Right?"

Go figure.

Sunday, April 10, 2011

cobb county's evil sense of humour

National Library Week starts on April 10. This makes the timing of the shocking blow to the Cobb County Library System (CCPL) proposed in the budget for the County of Cobb in Georgia rather unfortunate. In brief: 13 of the 17 CCPL branches will be shut down indefinitely. If you are a resident of Cobb County and care about the library system, please consider getting the word out, joining the community set up on Facebook, sending an email supporting the libraries to BudgetComments@cobbcounty.org or even attending the Cobb County Board of Commissioners Meeting on Tuesday, April 12, 2011 at 9 a.m. in the BOC Room, 2nd Floor, 100 Cherokee St., Marietta. You can even send an email to the commissioner of your district; the email addresses are available on this page hosted by the Save Cobb Libraries community on Facebook.

PS: For what it's worth, you're living in a county that (a) deems it financially sound to add faux brick linings on Akers Mill Road (b) proposes trimming firefighting and emergency services (c) runs a crippled limited bus service that does not run on Sunday (and also faces cuts for the 2011 budget).

april 12, 2011: The BOC meeting ended today morning and the libraries will stay. You could look at this as a victory for all those patrons of the libraries, who made their support known or wonder if the governing entities of the county were merely emulating what their cousins on Capitol Hill did last week with the scare of a government shutdown. In any event, venture forth to your friendly neighbourhood library and greet the relieved staff with your biggest smile and check out a few books, a movie or two or just flip through the newspapers or magazines. Don't forget, it's National Library Week.

staying away from meat in the USA

(It turns out that when people say "meat" in the USA, they do not include fish, so don't get confused when you hear the phrase "meat and fish"; I do not see the difference so when I say "meat" I also consider "fish"

If you are not a carnivore and landed in the US of A, finding out that this made eating out quite challenging probably did not take too long. As time went by, you've also (hopefully) figured out that "vegetarian" may not always imply the absence of animal tissue (exhibit A: "vegetarian beef"). You have also realised that sometimes the presence of meat is implied in the name or type of dish (exhibit B: eggs benedict; exhibit C: a burger). If you have not capitulated yet, rest assured. If you are lucky enough to live in a city whose denizens have a penchant for eating out, you are likely to benefit from the variety of cuisine offered by various eateries, both independent and chain. Sprawlopolis, GA, for example, offers several choices.

Indian restaurants have always been a safe bet. Any of those who genuflect to the udipi or sarvana calling will guarantee a menu free of all carnal pleasures (no pun intended). Even those that offer non-vegetarian items can be relied upon to do justice to paneer, paalak, chanaa and lentils. Thai restaurants are tricky: you have to be sure that your "vegetarian soup" does not contain "fish sauce" (an ingredient that is perhaps as much a staple as wine in French cuisine). Burger joints are best avoided as are some casual dining chains whose vegetarian fare is an insult (exhibit D: T. G. I. Friday's). Mex-Mex and Tex-Mex restaurants fare marginally better, but it often seems like they make up for the absence of meat with bland frijoles and generous cheese.

This leaves us with some other chains that do rather well with meatless offerings. California Pizza Kitchen has an interesting array of pizzas, each marked by interesting combinations of ingredients. Several of these pizzas are vegetarian by design (with an extra charge for adding some form of meat) and some even have a vegetarian alternative at no extra price. You can also ask them to skip the meat if it's one of the ingredients.

I was surprised to have not noticed Mellow Mushroom's vegetarian options. There was always the possibility of substituting chicken with tofu in the hoagies and the standard Cheese pizza exists for vegetarians, but I had never quite noticed things like the Magical Mystery Tour, Gourmet White, Mega Veggie or the Kosmic Karma, both of which make vegetarians feel at home instead of n-class citizens who have to suffer tasteless fare while their chomp on animal protein.

Even though you could have choose not to have your hash browns at Waffle House without the ham or the chili, you would be well advised to note that everything gets cooked on the same grill. This means that, technically, there could be some animal fat in that otherwise tasy order of scattered, smothered and peppered hash browns.

Breakfast/brunch chains like The Flying Biscuit and J. Christopher's are safe places to catch a vegetarian bite (I just wish such places would not charge you extra for egg whites). The Flying Biscuit wins over J Christopher's for the presence of tofu and soysages on its menu.

Cafe Sunflower is a great place to dine at, if you want to give your brain a rest, order anything on the menu (because everything is vegetarian) and don't mind coughing up a few extra dead presidents for it. Getting to the branch at the intersection of Roswell and Hammond can be a challenge since it's a cramped intersection teeming with cars and the occasional MARTA bus, but if you're lucky, a trip on the weekend will be peaceful.

It has been a long long time since I ate at R. Thomas, but it's hard to beat (or miss) this unique funky independent eatery that was the first place I had seen a menu with the word "vegan" on it.

Wednesday, April 06, 2011

linky dinky

The Wall Street Journal has an article that tells us things we already know: India churns out a lot of graduates from a system that is rife with insufficient funding, peppered with corruption and laced with stale knowledge; these graduates don't really cut it when it comes to the jobs that have flooded the market and contributed to all the "prosperity" the nation seems to be enjoying (the call centre kind). I liked what Vijay Thadani of NIIT had to say: If you pay peanuts, you get monkeys.

I have been learning and using git for quite some time now and my experience with the DVCS (although not as D as I would have hoped it would be) has been fun so far (endorsements from various open source projects and enthusiastic presentations from the likes of Matthew McCullough have also helped). Windows is still a secondary platform for it and EGit offers IDE integration but is still in incubation. That's why I always wondered about that other DVCS that I had heard people talk about: Mercurial. I had heard about it first from a friend at Sun as they were moving to it. That was probably when the OpenJDK project moved over to Mercurial as well. Mercurial is written in Python and when Python moved over to Mercurial, it seemed to make a strange kind of sense (the dogfood kind). The reasons, however, were more interesting and backed by some thorough investigation. Simply put, the team chose something that would meet the needs of the developers as much as possible. The articles about the journey from PEP 374 to PEP 385 have been very interesting. They will also help me learn how to use Mercurial and MercurialEclipse.

Sunday, April 03, 2011

tiberius now

Who would have thought the finest tribute to William Shatner's unique style of interpreting his lines as Captain James T. Kirk would come from a "news" channel back home? Consider as exhibits two samples, the first about the swindler's list and the second, a piece of fluff about Rahul Gandhi's car and security. Just as William Shatner would challenge the mundane benign cadence of a simple sentence and deliver instead strings of words separated at random by pauses or beats. Therein, for all we know, lay the origins of hip-hop. But that has to be a nugget for another day. In the meantime, we must return to Times Now's voiceovers.

Here's a fragment transcribed from the first exhibit. For sheer glee, I have chosen to let each beat function as the end of a line.

With Tehelka claiming
That these are the Indians
Who have stashed away their money in accounts abroad
(the narrative dies, yielding to a short video clip, before returning)
The debate on India's swiss secrets
Has only begun

And a sample from the second exhibit:

The first car in the conwoy
Zooms past
But for some reason
The second
Slows down
Inside
Is Rahul Gandhi
Clearly wisible
In these pictures
The team of Samajwadi Party workers
Tries climbing
Onto the car
The car starts mooing (moo-wing)...

Accept no substitutes. The original reigns supreme. As a final exhibit, I present Captain Kirk's motivational monologue from Return to Tomorrow.

Wednesday, March 30, 2011

unintentional multilingual woes of a tool for computational linguistics

I stumbled upon the home page for a toolkit for those interested in various matters germane to computational linguistics while searching for information about Eclipse and 64-bit Windows 7 (how much conflict can one ask for?). If you know Hindi (or Marathi), you know why I had to leave my desk laughing when I saw the name of the toolkit (no pun intended there). Seriously!

offshore rush hour

I see a lot more of the kerfuffle at ramps and roads and badly synchronised traffic lights leading to the various interstates today. This could clearly be just a combination of the rains that have subsided, the time and the general preponderance of unscalable urban design. It could also be because a lot of people are rushing to work to get a few really productive hours, because their counterparts across the shores are busy watching the India/Pakistan cricket match today. No more phone calls laced with blather; no more nighmarish vistas of horrible code. Just some peace and quiet. Unless the gamesmen of the tricolour decide to emulate dominoes, of course.

Saturday, March 26, 2011

bing goes boing with axis2

If you've read posts hereabouts before, you know quite well how I feel about Axis2. You will understand, I hope, my lack of surprise at finding yet another piece of elegant congruence that Axis2 had wrecked by usurping the throne from ye olde Axis. Axis worked well with Commons HTTPClient and that library from the Apache Commons, like so many others, made life easier for a lot of developers. When Axis2 reared its ugly head from the sea of mediocrity and ambitious juvenile over-engineering, it made sure that this association was squashed. Here is how.

Have you ever tried using the Bing Maps web services using Axis? The curious aspect of these web services lay in how one had to request a token. This amounted to a request that used digest authentication instead of basic authentication. This was not such a problem if you had used ye olde Axis.

Unfortunately, you had moved into the future and had generated client code using the WSDLs and the tools in the JAX-WS RI. You then prepared to use this code atop the Axis2 JAX-WS stack (at which point you did not heed the pealing of alarm bells in the distance). Voila! The stack could do nothing for the first HTTP 401 response. There you were, in the middle of the ocean, staring at sharks as they discussed the latest episode of the hottest new sea soap opera, while waiting for a good time to transfer you to the dinner plate.

You had seen this code work with the standard Java Development Kit. Why was Axis2 being so different and difficult? You look at the code you wrote to use the generated client classes to see what you did wrong, to see if you had missed a step. You see the call to Authenticator.setDefault with the credentials. You know this is all you need to do. And yet.

Oh! goes your brain. Axis needed the Commons HTTPClient to help it with digest authentication. Surely, Axis2 could use Commons HTTPClient as well (after all, some of the developers on Axis2 had also committed code to Commons HTTPClient). You open axis2.xml and the first wave of horror hits you. The configuration already uses a class derived from Commons HTTPClient. The second wave of horror hits you almost immediately. They wrote their own middling class that left all the glory of Commons HTTPClient behind and treated it now as a messenger.

At this point, you hunt for something to hurt, wound, maim and dismember as you gnash your teeth.

Miraculously, Commons HTTPClient has a few tricks of its own and all you really need is the magic below.

import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScheme;
import org.apache.commons.httpclient.auth.CredentialsNotAvailableException;
import org.apache.commons.httpclient.auth.CredentialsProvider;
import org.apache.commons.httpclient.params.DefaultHttpParams;

    CredentialsProvider provider = new CredentialsProvider()
    {

      @Override
      public Credentials getCredentials(AuthScheme scheme, String host,
          int port, boolean proxy)
          throws CredentialsNotAvailableException
      {
        Credentials creds = 
           new UsernamePasswordCredentials("BingMapsUserName",
                           "BingMapsPassword");

        return creds;
      }
    };

    DefaultHttpParams.getDefaultParams().setParameter(
        "http.authentication.credential-provider", provider);

And that, as several not-so-famous people have said before, is all. You can get rid of Authenticator.setDefault(new AuthenticatorImpl("BingMapsUserName", "BingMapsPassword")). Don't forget to replace BingMapsUserName and BingMapsPassword with the values that you use. I'm sure you can figure that out. If you can't, you deserve to continue reaping the benefits of Axis2.

As soon as you find the right opportunity, walk away very slowly from Axis2. Go find something else that doesn't look like a school project.

 
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.