Saturday, June 25, 2005

Interesting question

If you could be taught by the best teachers in the world, which three subjects would you want to learn?

My choices would be
1) History
2) Maths
3) Theoretical Computer Science, not necessarily in that order.

What would your choices be?

Wednesday, June 22, 2005

Stacks and Vectors

Inspired by my friend Balbir, I've decided to start posting technical questions on my blog. Here is the first one:

You want to implement a Stack using a Vector. So, how do you do it? There are three approaches (in C++):

1) class Stack : public Vector
2) class Stack : private Vector
3) class Stack
{
private:
Vector vec;
};

Of the three, which is the best, and which is the worst, and why?
No prizes for guessing which method Java adopts...

Tuesday, June 21, 2005

Three stupid words any programmer can utter

No, not "I love you"...if that is what some of you were expecting.
The three words are - "I know C++"

Disclaimer - This does not apply if you are Stroustrup, Lippmann, Coplien, Vijayan, or anybody else who really knows C++.

Thursday, June 16, 2005

My car driving experience

I learnt to drive a car for the first time in 2001, just before I left for the US. Unfortunately, for the three years that I stayed there, I never drove. Still, I was usually the navigator whenever my 'gang' went on trips, so that gave me a good idea of how people drive on US roads.

Now, back in Bangalore, I am taking driving classes again, and man!, the things my instructor is teaching me are simply crazy. US or not, if this is the way people learn to drive, they will definitely cause accidents...here are a few gems:

- I am driving somewhere in the centre of the road and want to turn left. So, I quickly looked back and checked my 'blind-spot'. This brihaspathi tells me - "Yaak saar hindhe noodthaa iddira? Mundhe noodi!" [Why are you looking backwards!? Look ahead!]

- I am driving on the left lane on Bellary Road when a truck is parked right in front of me. I am in fourth gear and driving at around 45-50 (tell me if that itself is right), so I slow down, switch to third gear, turn on the right indicator to say that I am switching to the right lane. What does this guy say? "Yaak saar indicator haaktheera, right thirig baeka? Sumne kai thoorsi." [Why do you turn on the indicator? Do you want to take a right turn!? Simply show your hand!]

- I take a turn into a road that has a hospital on it. My road is blocked by an auto, with the driver sitting in it. So, I politely honk once. He (the auto driver) looks back and acknowledges, but is unable to start his vehicle. So, our pal takes over the steering and starts honking like he is in a noise-competition! To h*ll with the hospital and the patients!

I'll post more as I find time.

Monday, June 13, 2005

Representative of Indian Women

I am no fan of Aishwarya Rai's - I think she is too plastic, more like a Barbie doll than a human being. Her acting sucks, her dancing is like watching a robot, and the emotions she portays on screen are simply pathetic. So, in short, I simply can't stand her being the 'representative of Indian women' as I have a lot more respect for Indian women than that.

But why this topic? Because in her desperation to get slotted into Hollywood, the lady in question has been very visible on many English channels lately. And each time, she comes off worse than before. First, she was at Cannes, wearing a black dress which simply paled in comparison with Nandita Das' red saree. Then she assumed a 'call center' accent in her interview that was telecast on NDTV profit. And finally, on Oprah, there was a complete makeover and she finally showed her true h(c)olours.

No doubt she has the right to do what she wants. She has the right to be desperate for a Bond movie role. She has the right to wear a black dress and strut like a peacock (wow! India's national bird) in front of the western media. She also has the right to feel happy about being rated the 9th most 'beautiful' women ever.

What she and her lackeys don't have the right for, is to portray her as a symbol of new India. For all her 'greatness', she isn't. The symbol of new India is not a peacock strutting its feathers. It isn't a lady who is ashamed of her Indian accent and upbringing. It certainly isn't an actress who cannot act.

Sunday, June 05, 2005

Bangalore - I

A few days back, I, along with two very close friends of mine made my way home in an autorickshaw from work. It was raining, and naturally, we had the time of our lives trying to get an auto, get in it, and get back home. While the journey itself was uneventful, we got into an argument (we always do, only the topic differs) about Bangalore's condition. While I was arguing that the problems of Bangalore are due to imbecilic politicians and bureaucrats, and generally lower expectations of the people, my friends argued that there were resource constraints, and more importantly, too many people.

So, who is right? I don't deny that Bangalore is no Boston which can throw 80billion US$ at the Big Dig. But how much money does it take:
  • to have motorable roads that are straight, with clearly marked lanes, reflectors and slopes for drainage?
  • to have storm water drains that are clean, closed and that can take the load of the monsoon rains?
  • to have footpaths that don't require mountain-climbing skills to walk on?
  • to have sewage connections for every home, so that they don't let out sewage water into the storm water drains?
  • to have proper lighting for the entire city?
  • to have adequate green cover for all our roads?

Now, all of these are easily affordable by our very own BMP. But why is it that none of these happen? You all know the answer - corruption. How can the officials give out contracts if the roads remain in good condition? How can you spend 60cr on removing silt from storm water drains if you have closed drains?

So, what is the answer? I don't know.