Sunday, November 30, 2008

a = a + b; b = a - b; a = a - b;

“Macha the dal in the microwave is done. The palak in the bowl on the table seems thawed enough, most of the ice has melted. Take a third bowl, put the dal in it, put the palak in the microwave bowl, and set it for 3 min.”

“Cha, if we could XOR swap the dal and palak we wouldn't need a third bowl da.”

As Charles ‘Peanuts’ Schulz said, "Happiness is a warm Nai." (and a hungry Nikhil and TS).

The title is the poor man’s swap program. It interchanges the values of ‘a’ and ‘b’ without using a third variable. The XOR swap does exactly the same thing, but the incisively analytical reader would of course prefer the XOR swap because it sounds cooler :-)


Wednesday, November 19, 2008

From Paduvarahalli to Palo Alto

Hello! It's been a while, so long that the very ground beneath our feet seems to have moved on. I once again take refuge in a disorganized cud of ruminations, and hope you'll think I'm too cool for a well thought-out structure.


If was asked to define one word that ruled life here, I'd choose trust. You're trusted to be honest on an assignment. You're trusted to hold yourself from taking a peek from your neighbor's paper. You're trusted to be up-to-date with what's happening in class. And as a friend of mine very succinctly remarked, Trust is a sharper whip than Regulation. While all that makes life calm, nice, fair and all that, it also makes it hair-raisingly boring. No longer do profs devise devious schemes to ensure people attend class, and stay in class and not go escape out the back door. No longer do dispassionate students take a screenshot of the desktop in the class computer, set that as the wallpaper, and hide all icons and the start menu with the selfless aim of having the prof relish the joy of a rock-steady desktop. No Good Samaritans to help the prof improve his mental skills by inverting the desktop. No longer do students need to activate cross-departmental spy networks to steal the BT101 PPTs. No more keyloggers or late-night heists of MMM's slides.

No more do resourceful young men have the grave responsibility of regretfully ending the rapture of a Mantech class by ringing a cycle bell. No longer do students with a bent for experiment write 'Amitabh Bachchan' on attendance sheets passed in class as a necessary and sufficient test to determine if the prof/TA merely counts names or reads them (and consequently, no more opportunities for profs to flamboyantly scratch their invisible beards and claim they are Gabbar Singh). If such a plague of preparedness (for exams) had struck back home, gentle reader, even the ever-dependable Ganga gumbal wouldn't have been able to finger out Savitha Bhabhi the night before Rocket Ramamurthi's exam from the depths of being just another corny sex comic, and single-handfist-edly raise it to the status of Art that defin(l)ed our Age. Can you imagine the horror of how much humanity would have missed? Can you?


There is a new social phenomenon here at Wal-mart, something I've never heard of from any of my friends in the Midwest (praised be its petite babes and even more petite rents). There you are, keeping your peace and shopping like any normal person, and just like any normal person, deeply contemplating on which brand of electronic mirror washing machine lubrication oil thinner will bring you Happiness. And suddenly!! The hairs on the back of your neck start to prick! Alert! Danger! But everything seems all right, just another aisle of dog tail flea neutering booster allergy relieving cream solvents [1]. And then it pricks again!! Harder this time! OMG! OMGWTFLOLBBQ!!!!11!!oneone!-exp(i*pi)!! even! You suddenly notice that that a dreaded Desi Networker (Dementors are to Desi networkers as Karan Johar movies are to Ekkkta KѬç極خkapoor serials: Both suck all happiness out of your life. One will ravage you and pass on, but the other is an eternal curse upon humankind) following you through all the aisles! Alert! Help! Man the lifeboats! Women and children first! ...---... ! ...---...!@#$%^&*() even! But you can't do anything! You're trapped like a mouse! A mouse in a formerly-pondy-playing-but-now-not-responding MPlayer fullscreen window in CAD lab when Raja Rao is coming your way!

He smoothly walks over to the aisle you are in, and starts looking at the same product as you. You've been smiling and making eye contact with firangs for the past few weeks now (in n00b hopes that you will one day puts with a firang chick, with Eyes As Blue As The Fairy Flax And Her Cheeks Like The Dawn Of Day. And Her, let's not get naughty here.) , and your powers of making people seem invisible, so masterfully honed back home, are weak. So you make eye contact. Poof! Abracadabra! Hocus Pocus! Off starts a delicate socio-economic analysis of 'how these people are giving so less price for so high quality product no?' [in the background, some operator's kept her finger on the PA system switch, and you hear an angry customer say that his microwave turntable didn't even live to swing a full rotation before it smoked], but he goes on and doesn't stop till he's collected your phone number, email, home address, salary, social security number, marriage plans and horoscopes, bank account numbers, spare Will signatures, 401(k) withdrawal permissions, etc. It is, of course, implicit that he will collect-call you at least 40 times every week to offer you unbeatable job offers, best stock picks, finest restaurant discounts, marriage brokerage services and give-when-you-live organ donation collection drives. You, surely, welcome all this with a light heart and a lighter purse for you are but two homesick brothers in a harsh cold faraway land. Which kind of treasonous deshdrohi spurns an opportunity to exchange sensitive personal information with newly-forged kin? The very thought!


There was a heinous aspersion cast upon the spotless singledom of my roommate and I by some notorious anti-social elements. The enormity ran thus:

