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}