Monday, December 12, 2005

Naomi, oh Naomi!

Disclaimer: I haven't seen King Kong, nor do I want to. Will I actually see it, though? The answer is: yes, probably.

A friend from graduate school--let's call him Chris--had some of the strongest opinions of anyone I have known, about movies. And one of those opinions was his low regard for the big-studio Hollywood movie. Yet, paradoxically, he was the first guy to see the latest cliched blockbuster at the only cineplex in seedy Providence, RI. He would, admittedly, come back and diss the movie in discussions with me. However, after hearing that Naomi Watts was slated to star in King Kong, I'm sure he contemplated suicide at the betrayal. Naomi, the light of his life, sold out to the man!

Chris introduced Naomi Watts to me in graduate school; it was David Lynch's excellent 2001 cult noir thriller Mulholland Dr. I was so taken by her performance, that I still think of the real Naomi to be like her character from the movie: Betty/Diane, a delicate flower that needed to be sheltered from this cruel world, lest it break its own neck in a strong gale. Since then, I had enjoyed her performances in suitably 'weighty' dramas: We Don't Live Here Anymore, 21 Grams, and... yes, even I Heart Huckabees. I felt proud of my Naomi when the critics appreciated her in these roles.

When I first heard of the new King Kong movie, my reaction, while a little less drastic than my friend's, was an unhappy one as well. It is heartbreaking to see Naomi involved in a movie with the unlikely premise of doomed love between a gorilla and a woman. A 10-story tall gorilla, at that, for C(h)ris-sake! Sure, former horror movie-maker Peter Jackson intended it a "loving" homage to the 1933 "classic". But to call it "exalted" movie making, as the usually dependable A.O. Scott of the New York Times does, is mistaken. One should recognize it for what it is: an oversized, overpriced remake of an old movie, which will turn into a money-making franchise just in time for the holidays, aided by big marketing blitzkreig (Take cover! Here come the Kong cereal boxes (those again!), Kong the video game, Kong the candy bar (already out: Crunch'N Win Kong), Kong you-name-it). Oh, wait--I also forgot the other convenience of releasing the movie now: its Oscar-season! Wonderful.

Its "milk the cow for all its worth" all over again. What is disappointing is to see Naomi being involved in such un-inventive enterprise, which, I feel, is beneath her abilities. Here's wishing that Naomi returns to making intelligent cinema again. Now, excuse me, for I have to look for tickets to the next showing of King Kong at my local cineplex.

Wednesday, October 05, 2005

Anaconda vs. Gator

Anaconda vs. Gator (from the BBC)

That python ate up an entire alligator, and promptly burst into pieces. Shite! Click here to read the BBC article.

Saturday, September 17, 2005

Eulogy for Dave Chappelle

Tuesday was a sad, sad day. I read somewhere that Dave Chappelle might never again work his show on Comedy Central again. Charlie Murphy, co-star on that phenomenally brilliant show said so in an interview. Well, fuck you, Charlie - for bringing me that piece of news. I was devastated. Since then, I have fallen into a kind of gentle, private depression. I guess its going to be just reruns for me, then. Well, there's always another viewing of the Popcopy episode, or the Black Bush episode.

Have you watched that Mind of Mencia show on CC? Some people I know seem to think its great, but to me it seemed just crude, mediocre and lackluster. The Chappelle show was crude as well (e.g., the mudbutt episode, or that one, where Dave, as R Kelly, splashed doo doo around from a can), but it was almost always clever, and always funny. Inspired and incisive satire. No such thing with Mencia.

In other news, after three months of trying out Netflix, I unsubscribed -- a little unsatisfied with them. Not that you really care why, but read on anyway, motherfuckers:

  • The Netflix choke-hold: Initially, they were all over themselves to ship their DVD's -- movies at my door next day. For a whole month. After that, it was like someone choked their distribution. One movie actually took a week to ship.
  • Having a completely inflexible missing DVD system: When a DVD they shipped didn't arrive at my place, I reported this to them. What happens next? They place it on a 'missing list'; two more such missing items, and my account is toast! That is bullshit, because I was penalized for something I had no control over.

