Tuesday, May 31, 2011
the most bizarre case of lost and found
Sunday, May 29, 2011
selling seashells on the shores on bollywood
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?
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?
/**
* 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
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
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
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
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
// later is to beor a declaration of principles:
// THIS method is not calling anywhereor a declaration of the laws of the jungle:
// All transactional processing classes are responsible // for calling this method and for providing what action is providedor 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 objectsit 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 referenceshow 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
departure I: two years ago
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
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
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
the demonstrative manager
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:
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:
Monday, April 18, 2011
smart little 555
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: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
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
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:
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
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
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
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.


