Tuesday, March 30, 2010

discombobulated? become a TV reporter

One of the many videos enjoying Internet air time after Ms. Mirza and Mr. Malik announced their decision to get married is this brief, typically pointless piece of fluff where two unseen reporters -- a dude confused in Hindi and a dudette tongue-tied in what appears to be English -- bandy sentences with Ms. Mirza's poised confident press-savvy mother. The video opens with Loquacious Lalita asking the first question, which alone is enough to send the jaw dropping while you decide to roll on the floor laughing (transcribed to the best of my ability given the limited support in the English language for onomatopoeia):

ma'am sania mirza has made such a huge decision now so you know like can you just um say that ah like what she's made such a big decision in her life the first so what do you want to say on that

[march 31, 2010]: Elsewhere, Ms. Mirza, while dealing with another motley crew, delivers a response that will look familiar to students of computer science working with threads on an operating systems assignment -- it's what happens when you let two threads write to the same chunk of memory in abandon: The date is the 15th for the reception of April. April, come she may, surely.

Monday, March 29, 2010

by any other name

Carol Reed's Oliver! is only the second musical I have been able to not just stomach but enjoy (the first was, and will always be, Singing in the Rain). Shorn of what I had come to see as Reed's trademark (canted camera angles in claustrophobic expressionist alleyways), the film is engaging as a musical while still retaining some of the dark drama of the original Dickens work (Although Fagin is not frightening enough, Bill Sikes might well be the most terrifying character in a any G-rated film as far as memory goes). The end credits of the film had me in splits for completely different reasons. How in the name of nomenclature could anyone have a career with a name like Graham Buttrose? IMDB seems to agree.

petrified

There's the Peter Principle, which guarantees that all incompetence in a hierarchy will find its right place. There's the Dilbert Principle, which assures me that incompetence is rewarded by promotion (the side effect of which is sometimes to remove such incompetence away from places it can be too dangerous for). There's the Software Peter Principle, which tells me about the effect on software of all those latent incompetent qwerties, who deserved to get promoted but were not bombastically incompetent enough. But nothing could have prepared me for the dazzling simplicity of the Dunning-Kruger effect. Their thesis, which won an Ig Nobel award, is fun to read, but if you're looking for a gist, here goes:

  • Incompetent individuals tend to overestimate their own level of skill.
  • Incompetent individuals fail to recognize genuine skill in others.
  • Incompetent individuals fail to recognize the extremity of their inadequacy.
  • If they can be trained to substantially improve their own skill level, these individuals can recognize and acknowledge their own previous lack of skill.

Put another way, this is all about people who are so dumb that they don't know how dumb they are. This reminds me of the story from a guy about his daughter and her singing. As a toddler, she insisted on singing loudly and clearly with nary a clue about how out-of-tune she was and how terrible it was for the ears of her listeners. He described her as unconsciously incompetent. As her days in school went by, she finally began to realise just how much her singing sucked. She was now consciously incompetent. She then started taking lessons and became a good singer. She now knew that she sang well and her listeners were now far better off. She had become consciously competent. After years of practice and performance, she became an artist of sorts. She had finally become unconsciously competent (People like Charlie Parker and John Coltrane who churned out endless runs of complicated yet masterful notes were in the upper crust of this category). The Dunning-Kruger effect seems to describe all individuals, who, for reasons unknown to quantum physicists and zoologists, appear to be atavistically inclined: they are destined to achieve new nadirs in unconscious incompetence.

Thursday, March 25, 2010

do you understand?

Here's something from the vault of silly screens. It was before Halloween when I was uninstalling StarTeam. The uninstaller presented me with a screen of options. It took me a while to unravel the combination of assertions and negations and make sense of what was expected. Surely the people who designed this screen are related to those who write code like if (!true != !false).

runners

Wednesday, March 24, 2010

rubies from rediff