Something else is bothering me. News articles about completely obvious findings from studies. Like:

  • Youth who repeatedly watch filmstars smoke are three times more likely to pick up smoking than youth who don't. Oh shit! Really? Thanks for clearing that up. Couldn't have figured that one out.
  • Hurricanes Have Gotten Stronger and Faster In the Last Decade. This completely startling discovery was reported in the respected journal Science. Scientists attribute it to increasing global warming. But they are not completely sure. I, for one, will keep my ears tuned for more news on this front.

Looking at these reports, I am tempted to add a few of my own scientific-sounding 'findings':

  • 'Insert-your-favorite-endangered-species-here' Closer to Extinction, New Study Finds. Scientists Suspect Deforestation.
  • World Population Set to Increase in 2006, Scientists Find.

Fuck you all. And, peace.

Friday, September 02, 2005

Katrina! Show me your titties!

So, Katrina happened. After that title (did you get it? I know its not in good taste, but heck, its funny!), I guess it is a bit pointless for me to say how horrified I am at the surrealness of the whole situation. Five days ago, it was just another hurricane with a pretty-girl name blowing in from the forever-choppy Atlantic. Now, it is the biggest natural disaster to hit the South in a long time.

I couldn't help but notice that the majority of the people affected were poor. And black. I also couldn't help but notice that for the first three or four days, the news networks on cable (CNN, Fox, MSNBC) carefully avoided mentioning that fact and acted color-blind. In today's PC world, news anchors are probably afraid of slipping up and doing a Campanis1 that could end their career. But ignoring that fact completely is akin to not acknowledging the proverbial elephant in the room. And the longer you stay in said room, the harder it becomes to miss said elephant.

Apparently, Wolf Blitzer, over at CNN, found it impossible to miss the elephant. Quoting him,
... as Jack Cafferty just pointed out, so tragically, so many of these people, almost all of them that we see, are so poor and they are so black, and this is going to raise lots of questions for people who are watching this story unfold.
What do you mean, Wolf..? Like, not Prince black, but Charlie Murphy black? Its like Blitzer not only decided to acknowledge the elephant, but proceeded to beat it with sticks.

1 Al Campanis, who was at one time, the GM of the LA Dodgers, went on Nightline in 1987, and educated Ted Koppel on the absence of blacks at the higher echelons of executive-dom. According to him, blacks might not have "some of the necessities" it takes to manage a major league team or a similar high-powered position, for the same reason that they aren't "good swimmers". The reason: they "lack buoyancy". His tenure as the GM of the Dodgers ended immediately afterwards.

Wednesday, August 24, 2005

In my ideal world...

In general, I believe choice is a good thing. But over time, I have come to think that there are some things which ought to come without it. In my ideal world:
  • There would be only one ring-tone for cell phones. And that would be a no-nonsense old-school ringtone, just like that on a landline phone. Not Vivaldi's Four Seasons, or Sir Mix-a-Lot's I like Big Butts, or any other tune.
  • No one would use HTML to compose email messages. At least not to me. It makes me go jumping mad when I see multi-colored text in my email. It is irritating, distracting and makes the email less readable, defeating any purpose of using fancy fonts. I believe that if you can not put your point across in plain-text, you simply haven't given it enough thought.
  • Cell phones would be made only by Nokia/Ericsson. At least there wouldn't be no flip-phones -- the clam shell design.
  • Fruit juice would not come in mixed flavors. Nothing enrages me more than being disappointed in the supermarket every time I search for a carton of pineapple flavored juice. I see pine-orange-banana, pine-orange, pine-banana and many other exotic combinations, but I'll be damned if I find just pineapple. No, sir, no pinepple. I end up going nuts.

In other news, I just installed and started Apache on my home machine. Check out my brand new homepage. Its a sorry situation that Verizon blocks port 80 on residential connections. So, I had to resort to the horrendous 8080 figure. My photo gallery is also up. At the moment, it is empty. It should fill up in the coming days. Yet another way for you to waste some more time from your daily routines, meaningless as they are.

Wednesday, August 03, 2005

