tag:blogger.com,1999:blog-67413662008-10-04T11:05:04.683+05:30Rajesh Jayaprakash's BlogThose who know do not blog<br/> Those who blog do not know<br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- Lao TzuRajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comBlogger1127125tag:blogger.com,1999:blog-6741366.post-3646407975851518492008-10-04T10:37:00.003+05:302008-10-04T11:05:04.693+05:30Near-Death ExperiencesThere's an <a href="http://www.hindu.com/2008/10/03/stories/2008100358262400.htm">article</a> about research into 'out-of-body' experiences in yesterday's <i>Hindu</i> (note: the online edition is a truncated version of the print article). I have been fascinated with NDE for quite some time, and so I was looking forward to knowing whether there is any conclusive evidence one way or the other. Sure enough, there is mention of an objective method to collect evidence (emphasis mine):<blockquote>I wanted to investigate if these experiences could be attributed to the drugs that we gave the patients, to abnormal levels of oxygen or carbon dioxide in the blood and <i>was there a way of verifying the out-of-body component? So I hid symbols on top of cardiac monitors at each patient's bedside which could only be viewed from an out of body perspective.</i></blockquote>That sounds promising; reading on:<blockquote>In June 2008 my book, an academic monograph, "The Near-Death Experiences of Hospitalized Intensive Care Patients: A Five Year Clinical Study" was published by The Edwin Mellen Press. The reason that I chose to publish an academic book is because I believe these experiences need to be taken seriously.</blockquote>The article then goes into the details of the study, its purported benefits, and so on, but there is no mention of whether any evidence supporting these experiences was found.<br /><br />Methinks there's no conclusive evidence; or, it's a "buy my book to find out all about it" ploy. Also, what the heck is an academic book? Has it been peer-reviewed like an academic paper?Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-62247801058482088612008-09-19T20:23:00.002+05:302008-09-19T20:53:07.961+05:30Predatory LendingJust when the whole world is waking up to the fact that too much of leverage is a bad thing, there's an ad in today's <i>Hindu</i> for home loans with a 3% down payment. The lender is none other than ICICI Bank, who is also in the <a href="http://www.hindu.com/2008/09/19/stories/2008091958420100.htm">news</a> today for the wrong reasons:<blockquote>Mr. Chidambaram pointed out that the country’s public sector banks, in which the government holds the majority shareholding, did not have any “undue exposure” and whatever they had were in accordance with the Reserve Bank of India guidelines. ICICI Bank, however, did have some exposure and it had made the necessary disclosures.</blockquote>No surprises there.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-56699879033792641422008-09-14T11:43:00.005+05:302008-09-19T20:56:10.492+05:30The Best Argument Against Democracy.. is a five minute conversation with an average voter.<br /><br />Here's a letter to <i>Deccan Chronicle</i> in favour of the Indo-US nuclear deal:<blockquote>I have been following (Brahma) Chellaney's articles on the nuclear deal. From the beginning he has been assiduously following a line quite opposite to the one held by the government. In a democratic country, every citizen has a right to express his or her opinion, and Chellaney is one among them. He, however, appears to be a diehard critic of the deal for reasons best known to him.</blockquote>Excuse me, "reasons best known to him"? Here's this guy, who has been busting his hump, wading through the text of the various documents pertaining to the deal and the NSG waiver, and putting down <i>bulleted points</i> for why he is against the deal, and we still get questions like this.<br /><br />Reminds me of the <i>Friends</i> episode where Phoebe announces that she wants to carry her brother's baby, and Ross lists a number of reasons why she needs to think this through, and Phoebe's reacts "What's your point?"<br /><br />Staying on the nuclear deal, there seems to have been a sort of realignment among the supporters and opponents. <i>Hindu</i> started out as a critic, then revised its stance, and is now once again giving prominence to things that are wrong with the deal. DC, on the other hand, started out negative, but is keeping quite nowadays -- Chellaney's columns notwithstanding -- about the various bits of bad news (no columns from Seema Mustafa, too).Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-11548032854363687492008-09-03T12:21:00.005+05:302008-09-03T13:24:00.497+05:30Of Objects, Classes and Metaclasses<i>"The greatest talents are slowly mastered"</i> (Lao Tzu)<br /><br />It started with the metaobject protocol, moved on to metaclasses, and culminated in this paradoxical statement from Wikipedia: "[T]he metaclass of Metaclass is an instance of Metaclass."<ul><li>An object is an instance of a class.</li><br /><li>A class is a singleton instance of a metaclass.</li><br /><li>A class is also an object.</li><br /><li>A metaclass is also a class (as well as an object, of course).</li><br /><li>A metaclass, being a class, is a singleton instance of a metaclass.</li><br /><li>Metaclasses are instances of the class Metaclass.</li></ul>Which, I think, leads us to the Wikipedia quote.<br /><br />Class diagram (Smalltalk-specific, with a few bits omitted for clarity; also, NumberMetaClass isn't named as such):<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_XY9cAT3hjQ4/SL455ADuS7I/AAAAAAAAABU/kkGPExvTz1Y/s1600-h/metaclass.png"><img style="cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_XY9cAT3hjQ4/SL455ADuS7I/AAAAAAAAABU/kkGPExvTz1Y/s400/metaclass.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5241690667736779698" /></a><br /><br />I started off with the profound quote from the <i>Tao Te Ching</i>, but I'm not really sure what the utility of this stuff is, unless I'm implementing a Smalltalk virtual machine. Well, I can at least sleep peacefully at night, knowing that if ever I run into the Wikipedia quote again, I know that I can figure it out. Sort of.<br /><br />Staying on the subject of objects (pun unintended), here's a delightfully candid quote from an <a href="http://www.stlport.org/resources/StepanovUSA.html">interview</a> with Alexander Stepanov (emphasis mine):<blockquote>Question: I have done a search on Lycos for your papers and I only found two titles: the STL manual and a resume of you presentation of STL to the standardization committee.<br /><br />Answer: Well, I am lazy, but not that lazy. I probably published 20 papers and a book. Many of them are on different STL sites. (Dave Musser's site probably has several.)<br /><br />Question: Which book?<br /><br />Answer: The book is "The Ada Generic Library: Linear List Processing Packages", by David R. Musser and Alexander A. Stepanov, Compass Series, Springer-Verlag, 1989. <i>It is not really worth reading.</i></blockquote>Trivia: there are 23 occurrences of the word 'class' in this post.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-88650853303998730102008-08-30T17:12:00.002+05:302008-08-30T17:53:55.816+05:30Movie Review: The Dark KnightThe first thing that comes to mind when I think of <i>The Dark Knight</i> a week after watching it is the great role played by Heath Ledger. The scene where he talks about his drunk father had me involuntarily touching my face, in anticipation of the gore that mercifully remains off-camera. All in all, a great villain. Pity we won't get to see him again.<br /><br />Batman, in contrast, is not so great. He is overshadowed in so many scenes; can't blame him really, when you have folks like Michael Caine and Morgan Freeman as co-stars (not to mention The Joker).<br /><br />The movie may be topical for an American audience, in that it explores things like how too much focus on security could lead to fascism, what people are willing to sacrifice for their personal safety [*], and so on, but these things are of not much interest to somebody who is just looking for a good action movie.<br /><br />One thing that strained the credibility a bit was the power wielded by the Joker, and how he gets access to all the resources that he commands. Would have been easier to believe if he were a traditional comic book villain with superpowers or a super-weapon.<br /><br />Oh, I've mentioned this <a href="http://shikantaza.blogspot.com/2006/07/movie-review-superman-returns.html">before</a>, but what's with these superhero movies where people are not able to put two and two together and figure out that the caped crusader bears a more than passing resemblance (mask notwithstanding) to the well-known local billionaire?<br /><br />[*] The denouement of the ferry scene, while inducing the intended swelling of hearts in the audience, seemed a trifle contrived. Maybe it's just the cynic in me.<br /><br />P.S. The high-tech kidnap scene in Hong Kong would have looked more natural in a Bond movie or in an MI sequel, IMO.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-70682467115637439382008-08-29T22:28:00.006+05:302008-08-29T22:59:08.955+05:30WTF?I received this in an email from Citibank (italics mine):<br /><blockquote>Dear Customer,<br /><br />When did you last abandon the boardroom in pursuit of play? Forsaken corporate schedules in favor of a holiday itinerary? Swapped your starched suit for <i>a glowing tan?</i><br />...</blockquote>Dear Marketroid, if you click on the 'Profile' link on the top right hand corner of this page, you will see my picture. Please note that I am a dark-skinned Indian, and that a 'glowing tan' is the last fricken thing on my mind. Considering the fact that the email was sent from 'india.marketing@citi.com', you guys will have to either a) stop mindlessly using copy from your international marketing *ahem* collateral or b) kindly remind your copywriters that, while they are enamoured with all things western, it wouldn't hurt them to reflect once in a while on the fact that they are in <i>India</i>, where people buy Fair and Lovely, not Coppertone.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-78429187085671703042008-08-23T12:40:00.003+05:302008-08-23T12:59:00.596+05:30Lisp or Smalltalk?I have been thinking about doing all my side projects in Lisp -- due in no small measure to taking the time to finally read <i>Practical Common Lisp</i> cover to cover -- and have been playing around with the various Lisp environments and libraries. Impressions:<br /><ol><li>Programming in Lisp makes one feel good (I know, this is about as touchy-<span class="blsp-spelling-error" id="SPELLING_ERROR_0">feely</span> as you can get). The constant effort to abstract things away, looking for ways to automate repetitive code fragments, and so on brings with it a real sense of progress (at least from a programming perspective).</li><br /><li>Though Lisp shares the concept of an image with Smalltalk, this is not as readily apparent and IMHO as powerful as Smalltalk; for example, I need to load packages through <span class="blsp-spelling-error" id="SPELLING_ERROR_1">startup</span> files each time I start the environment.</li><br /><li>The Lisp environments are not as friendly as the Smalltalk <span class="blsp-spelling-error" id="SPELLING_ERROR_2">IDEs</span> where everything hangs together, so to speak.</li><br /><li>Library support also seems more cohesive in Smalltalk. <tt><span class="blsp-spelling-error" id="SPELLING_ERROR_3">asdf</span>-install</tt> does provide a way to pull packages easily, but there is no way to see what packages are currently installed in the image, what *are* the 'right' packages to install, etc. Not to mention the need to load packages every time using the <span class="blsp-spelling-error" id="SPELLING_ERROR_4">startup</span> file.</li><br /><li>File-based development seems like a regressive step after programming in Smalltalk. For one thing, I don't know if there is an easier way to load the code from all my files than calling <tt>load</tt> every time I start the environment.</li><br /><li>I have a small homegrown wiki application running in <span class="blsp-spelling-error" id="SPELLING_ERROR_5">VisualWorks</span> which I wanted to see if I could redo in Lisp. After googling a bit and searching the Common Lisp web sites, two frameworks seemed worth pursuing: <span class="blsp-spelling-error" id="SPELLING_ERROR_6">WebActions</span> (modelled on Struts) and <span class="blsp-spelling-error" id="SPELLING_ERROR_7">Weblocks</span> (a Seaside-like continuations-based framework). <span class="blsp-spelling-error" id="SPELLING_ERROR_8">Weblocks</span> seems the more promising, no doubt owing to the advantages of using continuations.</li></ol>From a programming perspective, I guess it does not really matter whether I choose Lisp or Smalltalk (unless I run into a situation where the use of macros is the only way to get something done), but Smalltalk does score from a convenience perspective. I think I'll stick with ST.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-50650634610580816412008-08-11T22:37:00.003+05:302008-08-11T22:48:58.194+05:30Joke of the dayFrom a Slashdot <a href="http://developers.slashdot.org/comments.pl?sid=641619&amp;cid=24551513">comment</a>:<blockquote>Where did you get your php info? foreach was introduced in PHP4...<br />I get mine from phpinfo();</blockquote>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-90755946677199714202008-08-09T10:21:00.002+05:302008-08-09T10:28:53.129+05:30Can you spell 'frame-up'?From an <a href="http://www.hindu.com/2008/08/09/stories/2008080955100900.htm">article</a> in <i>The Hindu</i> about Aafia Siddiqui:<blockquote>...Ms Siddiqui was arrested by Afghan police in July along with her son — the date is unclear — after they found them loitering outside the compound of the Governor’s house in Ghazni. They questioned her, and on suspicion, checked her bag, in which they allegedly found “suspicious” liquids in glass containers, a bomb-making manual, and some material on New York and its landmarks. She was handed over to the U.S. authorities on July 17.<br /><br />On July 18 , Ms Siddiqui is said to have fired at American soldiers who were present at the Afghan facility where she was being held, with a rifle that one of the soldiers had left lying around. A soldier fired back, wounding her. Charged in a criminal complaint filed in the Southern District of New York with one count of attempting to kill U.S. officers and employees and one count of assaulting U.S. officers and employees</blockquote>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-72273983261013933962008-07-26T11:09:00.003+05:302008-07-26T11:16:16.223+05:30Just SayingAmazon has released <a href="http://status.aws.amazon.com/s3-20080720.html">information</a> about the cause of the recent S3 outage and what they are doing to ensure that their "performance is statistically indistinguishable from perfect":<blockquote>Here are the actions that we're taking: (a) we've deployed several changes to Amazon S3 that significantly reduce the amount of time required to completely restore system-wide state and restart customer request processing; (b) we've deployed a change to how Amazon S3 gossips about failed servers that reduces the amount of gossip and helps prevent the behavior we experienced on Sunday; (c) we've added additional monitoring and alarming of gossip rates and failures; and, (d) we're adding checksums to proactively detect corruption of system state messages so we can log any such messages and then reject them.</blockquote>Except for (d), these actions don't really address the cause, but only mitigate the effects.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-67788343127466142382008-07-24T23:10:00.005+05:302008-07-25T19:19:42.870+05:30Quicksort in LispVersion #1:<tt><pre>(defun generate-lt (value)<br /> (lambda (x) (and (< x value) (list x))))<br /><br />(defun generate-eq (value)<br /> (lambda (x) (and (eq x value) (list x))))<br /><br />(defun generate-gt (value)<br /> (lambda (x) (and (> x value) (list x))))<br /><br />(defun quicksort (list)<br /> (if (<= (length list) 1)<br /> list<br /> (let ((pivot (nth (truncate (/ (length list) 2.0)) list)))<br /> (append (quicksort (mapcan (generate-lt pivot) list))<br /> (mapcan (generate-eq pivot) list )<br /> (quicksort (mapcan (generate-gt pivot) list))))))</pre></tt>Duplication of code in the 'generate-' functions. Need a macro.<br /><br />Version #2:<tt><pre>(defmacro generate-comparator (value fn)<br /> `(lambda (x) (and (,fn x ,value) (list x))))<br /><br />(defun quicksort (list)<br /> (if (<= (length list) 1)<br /> list<br /> (let ((pivot (nth (truncate (/ (length list) 2.0)) list)))<br /> (append (quicksort (mapcan (generate-comparator pivot <) list))<br /> (mapcan (generate-comparator pivot eq) list )<br /> (quicksort (mapcan (generate-comparator pivot >) list))))))</pre></tt>Looks elegant, but can we make this even more concise?<br /><br />Version #3:<tt><pre>(defun quicksort (list)<br /> (if (<= (length list) 1)<br /> list<br /> (let ((pivot (nth (truncate (/ (length list) 2.0)) list)))<br /> (append (quicksort (mapcan (lambda (x) (and (< x pivot) (list x))) list))<br /> (mapcan (lambda (x) (and (eq x pivot) (list x))) list)<br /> (quicksort (mapcan (lambda (x) (and (> x pivot) (list x))) list))))))</pre></tt>Seven lines of condensed confusion. Not to mention wreaking havoc with the layout of the blog.<br /><br />(Blog post inspired by a) a rekindled interest in Lisp and b) a sudden urge to share the joy of having found a non-gratuitous use for macros)<br /><br /><b>Update:</b> Version #4:<tt><pre>(defun quicksort (list)<br /> (if (<= (length list) 1)<br /> list<br /> (let ((pivot (first list)))<br /> (nconc (quicksort (remove-if #'(lambda (x) (>= x pivot)) list))<br /> (remove-if #'(lambda (x) (not (= x pivot))) list)<br /> (quicksort (remove-if #'(lambda (x) (<= x pivot)) list))))))</pre></tt>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-16275477693630466692008-07-19T21:53:00.003+05:302008-07-20T00:19:28.688+05:30Who Moved My Chees(y Distro)?[Warning: boring post about Linux <span class="blsp-spelling-error" id="SPELLING_ERROR_0">distros</span>]<br /><br /><span class="blsp-spelling-error" id="SPELLING_ERROR_1">Kubuntu</span> has been my <span class="blsp-spelling-error" id="SPELLING_ERROR_2">distro</span> of choice for more than a year; I had reached a point where the download-new-<span class="blsp-spelling-error" id="SPELLING_ERROR_3">distro</span>-spend-a-week-tweaking-it was no longer appealing. Every once in a while the urge to go <span class="blsp-spelling-error" id="SPELLING_ERROR_4">distro</span>-hopping would hit, but the comfort zone of status <span class="blsp-spelling-error" id="SPELLING_ERROR_5">quo</span> would prevail.<br /><br />But the cheese did move one day: <span class="blsp-spelling-error" id="SPELLING_ERROR_6">KNetworkManager</span> would drop connections at random, not remember the wireless router's <span class="blsp-spelling-error" id="SPELLING_ERROR_7">SSID</span>, and so on, and things got fairly annoying. Not to mention the fact that things were, on the whole, not as zippy as they used to be. Time for a change.<br /><br />I decided to give <span class="blsp-spelling-error" id="SPELLING_ERROR_8">OpenSuse</span> 11.0 a try. After a few false starts with the ISO download (see problem with <span class="blsp-spelling-error" id="SPELLING_ERROR_9">KNetworkManager</span> above), <span class="blsp-spelling-error" id="SPELLING_ERROR_10">SuSE</span> was up and running, but no go. What with my <a href="http://shikantaza.blogspot.com/2008/05/kde-40.html">peeves</a> with <span class="blsp-spelling-error" id="SPELLING_ERROR_11">KDE</span> 4.0 and the problems with the Java plug-in (1.5 would crash <span class="blsp-spelling-error" id="SPELLING_ERROR_12">Firefox</span> while 1.6 would make the applet disappear after one or two operations), I quickly abandoned it.<br /><br />I have <a href="http://shikantaza.blogspot.com/2007/04/mepis.html">tried</a> out <span class="blsp-spelling-error" id="SPELLING_ERROR_13">MEPIS</span> in the past, and except for the sound problem found it to be very good. True enough, 7.0 turned out to be equally good, but the sound problem seemed to have been carried over from 6.5. But this time a quick <tt><span class="blsp-spelling-error" id="SPELLING_ERROR_14">modprobe</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_15">snd</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_16">hda</span>_<span class="blsp-spelling-error" id="SPELLING_ERROR_17">intel</span></tt> took care of it (Did I try this before? Not sure), and so here I am, with <span class="blsp-spelling-error" id="SPELLING_ERROR_18">SimplyMEPIS</span> 7.0 as the <span class="blsp-spelling-error" id="SPELLING_ERROR_19">distro</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_20">de</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_21">jour</span> (well, not exactly a day -- I plan to use it for at least six months).<br /><br />Good things about <span class="blsp-spelling-error" id="SPELLING_ERROR_22">MEPIS</span>:<br /><ol><li>Very zippy</li><br /><li>Comes with a lot of stuff already bundled, so you don't have to look beyond the CD for things like the Java <span class="blsp-spelling-error" id="SPELLING_ERROR_23">Runtime</span>, <span class="blsp-spelling-error" id="SPELLING_ERROR_24">Skype</span>, etc.</li><br /><li>Better handling for wireless (<span class="blsp-spelling-error" id="SPELLING_ERROR_25">KNemo</span> in place of <span class="blsp-spelling-error" id="SPELLING_ERROR_26">KNetworkManager</span>)</li></ol>The not-so-good things:<br /><ol><li>Some of the bundled packages are slightly outdated (<span class="blsp-spelling-error" id="SPELLING_ERROR_27">Firefox</span>, <span class="blsp-spelling-error" id="SPELLING_ERROR_28">Postgres</span>)</li><br /><li>I found some random weirdness with the mounting of other partitions. For some reason I couldn't get them to mount on a directory I had created in the root partition. Instead, I had to allow them to be mounted as /<span class="blsp-spelling-error" id="SPELLING_ERROR_29">mnt</span>/<span class="blsp-spelling-error" id="SPELLING_ERROR_30">sda</span>*, and then create a <span class="blsp-spelling-error" id="SPELLING_ERROR_31">symlink</span> to this directory.<br /></li></ol>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-45148755582732391282008-07-13T09:46:00.002+05:302008-07-13T10:25:22.190+05:30Put a Shark in Your TankThere's this story about how Japanese fishermen put small sharks in their fish tanks to keep the fish fresh and better-tasting till they reach the shore. A Google search for the title of this post will give you the full story.<br /><br />I have nothing against this story -- kudos to the Japanese fishermen for solving their problem in an innovative manner. What I do take exception to is holding up this story as motivational lesson:<blockquote>Instead of avoiding challenges, jump into them. Beat the heck out of them. Enjoy the game. If your challenges are too large or too numerous, do not give up. Failing makes you tired. Instead, reorganize. Find more determination, more knowledge, more help. If you have met your goals, set some bigger goals. Once you meet your personal or family needs, move onto goals for your group, the society, even mankind.<br /><br />Don't create success and lie in it. You have resources, skills and abilities to make a difference." So, put a shark in your tank and see how far you can really go!</blockquote>That's all very well, but there's another -- admittedly pessimistic -- way of looking at it, from the perspective of the poor fish: no matter what you do, nothing matters in the end; you will end up getting eaten anyway, so you might as well surrender to the shark and get it over with ("Oh, these poor humans will end up with not-so-great-tasting fish? Bite me").<br /><br />Also, just because the fish taste better, it doesn't mean that they had a hoot, trying to save their asses from the %^&amp;# shark.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-80273924325592246292008-07-06T12:05:00.002+05:302008-07-06T12:21:16.346+05:30Something to Think About"Have you imagined commodities like steel, crude oil, red <span class="blsp-spelling-error" id="SPELLING_ERROR_0">chilli</span>, pepper and gold is [sic] a highly potential [sic] investment option. Read on to see why? [sic]" begins an ad in <span style="font-style: italic;">The Times of India </span>today. It goes on to quote figures like 47.58% for cardamom, 25.22% for gold, and 23.80% for crude as the returns in the derivatives market for these commodities, and pitches for a training course on derivatives.<br /><br />Two points:<br /><ol><li>Per a <a href="http://hsgac.senate.gov/_files/SenatePrint10965MarketSpecReportFINAL.pdf">report</a> by a United States Senate subcommittee entitled "The role of market speculation in rising oil and gas prices", a speculator 'does not produce or use the commodity, but risks his or her own capital trading futures in that commodity in hopes of making a profit on price changes.'</li><br /><li>The folks who enroll for the above mentioned course are already suffering from the actions of people whom they are trying to emulate ("I guess I'll have to take the public transport to attend the classes because petrol is so expensive these days. Those ^&amp;*$ speculators!").</li></ol>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-35400030521408426282008-06-28T12:07:00.003+05:302008-06-30T21:17:10.539+05:30Here's an idea for a startup project<p>I was (re)reading Paul Graham's older essays [*], and was thinking about his contention that one can get ideas for <span class="blsp-spelling-error" id="SPELLING_ERROR_0">startups</span> just by reading a business newspaper for a week.</p><p>Well, I didn't do that, but here's an idea all the same.</p><p>The IT Department has taken to electronic filing of tax returns in a big way, and have published an XML schema for this, in addition to launching web services for consuming the electronic filings.</p><p>I have been using this system for filing my returns, and have found the procedures in place quite cumbersome -- last year it was <a href="http://shikantaza.blogspot.com/2007/07/filing-your-tax-returns-online.html">Adobe Reader</a> , with all its quirks and bugs, while this year it's an Excel document that serves the same purpose, though not very well.</p><p>Now, if somebody comes up with a tool that does this job in a more user-friendly manner, I'm sure there would be takers. Mind you, the tool would not be very complicated, so one cannot charge more than, say, 50 bucks for it, but there's still some money to be made.</p><p>There is already a web-based solution for this (<span class="blsp-spelling-error" id="SPELLING_ERROR_1">taxsmile</span>.com), but it involves storing your personal finance data in somebody <span class="blsp-spelling-error" id="SPELLING_ERROR_2">else's</span> servers. The tool I have in mind will be a purely client-side solution, one that will simply take your data and create an XML version of it that you can upload to the IT department's website yourself. What the hell, one might even go all the way and put in the functionality to upload the XML file as well.</p><p>Things like piracy, ease of installation (think applets) are to be worked out, but hey, this is just a blog post, not a pitch to a <span class="blsp-spelling-error" id="SPELLING_ERROR_3">VC</span>.</p><p>[*] I know, I said earlier that I had stopped reading them, but his essays keep appearing on <span class="blsp-spelling-error" id="SPELLING_ERROR_4">Reddit's</span> front page, and let me be honest -- he does write well, and makes you question a lot of things.</p>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-74660197778320661522008-06-28T12:03:00.001+05:302008-06-28T12:06:59.733+05:30Dave's Back... and with some <a href="http://davesweb.cnchost.com/nwsltr92.html">good stuff</a> as usual:<blockquote>I guess I need to pause here briefly to fend off a barrage of e-mails railing against my ‘racist’ reference to Barack Obama as a “whitish black guy.” For the record, I am not suggesting here that a black man cannot be articulate and well groomed. No, what I am suggesting is that what is fundamentally racist here is the fact that Mr. Obama is universally referred to as “Black” or “African-American” despite the fact that, according to my exacting mathematical calculations, he is actually precisely ½ black and ½ white. Wouldn’t it then be just as accurate to refer to Obama as “White” or “European-American”? Why is he disqualified from inclusion in the Caucasian ‘race’ even though he is every bit as white as he is black? In labeling him as “black,” aren’t we really saying that his bloodline is tainted? Aren’t we saying that, even though he has Caucasian blood, it isn’t pure enough for inclusion in the Master Race?</blockquote>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-48537941019373556112008-06-28T11:49:00.002+05:302008-06-28T12:00:22.011+05:30Two Words for Paul Krugman: Um, No.I am usually in agreement with Paul Krugman's views, but not with this one:<blockquote>What about those who argue that speculative excess is the only way to explain the speed with which oil prices have risen? Well, I have two words for them: iron ore. <br /><br />You see, iron ore isn’t traded on a global exchange; its price is set in direct deals between producers and consumers. So there’s no easy way to speculate on ore prices. Yet the price of iron ore, like that of oil, has surged over the past year. In particular, the price Chinese steel makers pay to Australian mines has just jumped 96 per cent. This suggests that growing demand from emerging economies, not speculation, is the real story behind rising prices of raw materials, oil included.</blockquote>If the emerging economies continue to grow at more or less the same pace as for the last two or three years (and, in fact, are even slowing down, like in the case of India), where is this alleged "growing demand" coming from?Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-28828111369150490102008-06-26T09:10:00.003+05:302008-06-26T09:20:48.634+05:30Germany 3 - 2 Turkey... and <span class="blsp-spelling-error" id="SPELLING_ERROR_0">Semih</span> <span class="blsp-spelling-error" id="SPELLING_ERROR_1">Şentürk</span> can <span class="blsp-spelling-error" id="SPELLING_ERROR_2">STFU</span> at last. Maybe it's just me, but I found his repeated gesture of putting his finger to his lips and 'silencing' the opposite team's fans after scoring a goal incredibly obnoxious.<br /><br />BTW, the loss of pictures from the stadium from the 75<span class="blsp-spelling-error" id="SPELLING_ERROR_3">th</span> minute or so onwards, just when things got interesting was, well, unique.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-73280696850254184332008-06-22T12:54:00.002+05:302008-06-22T13:01:13.886+05:30Hilarious<a href="http://www.nytimes.com/2008/06/21/opinion/21collins.html?hp">Gail Collins</a>:<blockquote>... picking a running mate is -- no disrespect intended -- like picking a pet. How much time are you planning to spend with the little fellow? How much exercise will he be getting on an average day? On the extreme, you have the William Wheeler model ("There's the living room. Go find a corner and sleep in it") On the other end, there's the Cheney version in which the pet takes over the chequebook, diversifies the family investment portfolio and starts strafing at the neighbour's cat.<br /></blockquote>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-32257882545646879132008-06-22T09:19:00.005+05:302008-06-22T09:26:55.861+05:30There's a place for one-touch passing... and it isn't in front of your own goal. When you have the opposite team's fowards breathing down your neck, the safest thing to do is to boot the ball, and hard.<br /><br />I'm referring to the Russians. Not that they came to grief because of this, but they did make their supporters' hearts skip a bit. Having said that, to thrash a team as strong as the Netherlands with such delightful one-touch passing <span style="font-style: italic;">is</span> something special.<br /><br />Arshavin is going places next season, no doubt about it.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-44212822752449458592008-06-21T09:48:00.005+05:302008-06-21T20:57:08.326+05:30Yeah, That'll Do ItFrom <a href="http://www.hindu.com/2008/06/21/stories/2008062157870100.htm">The Hindu</a>:<blockquote>...the general apprehension is that of yet another bout of monetary policy tightening by the RBI - which could lead to increases in lending rates with respect to automobile, housing and consumer loans.</blockquote>New loans will become dearer, alright, but how's this going to have a direct bearing on the family budget? OK, I get it, below-poverty-line families thinking about buying a car, a house, or a flat-screen TV will balk at the high EMIs, and will therefore have more disposable income to spend on luxuries like food, thereby offsetting the pinch of higher prices. Bottom line is, this will not have a first order impact on inflation: the fuel prices hike is too much of a countervailing force on the other side.<br /><br />On a side note [*], now that the inflation rate has reached truly alarming levels, the captains of industry have <a href="http://www.hindu.com/2008/06/21/stories/2008062155341500.htm">woken</a> up. Not out of concern for the common man, but about sustaining economic growth:<blockquote>Inflation is not only a concern for the government but also a concern for the industry.. [the unabated rise in prices] reduces the space for fiscal and monetary policy maneuverability without seriously impacting growth.</blockquote>[*] Come to think of it, the concern over a rise in lending rates for say, flat-screen TVs, actually ties in with the worry about sacrificing economic growth. Silly me.Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-6695291329777205862008-06-21T09:44:00.002+05:302008-06-21T09:48:03.193+05:30Quote of the DayFrom a letter in today's <span style="font-style: italic;">Hindu</span>:<blockquote>The message that is loud and clear is: if you want a free helicopter ride plus your photo on the front page of national newspapers, sit tight on the main railway track and hold the nation to ransom.</blockquote>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-30235825291901529522008-06-20T21:03:00.002+05:302008-06-20T21:08:59.101+05:30Spot the IronyObama has to vehemently deny the 'slur' that he's a Muslim, while the EU is being <a href="http://www.iht.com/articles/2008/06/18/opinion/edcohen.php">chastised</a> for blocking Turkey's entry into the Union:<blockquote>All this is wrong-headed. Turkish membership of the EU is important - Bush is right about that - for historical reasons as overarching as Europe's debt to the nations Yalta imprisoned. No more important bridge could be forged at this moment between the Christian and Muslim worlds.</blockquote>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-57116165644712283662008-06-19T20:14:00.002+05:302008-06-19T20:44:36.795+05:30Fsck You FridaysDear cubicle dweller,<br /><ol><li>Tired of having to put up with colleagues who refuse to respond to your emails unless you copy their supervisor in the email and/or tag a return receipt notification?</li><br /><li>Do you feel like smashing your fist on the face of the punctilious jerk who a) rejects your IT request form because you had selected the wrong category and b) refuses to respond to emails asking him to enlighten you as to what the <span class="blsp-spelling-error" id="SPELLING_ERROR_0">fricken</span> correct category is?</li><br /><li>Are you sick of HR folks whom you talk to 24 hours ago about your problem, but who feign complete loss of memory and ask you to start from the beginning all over again?</li></ol>Fret no more, because '<span class="blsp-spelling-error" id="SPELLING_ERROR_1">Fsck</span> You Fridays' is here. Every Friday, between 3 and 4 PM, one workstation on each floor will be open to you and your fellow cube-dwellers for you to express your unalloyed love for the above-mentioned folks. Just walk up to the screen, type in the employee number of the person you would like to bless, a short description as to why you love them, and press 'Submit'. The object of your affection will instantly receive a missive (anonymous, of course) that encapsulates your sentiments, accompanied by a cheap plastic hand (life-sized) performing a one-finger salute.<br /><br />Thrilled? Jumping with joy? Wait, there's more. Employees winning more than ten tokens of affection in a month will be entered in a monthly 'Screw You Sundays' raffle where...<br /><br />Regards,<br />Corporate Cross Functional Team on Motivation and Employee Empowerment (<span class="blsp-spelling-error" id="SPELLING_ERROR_2">CCFTMEE</span>)Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.comtag:blogger.com,1999:blog-6741366.post-34208828854672830102008-06-19T19:10:00.005+05:302008-06-20T09:06:04.989+05:30RESTI have been coming up to speed on REST for the last couple of days or so. Some obvious and some not-so-obvious things I've learned:<br /><ol><li>REST may be the architectural style on which the World Wide Web was built, but it's not exactly tailor made for web applications (accessed by humans from browsers).<br /></li><br /><li>Since REST favors a stateless mode of interaction, transactions will have to be done outside REST (not even sure if this is possible), or we'll have to treat each service invocation as atomic, and build compensating transactions a la BPEL.<br /></li><br /><li>REST mandates that we model the application in terms of resources and representations. Not sure how well can this be mapped to the domain we are modeling. It's easy to say 'think in terms of resources, not services', but dressing up an itinerary creation service as an itinerary creator object (sorry, resource) doesn't cut it, IMHO.</li><br /><li>We need an HTTP client to program to a REST service; support for PUT/DELETE in browsers is not available (yet?). Don't know whether this can be done in JavaScript.</li><br /><li>If we want to architect a web application whose service layer is implemented in REST, we will need two web/application server layers -- one to receive the request from the browser client, and another that actually implements the service. The two layers can be collocated, of course.<br /></li><br /><li>This is a minor nit: since one of the strengths of REST is the uniform interface, there is no interface specification (equivalent of WSDL), and we cannot generate the service invocation code automatically.</li><br /><li>More network traffic as we need to transport more information to the service because of its statelessness.</li><br /><li>Authentication information needs to be sent with each request. This implies that the first layer in point #5 will have to manage the session data if it is servicing a user logged in from the browser application. The scalability benefits are therefore not available to this layer.</li><br /><li>Issues like locking, concurrency, etc. seem tricky. I haven't thought this through yet, but off the top of my head, things like including a timestamp field in the representation seem necessary.<br /></li></ol>Rajeshhttp://www.blogger.com/profile/01090559031779713831noreply@blogger.com