Ever-so-busy Amogh points me to the recent edition in Rediff's chats. This one features Malaysrilankan beauty queen Jacqueline Fernandez (of course she's part of Bollywood!). The most common thing in the chat is a greeting from every Shyam, Kamala and Tukaram who logs on. Thanks to how the slide show is now implemented, it's hard to give you absolute URLs, dear reader. Thus I must ask you to click "Next" on the first page to get to the second page. The gem arrives at the end of the page:

abdulwahab asked, Hi, Which is your favourite Hindi filim?
Jacqueline answers, I love Dev D and Devdas! Both types of cinema interest me a lot.

Monday, March 22, 2010

super power gets cycle-savvy

According to a Wired article, the Federal government of the United States of America has now decided to consider pedestrians and cyclists to be as important as motorists when deciding which projects to fund as far as infrastructure and the like (you know, roads, mass transit, rail). It's been so long since 1776 that you realise the big draw of the USA is not that the government has a better sense of what is required to improve the quality of life (communities of people instead of isles of isolation and over-emphasised privacy, connected places, more than one way to get from place to place). The big draw has always, IMNSHO, the dollar. The big bucks. Take that away and let's see what happens. Let's not even start with "health care" (what a paradoxical phrase).

Saturday, March 20, 2010

the curious case of the dog

image courtesy: indiafm.com
It happened when I was reading the Scribner hardback edition of Stephen King's Under the Dome (ISBN: 978-1-4391-4850-1). The material seemed familiar and the King flourishes abounded. I was prepared for reading what looked like a return to territory last explored in The Mist and The Tommyknockers. The trouble started in chapter 4 of the section called "the good of the town, the good of the people." I was now familiar with Julia Shumway and her 15-year old Corgi named Horace. Chapter 4 begins with her getting ready for a night walk with Horace when her cellphone rings. It's Colonel James Cox of the US Army. Page 122. The conversation is about to end when, on page 125, a strange thing happens. The dog's name changes to Hector. This transformation lasts till the end of the chapter on page 127. What started with Horace -- waiting by the door, more than ready for a nighttime expedition now that he was cleaned out and fed -- pricked up his ears and looked around at her becomes Hector continued waiting patiently by the door and At the door, Hector pricked up his ears.