Intelligent design and `hot' yoga

This is sort of old news, but y'all probably heard our beloved Dubya speaking out in support of intelligent design being taught to kids in school. This at a (quoting from the Washington Post), freewheelin', spirited news conference with Texas paper reporters. Sounds like Dubya felt right at home. In the midst of the uproar that ensued, his science adviser (what? he had one? yeah, only I suspect he hasn't had much to do since assuming that position) tried to smooth it out by clarifying that it was in a "social context" that the president meant intelligent design to be introduced in schools. That is swell, but why not also introduce kids to alternative sexual preferences (like, homosexuality) in the very same "social context"?

After that profound reflection, its time for more pop culture whoring. And what better to gripe about than that fad of all fads... yoga! I was reading an article where some hipster mentioned that he was into the latest manifestation in this genre - hot yoga. I didn't get it at first, but then I realized that it was a mangling of the term hata yoga (the hata rhymes with butter, if you will). Now, hata is a Sanskrit term used to describe a kind of obstinate, dogged persistence, which, combined with yoga, indicates the kind of physical activity that I usually associate with some yogi up in the Himalayas. I find it hard to believe that some jetsetting, capuccino/moolatte-sipping, Wall Street Journal-reading, yuppie could practice real hata yoga. Heck, I find it mighty unlikely that any consumerist American could. But then, isn't that what fads are all about...

Oops, in my zealousness to disparage fads, I forgot to Google hot yoga, just in case I missed something. Sure enough, when I Googled the term just after I wrote the previous paragraph, I found out that it was not mistaken for hata yoga (, although that sneaking suspicion lingers...). But wait, this hot yoga is apparently a sequence of some 26 asanas (positions) supposed to be performed at a balmy 106 F. Ladies and gentlemen, I rest my case.

I should have signed off on that triumphant note, but I couldn't resist adding this bit of information. I was born in this sleepy little town called Mysore in Karnataka, India. Now, after 24 years, I learn that there is also a very popular style called Mysore yoga. Wonders never cease.

Wednesday, July 06, 2005

50 cent - trickster or lyrical genius?

  1. This is yet another article written by a bewildered desi on the subject of urban/hip-hop culture in America.
  2. The article itself was thawed from cold storage, after I noticed the blog was dying. So, don't expect the usual high quality you have come to expect from this blog. Okay, now you know which way the rest of this post is going...

If you think 50 Cent is a certain amount of currency, or if you think that "In Da Club" is bad spelling for In The Club, then you are possibly a hermit crab living under an impossibly large rock.

50 Cent was my rather brisk initiation into the world of hip-hop and gangsta rap. The no-nonsense, in-your-face lyrics (e.g., Sir Mix-A-Lot happily proclaiming "I like big butts", and 50 Cent crooning "I'm just a squirrel lookin' for a slut with a nice butt, to get a nut") are a refreshing change from the sappy, unlikely ballads of other genres. That is, if you can make out the lyrics. These guys keep it real. And 50 Cent is, in my opinion, the most artful exponent of this genre. Okay, may be Snoop "Doggy" Dogg is up there too, but this sort of thing is exactly what feeds the East Coast vs. West Coast rivalry. Gangsta rappers are also the cowboys of our times, who shoot each other not with guns (well, okay... not only with guns), but with stinging lyrics. Recording studios like Aftermath (Dr Dre's creation), Death Row etc. play the part of dusty alleyways. At the end of the day, a handsome paycheck awaits, too.

So, there I was, quietly enjoying my 50 Cent records, when I came across this Slate article. According to the article, 50 Cent is just a wily, scheming thug from Queens, NY, who is not especially good at rapping. Well then, how come 50 Cent is the biggest name in the manically cut-throat hip-hop world today? The article's argument: clever marketing, staged feuds (most prominently with the artist currently known as The Game), and the mystique of the "I got shot 9 times and I survived. Bitch!" routine. I beg to differ. Anyone with half a brain can make out that 50 (pronounced fi-tee) is a gifted rapper, by doing as I did: listening to Get Rich or Die Tryin', 50's platinum album, all day, for a couple weeks.

You gotta try it. 50 Cent has an inimitable style of delivering his lines with a combination of restraint and ease. It's as if he hardly opens his mouth, yet the lyrics keep coming smooth. This style is nowhere as effective as on my personal favorite, 21 Questions. If the haunting synth doesn't plant itself in your brain after a while, then the absolutely addictive beats of In Da Club will. Now, I can't wait to drop my shit, and go ghetto. 50 has given me a whole new outlook about life, where basically three things matter: guns, bitches and drugs. Wait, how could I forget: bling. If you wanna roll like a gangsta, you gotta have them spinning, flashy rims on your wheels, yo.

While the genre is still young, and is a little rough at the edges, there is no doubt in my mind that gangsta rap is the way to go. It should be played on PA systems in schools. Students will learn invaluable lessons in keepin' it real, fo' sho'. If you can't see that, you a wanksta. If you can, you in da hood, homie.

Friday, June 17, 2005

Hiking - useful hints

I recently hiked Mt Washington in New Hampshire. Mt Washington, apparently, is the tallest peak in the Northeast. It was my first backpacking trip, and a great one at that! I will leave out a description of the two day hike of the mountain and the surrounding wilderness for another time. For now, I will try and list a bunch of useful things to do and take with you if you are planning something similar, and you are new to it. I was lucky in that on my first hike, we had one very experienced hiker, who has hiked 8 National parks, and dozens of State parks. Quite frankly, he saved our asses on this hike.

If you want your hiking experience to be Good, then you need to plan for it: travel light, travel right. Don't lug unnecessary shit along in your backpack. When all you do for hours is plod on some rocky trail in the bush, you will be thankful for every little thing you left behind, that made your pack lighter. But that doesn't mean you leave your toothbrush behind (hmm... may be you could). For instance, if the forecast says there's a chance of rain where you are planning to hike, you should probably take your raincoat along.
I will leave out some of the obvious things that one should pack on a hike. A simple Google search for hiking resources will give you quite some information. The ones below might also be obvious (so sue me), but they are also for my future reference:

  • Maps: Get a map of the trail and the surrounding wilderness. Your chances of getting lost decrease dramatically with a map in hand. You will also need a compass. Now, if you can't figure out how to use a compass and a map, then you probably deserve to get lost.

  • Trash bags: They are light, and they can be variously useful. If it rains, you can cover your backpacks beneath a couple of trash bags. You could cover yourself too. There's always the option of using it as a trash bag.

  • Ziploc bags: Get at least a dozen of these babies, with the zips at the end. Pack your hummus mix, powdered milk mix, orange juice mix, folded clothes even, in them. Your shit will stay dry, and everything will be okay!

  • Torches/Flashlights: Try and get yourself a headlamp instead. It'll free your hands.

  • Food, and food mixes: Oatmeal packets for breakfast, orange juice concentrate (mix water), hot chocolate mix, hummus mix, dried fruits and nuts, cous-cous mix (just boil it in water, and see it grow enough to fill your appetite), pasta sauce, cheese, and pita bread should do ya. Don't get squishy stuff like bananas, or crumbly stuff like cookies, if you don't want a mess on your hands.

  • A water pump: for pumping and filtering water from a fresh water source.

  • Stove: a small, portable stove, which is basically a burner on three stands. A canister of gas (that's gasoline/petrol for the rest of the world) as fuel for the stove. We filled ours at a gas station on the way. Be careful with packing and stowing the gas in your pack.

  • Oh, speaking of food and cooking, on what would you eat your food? China plates, and forks ? Ha! Fat chance... Get yourself some of those tupperware plastic boxes, and pack just one spoon for each hiker. Eat out of those boxes for lunch, breakfast and dinner. Lick it clean as a substitute for washing. Waste nothing.

  • Toilet paper: Unless you are an expert with dry leaves, or if you mind not taking a crap at all. And please stay away from any water source while you are at it.

There, as you can see, hiking is not a joke. But if you do your homework, you can have a wonderful time out. I will probably add to this post with time, as I think of more things to add.

Saturday, May 14, 2005

Triumph, Star Wars and Hotlines

I should make it clear first off that I have never watched any of the Star Wars movies (gasps! from the audience). May be parts of it, somewhere, some time. And in a perfect world, I wouldn't. But one of my new roommates is a fanboy. A big one. And he has the collector's edition of all the movies. And we have a projection system home theater in the apartment. So, I am probably going to watch it soon. But its pervasion into popular culture is so complete that indirectly, I know roughly what happens in the movie, and half the characters already. At the time it was released, it was probably truly the shit. But as is the fate of almost every good idea that works, its creators juiced it for all its worth, and then some more, so by the time so-called Episode I hit the screens... it was stale.

Anyway, the new Star Wars movie - Episode III - is out soon, and being the pop-culture whore that I am (or, turning into), I felt I should comment. For one thing, it is nauseating to see the associated commercialization. I was browsing through the cereals section in the grocery store, and I saw a Whole-Grain crispies box with a picture of that pussy, Hayden Christensen, standing with a lightsaber in hand. What the fuck has a Jedi Knight to do with a bowl of cold cereal anyway? Everything from poop paper to cars comes in a Star Wars edition now. Disgusting.

George Lucas stands to make millions from the mindless devotion of countless fanboys who will jump, like hungry dogs at meat, at any merchandise that smells even remotely of Star Wars. Conveniently enough, Episode III is getting `positive' reviews from everywhere.