Have I told you that the NRI undergrad chicks are superhot? Well they are. And it is not just here, all around. Was speaking to KVM the other day and even he agrees ( apparently Nikhil and KVM and all are trying for some hot NRI chick in [place blanked out to prevent unnecessary extra competition] ).

Tell me, gentle reader, what is a steadfastly solo man to do when his dedication to being the One is thus basely attacked? Why, compose a harangue in a language that won't jeopardise further efforts to hit on the girl, of course! So I beg to humbly submit for your kind perusal this BTP thesis which is 29 weeks past its deadline DANG wrong window this reply I wrote to a friend of mine in a chat. It's in pure Kannada, and I truly regret that I cannot give you a wee babelfish if you do not understand that noble tongue. Please don't go away, but instead hop over to the next paragraph.

And now for this heartrending tale of woe that was the meat of my rebuttal: Namagelli guru aa bhaagya? MunDedu, ondu baareeno mukha-noo torisilla, dove gati benki haaka. Route-ella perfect-aagi ittu, 80s low budget Kannada philm tara. First naavu nam paadige mane munde osi hodita idvi. Aavaga yaavano 40-ish haida bandbittu intro kotta. 'Hello, my name is ***, my daughter is just coming to study here' and talked very nicely and all. Naavibbaru, bhale biddanalla buttige maava anta sikkapatte yarrabirri pseud haakbitvi. Nenaskondrene mai jhum annatte, ashtu sahasravarnada chitra roopisibitvi IIT bagge. Avaru aa kade side-ge hoda tatkshana we ran back home and got her complete bio [searching for her in the univ directories was an adventure by iself because of her name's spelling, but that is a tale for another day. I shouldn't disrupt the shoka rasa of this conversation with the curiosity (jignyasa?) rasa]. Anyway, we mugged everything about her, right from her pet cats' names, her favorite leaves, her opinion on trout poaching in Norway, and other vitally important foundations for a relationship. HeLabeku andare nodakku ashtenu adhvanavagiralilla... ondondu angle alli chennagidlu anta noo heLabahudeno. Irali, so ibbaru datasheet itkondu, aakashadinda dharegeLida rambhege kaayta iddare, chandanada gombe tara aavi aagbitlu, classes shuru aada tatkshana. Moor hottenu, aar hottu mane ella khidaki-gu curtains-u.. aa 'mere samnevali khidki mein' song baredavanu, be***si nanna maga, avanige ee tara aagabekittu, avaaga baritiddaneno love song-anna. Chaand ka tukda full moDadalli muchi muLigihoyitu. Naaveno adige-nalli nipuNaru, naLa-ne [of naLa-damayanti fame] tattarisi murche-hogoshtu chennagi adige ballavaru, yah-kashchit sundara-NRI-rupavati-yuvati coma-ge hogibidabeku antha enella potluck plans maadidvi. By chance enadaru nam vayyari ildiro adaa haakidre aakbutre? Fatak! antha 'En bulbul, maathaadsakkilva?' antha nam Ambreesannan dialogue-u practice madiddvi. aadre munDedu horage barolla annutte! Gollum tara navibbaru-nu 'my preciousss' andkondu Facebook stalking maadkond iddivi, ashte. Aavaga-aavaaga ketta kanasalli kaado kateri taraha Nikhil-ge kitakinalli kaanistaalante.. paapa, eshtu sarti samadhana madidino avanige. Enu madodu maga, hudukidaru obbaLu lakshanavaada, soubhaagyavati kaLe iro Hot White Chick sigolla. By chance kannige chalesha (cataract) bandu mohada mankuboodinalli muchihogi aa mODi-nalli aa tara yaaradaru kaaNisi avaLige intro kodakkehodare, avaLa hesaru "Quing Ching Da Ding" andubidtaLe.. haaLu kivi ge cataract barolve, enu madodu ?


And that, dear reader, is the story of our Second Coming. Everything's not all rosy all the time, though, and on your way back from the lab late on a cool night, beside an exquisitely crafted arch overlooking a mile-long line of delicately planted palm trees, with a huge half-risen yellow moon that makes you think just for a moment that Dreamworks' intro video is maybe not so unreal, then, all alone in every possible layer of meaning the word has, it hits you: There is life, and there is grad life. And Laplacian(life). And as men who have seen it all have sung: Long you live and high you fly, smiles you'll give and tears you'll cry, all you touch and all you see, is all your life will ever be.


[0] - The title is lifted straight from Churumuri's What is Churumuri? page, but it's not plagiarism because it's true! My ancestral home is in Paduvarahalli, a suburb of Mysore :-)

[1] - I sorely miss the existence of a formal Bahuvrihi compounding scheme in English. In all 'synthetic' languages (ex. Sanskrit, Latin, German, Greek, Italian, etc.), it's routine to form loooong words after dropping pre- and post-positions, and the meaning of the word is usually something referred to by the constituent words. For example, trinetra means 'three eyes', actually means 'the guy with three eyes'. Decoding what a huge compound means can be an intensely joyous exercise, and a large part of the literary genius of Bana's Kadambari comes from amazing 5-line-long bahuvrihi words. And you have these cute little Sanskrit jokes, which I remember Raghu relating: A surreptitious Sanskrit taunt would be 'Dasharatha-nandana-sakha-vadana' == 'Dasharatha-son-friend-face', meaning Monkey-face. Of course, the wise reader would prefer the much milder 'Abey maa ki *@%^' when he's in some parts of the world.