[march 30, 2010]: "Are you sure you have an authentic copy?" asks Sarika. This prompts me to check Google Books. Lo! The version available there (relax, it's just a preview, you passengers of the Black Pearl) is a corrected one. Closer examination reveals that it's a Simon and Schuster illustrated edition; the ISBN's the same, but this is most likely a newer version. I guess that makes the Scribner first editions collector's items.

knock on would

PC is charged! screams the headline of an article in the Hindu in which we are told that the winner of the National Award for 2009 for Best Actress was thrilled to have found out that I am one of the youngest actresses to win the National Award. Aside from being another article that confirms the title of her next film with Vishal Bhardwaj (Saat Khoon Maaf), this fluff piece only merits mention for offering another case of abuse of would (And by the end of the year I would be doing some high-class action in the sequel of Don). Did the former Miss India say that? Would she say that? Or should we blame someone named Anuj Kumar for paraphrasing piecemeal quotes tossed to a roomful of people from the fourth estate? Would anyone really know?

Monday, March 08, 2010

the ex-wife wins

Surely a record. I'm just relieved that Cameron's Avatar didn't win the Oscar for Best Picture. It would've been their राजा हिन्दुस्तानी. Yay for Pixar (no surprise methinks) and here's hoping more people watch Near Dark and Strange Days. I knew watching Blue Steel years ago would turn out to be pivotal for me. Refreshing IMDB's main page is so much better than sitting through the ceremony

Saturday, March 06, 2010

axis2: the sequel reeks

(outpourings biased by a series of unfortunate events)

I recently returned to the natatorium of web services with the most variations of alphabet soup, the most fertile bed of specifications, some unfortunate acronyms (it's the time to DISCO ... get yourself some ROPE ... and who can forget SOAP?) and enough layers around an old idea to make it look like an adorned overfed pachyderm. The tools seemed to have improved; or perhaps they had just grown to have stronger armour to withstand the onslaught of specifications and protocols. Axis, the most popular open-source toolkit for web services had made way for Axis2. Axis2, it turned out, had decided to try and beat the WS soup nazis at their own game. It came up with its own complex design (ADB, AARs) and its own alphabet soup (an object model called AXIOM).

Getting started was not a problem, but once you started using the beast, you began to see the cracks. A simple client needed 18 JARs and notched a footprint of several megabytes. You saw all the typos (When users sends SOAP messages) and poor grammar (User care able to set his own mime-boundary string using this property) in supporting articles and in the documentation (Substract?). You also saw how careless the documentation was at times (the supporting text files for the 1.5.1 distribution contain URLs for the 1.4 distribution). You were taken aback at how incomplete (why have two articles on configuration parameters, when you could have just added some more javadoc? Then there was lack of support for enums, which is unfortunate because you just lost a clean strong way to enforce some constraints on parameter values. It's also a bit silly since J2SE 1.5 is the JDK of choice and the support for enums represented one of the most useful things that came with that version. If you wanted to try using minOccurs or maxOccurs, you were out of luck again. It all started looking like a giant step back for WS-kind.

Let's not even get started on interoperability or support for Spring. There's a very limited view of the world as far that last thing is concerned and it's a gross violation of the larger view that the developers of Spring have adopted. It's time to look at something simpler and more useful. After all, getting an elephant to guard your house soon becomes an economic problem (there's also the pachydump to consider).

(a few hours later). Oh great! Despite tall claims, Axis2 has severe problems with basic inheritance.

(a few days later). I am of the opinion that the quality of logging in any project says a lot about the quality of the project itself. This makes Axis2 suck even more. Let's start with org.apache.axis2.context.AbstractContext and scroll down to the method debugPropertySet(String key, Object value). The following block of code contains enough to send your lunch back up your throat:

log.debug("==================");
log.debug(" Property set on object " + identity);
log.debug("  Key =" + key);
if (valueText != null) {
    log.debug("  Value =" + valueText);
}
log.debug("  Value Class = " + className);
log.debug("  Value Classloader = " + classloader);
log.debug(  "Call Stack = " + JavaUtils.callStackToString());
log.debug("==================");

What a great place to practise your minimal competence in ASCII art. The fun doesn't end here. Let us turn our attention to org.apache.axis2.util.JavaUtils and specifically to the method callStackToString.

/**
 * Get a string containing the stack of the current location.
 * Note This utility is useful in debug scenarios to dump out 
 * the call stack.
 *
 * @return String
 */
public static String callStackToString() {
    return stackToString(new RuntimeException());
}

/**
 * Get a string containing the stack of the specified exception
 *
 * @param e
 * @return
 */
public static String stackToString(Throwable e) {
    java.io.StringWriter sw = new java.io.StringWriter();
    java.io.BufferedWriter bw = new java.io.BufferedWriter(sw);
    java.io.PrintWriter pw = new java.io.PrintWriter(bw);
    e.printStackTrace(pw);
    pw.close();
    String text = sw.getBuffer().toString();
    // Jump past the throwable
    text = text.substring(text.indexOf("at"));
    text = replace(text, "at ", "DEBUG_FRAME = ");
    return text;
}

Turn up the logging for org.apache.axis2 to see what I mean. Your log file will start looking like Armageddon and none of the traces will offer any useful information. The lack of respect for both performance and the usefulness of information is, however, appalling.

[march 23, 2010]: I should have just seen if Hani Suleiman had anything to say about Axis2. Guess what? He already said his piece in 2006. It's all there in the bile. If only I had read this first: I agree about the documentation, the language, the quality of code (System.out.println calls instead of logging calls; a complete lack of logging in core code, which means that I have exactly no idea what's going on behind the scenes even with the Axis2 code in front of me). Heck! I agree about everything. I wonder how the ASF let such a sub-par project into its fold. I leave you with a sample log message (some details have been removed in the interests of privacy) from the morass of one of the numerous builders floating in the source tree: Build the OMElelment obfuscatedFieldNameBy the StaxSOAPModelBuilder

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