Then we have them geeks. I don't think I can express in any novel way the sorry state of the legions of losers that call themselves Star Wars fanboys, than has already been done. But I think there is one particular downsizing that was inflicted on them, that I should share with you. Have you ever watched Triumph the insult dog in action? If you haven't, stop whatever you are doing in your meaningless life, and go watch some videos of Triumph in action. Okay, now that you are enlightened in the ways of Triumph, let's come back to the issue at hand. Some geeks were standing just outside some theater, waiting for Episode II to begin (2002, I think?). Who should appear at the scene, but Triumph! What followed was hilarity itself. I have linked some video goodness for your benefit. But if you are too lazy to watch that video, here's a sample from the transcript:

[Triumph approaches a geek standing in line. A female geek. And a pregnant one at that.]
Triumph (T): So, that is a future geek waiting to be born... eh?
Pregnant Female Geek (PFG): Yeah, yeah! That is a future jedi knight in there!
T: Oh, great. So, when is he due?
PFG: Umm... I think - June 27th.
T (barely containing his laughter): Oh, really? So, that is the last day that boy will see female genitalia.

Truly, the video is a keeper.

Wait, I have more to say. And not all of it is good news (at least, not for me).

1-800-441-4000. Looks like just another 1-800 number, right? No. Try it. I opened a bank account at Bank of America recently. I ran into the bank one evening just after it closed, as I wanted to know my account balance. The guy at the counter told me it was closed, but helpfully enough, he offered me the hot-line number for customer service at Bank of America. Yes, it was 1-800-441-4000. Cryptically, he added, "Satisfaction guaranteed", and closed the bank. I did not have my mobile phone on me at the time. When I did call the number later, I did reach a hot-line. Only, it wasn't no hot-line to any bank. You know what I'm saying? Boy, did I get suckered by that bank guy! I haven't seen him at work in that bank since.

My new toy, BlogPoster, isn't going nowhere. I am busy learning the ropes at work, and I am spending weekends hauling shit between Providence and Boston, so I haven't had the time to sit down. Hopefully, I'll get back to it soon.

Coming soon: how Arthur C Clarke and Isaac Asimov wrote some stinking bullshit disguised as science-fiction.

Tuesday, April 26, 2005

The bull is in your court!

The bull is in your court!, originally uploaded by shashankr.

So, this herd of buffalo ran wild on a highway somewhere! They were finally contained into a tennis court. As for me, I say "huzzah!"

Sunday, April 24, 2005

BlogPoster is born (barely!)

As you can see, the previous post is a test post from an OS X application that I am developing. Its called BlogPoster, and it will allow you to post to your weblog from your favorite mac, without actually opening the weblog service in a browser. I know, I know -- applications like these are retro, and they are a dime-a-dozen. But I am writing it to mainly hone my developing skills in Cocoa, Python, pyobjc, and to gain more familiarity with XML.

Interface Builder is an OS X application that lets you create Cocoa/Carbon based GUI applications quickly and intelligently. It also defines skeleton classes that capture the interaction between the various GUI compnents, leaving the user to flesh out the classes for functionality. It is especially suited for applications that follow the Model-View-Controller (MVC) design pattern.

Python, as you might know, is the most kick-ass scripting/object-oriented/whatever language ever. Python rocks! Objective-C is an extended C, with, as the name implies, object oriented features. pyobjc is an extension of python that allows a developer to combine the features provided by both Python and Objective-C. Since its an extension of python, the syntax of pyobjc resembles that of Python.

BlogPoster is still in its infancy - I spent 6 hours reading others' code (isn't that the best way to learn?), and 2 hours writing my own - about a 100 lines of python code. So, the only blog to which posts can be uploaded is mine :) I want to make it complete, by adding the following features (in order of priority):

  • HTML Editing
  • HTML preview
  • Image upload
  • Support for all blogging services that provide an XML-RPC based API for developers

Screenshots, and source code will be posted (via BlogPoster :) ), once the project is in a respectable state. Not too many people are mac users, leave alone being mac hackers, but people - if you are not at least one of these, you are missing out on something sweet.
test from BlogPoster
hello, world

Thursday, April 07, 2005

Yahoo! vs Google

A friend and I were comparing Google and Yahoo! He loves Yahoo! and hates Google. He loves Yahoo! because it has a comprehensive suite of web-services, and comes up with pioneering revenue-generating ideas. He hates Google because the guys there act like they are "the saviors of technology", and because they front crap like "We are in it because we love technology", while "they are actually in it for money" (which, by the way, they are making tons of).

As for me, I hate Yahoo! and love Google. For pretty much the same reasons he hates them. Let me clarify: Sure, Y! has a suite of websites, but have you used them? They are stinking piles of shit. Y! Maps has been around for ages, and its probably the clunkiest web software around. Have you seen their homepage? Even after a (much-hyped) redesign, their homepage is cluttered with ads, and with no clear focus. And let's not even get into My Yahoo!

I believe that it is important to get things working. I concede that Yahoo! does that. But then, they sit on their asses doing nothing to improve things that are working. Especially when there is trememdous potential to do so. This is the very reason Google could enter and dominate the web search market that was once Yahoo!'s domain. There is no point in being a pioneer if you don't continually strive towards improvement.

As a Mac user, another thing that greatly ticks me off about Y!'s development culture is their absolute contempt, and lack of support, for non-Windows environments. It may be true that setting teams of people to work on developing software for the Mac might not reflect in financial returns, but then, why even bother? Their website features a half-assed Y! messenger client for the Mac that doesn't even anti-alias fonts, leave alone supporting audio/video. I would actually be willing to pay them for a decent OS X client.

I don't need to sing praises about Google here, since Slashdot already does that for me. But I do believe most of that praise is warranted. Have you looked at how prolific they are? My point is that it is not beyond most tech companies to do good stuff (Yes, even Microsoft). They just need to have the right mindset.

Any way, this whole rant was finally written because of my frustration using Yahoo! messenger for the Mac. So, I am thinking of writing a third party client for Yahoo! messenger that addresses all my frustrations. Yes, I want to go all the way, and provide audio/video support. I am not brave enough to write code from scratch. But it is going to be a challenge to even reuse components. Any way, in the meanwhile, I will start migrating away from everything Yahoo!, so that if I don't get around to developing my client, I can still survive.

Apple iChat, here I come.

Tuesday, March 29, 2005

Oldboy: Wierd-ass movie

Go watch this oddball movie, if you haven't already. If for no other reason than that you get to see a live octopus eaten. Also, almost randomly, there was an allusion to the 1999 wierdo-cult hit Being John Malkovich: A character mentions his discreet "7.5" floor business, where the anonymity of clients is top-priority. If you have seen BJM, you will recall that the porthole is in an office which is on floor 7.5. I was just wondering if 7.5 is standard nomenclature for discreet businesses, or if this was a deliberate reference to the other movie.

Monday, March 28, 2005

Addendum: More Questions

Random Walk (on-site)

  • Node is an element of a linked list of integers. Define Node, and implement the function:
    Node *addToEnd( Node *list, int val ).
  • In my implementation of addToNode(), I separately handled the case when the list is NULL. I was asked to improve the implementation to merge handling both cases. Hint: Use a Node ** variable.

Thursday, March 24, 2005

Technical interview questions

Here's a list of questions I was asked over the last two months, in the course of my job search. No solutions, nor a comment on the quality of questions, will be provided. So, don't bother asking.

Microsoft (on campus):

  • Reverse a linked list.
  • Given an array (positive and negative integers), find the contiguous subarray with the maximum sum.
  • Implement:
    void *aligned_malloc( size_t size_in_bytes, int align );
    void *aligned_free( void *ptr_returned_by_aligned_malloc );

    aligned_malloc() is like malloc(), but takes an additional argument - align. If p is the pointer returned by aligned_malloc, then, ( p % align == 0 ).
  • Find the minimum number of colors required to color a dodecahedron. Now, write an algorithm that does so.

NetApp (phone screen):

  • When would you prefer hashing as your dictionary implementation?
  • What is secondary hashing?
  • Perfect hashing/universal hashing...
  • How is the open() system call implemented in UNIX?
  • The rest, I don't remember (its all a haze).

Caliber Consulting (phone):

  • Given the function:

    void swap( char *p1, char *p2 ) {
    char *tmp;
    tmp = p1;
    p1 = p2;
    p2 = tmp;

    what is the output of the following code:


    int main() {
    char *s1 = "hello";
    char *s2 = "world";
    swap( s1, s2 );
    printf( "%s, %s\n", s1, s2 );
    return 0;

  • Implement strlen(), strcat()...
  • What is the complexity of strcat() ?
  • How would you change strcat(), given the following scenario:

    char src[VERYBIGNUMBER]; /* NULL initially */
    char *s1, *s2, ..., *sn;

    You need to place the strings s1, s2,..., sn into src using strcat(). Assume that src can accomodate all these strings. Note that normally, a single execution of strcat() takes O(l + m), where the lengths of the two strings are l and m. With that complexity, the above cascade of strcat()'s takes time proportional to:

    n*strlen(s1) + (n - 1) * strlen(s2) + ... + strlen(sn).

    Can you change the complexity to:

    strlen(s1) + strlen(s2) + ... + strlen(sn) ?

  • Given that you had only upto the IP stack implemented on two machines. How would you go about establishing a session between them? Note - you obviously can't just use TCP! Also, no error correction, sequencing etc. are required, so you don't *need* to use TCP.
  • With the same scenario as in the previous question, how would you implement a messaging client?
  • What are virtual functions in C++?
  • How would you implement virtual functions in a compiler?

Random Walk (pre-interview - on campus):

  • Implement the factorial function.
  • What is polymorphism?
  • What are virtual functions?
  • Talk about inner classes in Java.
  • Difference between a button and a JButton
  • 57 cents worth of money in 7 coins. How many of each do I have: 1c, 5c, 10c, 25c ?

Neuco (phone screen)

  • What are virtual functions in C++?
  • How does a typical C++ compiler implement virtual functions?
  • How would you reproduce/simulate the object system of C++ in C?
  • Given a C++ object and its method, how would you simulate with a C function, the calling of the C++ method?
  • Suppose you are given a pointer to a function that takes a double between 0 and 1, and returns a double between 0 and 1. The function is continuous, and is zero at some point(s) in the interval. Write a procedure to find those zero-points. What is the complexity of the function, as a function of (a) precision, (b) accuracy ?

Random Walk (phone interview)

  • What is the difference between the procedural and the object oriented approaches to programming?
  • Elucidate the cornerstones of OOP.
  • Suppose you had a Shape class. Its an abstract class that subclasses into concrete classes like a Point, Triangle, Square etc. How would you handle render()'ing a Shape instance...?
  • Suppose an application program wants to render birds on the screen. Different birds are to have different functionalities (Ducks can quack(), Crows can fly() etc). Suggest a good design pattern to provide these functionalities to different instances, that repsects the paradigms: cohesion and loose coupling.
  • What is the most prominent characteristic about multi-threaded programming? And why does multi-threaded prog have this characteristic?

Book burning, and other noteworthy incidents

The United States is an awfully repressive place at times, especially for a country that is supposedly at the forefront of human advancement and progress. What prompts this particular whining of mine is the news that recently, Lynne Cheney, wife of Vice President Dick "I'm Not Dead, Yet" Cheney, ordered the burning of hundreds of books that supposedly cast some arcane aspect of American history in a bad light. I know, I know, this is old news, but I am still alarmed by Mrs Cheney's actions.

This new-age Savonarola, herself authress of a steamy civil-war era story about a lesbian couple, now out of print, also went on Fox News (that classy beacon of tv journalism, the fair and balanced news network) and proclaimed that the nation's history had to be looked at in a "non-cynical and inspiring light". Sure, forget about concertedly driving an entire native race to near-extinction, and the bondage of another for a hundred years, and there's only the Wizard of Oz left to tell in the (hi)story books.

This is also the country where people think the theory of evolution should not be taught in schools because it might be opposite to some people's fundamental religious beliefs and the theory of creationism. A documentary about volcanoes on Discovery Channel was also put on hold because of the same concerns. Television stations across the country refused to air the movie Saving Private Ryan, fearing indecency fines by the FCC.

We have a President who tries (and succeeds) to score cheap political points by speaking about promoting a "culture of life". This is the same guy who was governor of Texas, where more people are legally put to death every year, than does the rest of the country (This is a rant. I am not checking facts here, but you get the picture).

But these are only a few in a series of disturbing revelations I have come to have about this country. The image of the States as projected to the outside world is the one peddled by Hollow-wood (oops, Hollywood... that was actually a Freudian slip) and television. This is the image of a Godless, hedonistic, morally corrupt society. It wouldn't be a problem for me if this country was simply hedonistic, and morally corrupt. What is, is the fact that it is one of the most conservative of modern societies. A hypocritical, jingoistic majority, that is regularly whipped up by religious fervor of its clergy, where covert propaganda passes for news, and wimpy middle-ground politics is considered radical liberalism.

All the above would still not be a big concern if the country's foreign policy did not reflect its retrograde cultural and religious ideology. Like bestowing democracy on a country whose civilization is approximately five thousand years older than itself. I think below all the ideological and political rhetoric about the rationale for current foreign policy is ignorance and fear. Fear and uncertainty about people who are unlike its own. A people whose very idea of organized society is quite different from the one that is known here.

Thursday, January 20, 2005

I'm Rick James, beee-yaatch!

I'm Rick James, beee-yaatch!, originally uploaded by shashankr.

Finally, it is here... a million thanks to Ditch for giving me this shirt as a gift.

The Flight to Goa

I went to Goa for a vacation when I was in India. A huge family, probably Assamese (I heard one of them call another Talukdar), also got on the Indian airlines flight. I immediately sensed this family would create a spectacle. It was probably their first time on a plane, and they intended to make an event out of it. Their assigned seats were scattered around the plane, and in an effort to rectify that, the head of the family (whom I will call Chief,) started asking the other passengers, loudly, to "adjust" and move to other seats. Of course, not everyone obliged; I was one of them. I was not going to give up my window seat to anyone, certainly not to obnoxious Chief. This led to louder condemnations in Assamese by other members of the family. Chief Talukdar, in fact, finally sat down two seats away from me.

I thought the family had settled after about five minutes, when I suddenly heard loud conversations break out all around. This family was not going to let a few rows of seats come in the way of the conversations they had going when they boarded. Children sitting ten rows away from each other were conversing. Aloud. Older men and women kept up a din across many rows. Chief is apparently a funny man, for every sentence of his brought forth guffaws from his kin spread strategically around the plane. So much for a surround sound experience.

And then, the plane took off. The entire family, from all around the plane, craned over their seats to get a better look of Bangalore falling away beneath them. As the plane rose higher, their exultations got louder, and reached a climax when the seat belt signs went off. Half of the family got up from their seats and started walking the aisles toward the other half. No longer bound by the (insignificant) constraint of having to sit rows away from each other, the conversation changed to a steady drone.

When the hapless flight attendants started serving snacks, everyone went back to their seats, and there was a thankful moment of silence: the family was going to eat. But soon afterwards, there was a lot of loud smacking of lips. I saw Chief lick his fingers to his satisfaction, and then wash his hands with water in the plate. I was completely rocked. Afterward, his brushy moustache still had crusts of food sticking on his face. When he went to sleep in no time, his moustache and the food crumbs gently waved about, as he snored.