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.

Sunday, May 29, 2005

Thanks to Tim-Berners Lee

Gawrsh! This Internet is awesome! Today I went around in a depth-first search of blogs and ended up visiting so many interesting people's sites!

Thanks, Tim-Berners Lee (http://www.w3.org/People/Berners-Lee/)!

Higher v/s Primary education

Economists of most hues have for long, proposed that governments have no business funding higher education, and so must focus on primary education while leaving the pursuers of higher education to bear its costs. Among them are highly rated leftist economists like Amartya Sen. The current UPA government, advised by the left-dominated National Advisory Council seems to agree with this school of thought.

Nothing, I repeat, nothing could be more dangerous to the economic future of this country.

India is today acknowledged as an emerging economic power, led by her strengths in 'high-technology' areas. How did we, a 'poor' country, manage to get such strengths? Simple - it was because of the innate Indian respect for higher education, and the opportunity provided by successive governments by keeping costs low. If we have the world's second (or third) largest pool of talented man-power, it is mainly because of our 'cheap' higher education. Imagine, would Kalam have completed his bachelor's if he had to pay the equivalent of 25,000 US$ for a year? Would Amartya Sen have gone to Presidency college if he had to pay 20 lakhs for a degree?

Not to forget the point about equal opportunity. While our leftist ideologues cry themselves hoarse over equal opportunity, how can they forget about equal opportunity in higher education? Why should higher education be the preserve of the rich (which will be the result if the government withdraws from higher education)? What our leftist pals seem to say is: "It is OK for me, (put the name of your favourite idealogue here) to get affordable higher education, but it is not OK for others". Animal Farm, anyone?

Primary education is extremely important, yes. But so is higher education. It is higher education that will give students the skills to survive in tomorrow's world - where jobs will be based on creativity and high technology, not on mass-manufacturing. It is research funding that leads to technological innovations and breakthroughs, not mass-manufacturing. But, when were the leftists interested in technology anyway?

Finally, the background to the leftist argument. The scarcity mentality. "Oh! we are a poor country, and we have too many people. So, we can't afford higher education, we can't afford nuclear power, ad infiniteum". I am no economist, but I am sure that a fraction of the money the government spends on itself or a fraction of the black money in India will suffice to finance higher education for our masses.

Activism

Everybody loves activists - don't you? These noble creatures give up home and work to FIGHT for causes that everyone is concerned about - the environment, human rights, animal rights, and if you are in India, secularism.

But how sincere are they? How much do they know?

I distinctly recall a discussion with an activist friend of mine who ranted against big dams, fertilizers, commercial farming, the BMIC project, Monsanto and genetic engineering without having heard of PL480. After all, how can you talk about farming in India without recalling the humiliation that PL480 inflicted on us?

There are many of his/her ilk, who driven by guilt get into these activist causes. The organizations that support these causes have active members in the US and UK, the Indians there being particularly susceptible to the activist guilt trip. Hard cash received in dollars is used to fund air trips of fellow activists to forums like the WSF.

If you are planning to donate to any such organization, desist.

Typecasting

Those familiar with C++ know that typecasting is a (sometimes necessary) evil. Does the same apply to real life as well? Don't get what I am saying? Well, read on...

The typecasting I am referring to is a sort of categorization of people based on nothing more than their looks, clothes, or the way they speak. It probably arises from the (sometimes foolish) attempts of the human brain to make sense of everything it sees. One of way of doing that is by categorizing information (the divide and conquer strategy), which naturally gets applied to people as well. Another reason could be the "Namma alatheyannu meeralarada devaru" syndrome, by which we measure people by our own subjective scales (hey, if my ruler can't measure it, it can't be long enough, right?).

Well, in my case, people make so many assumptions about the things I could/couldn't do, that I could almost write an entire book on the topic. This happens even with my closest friends and associates, and on occasion, with my family too!

For instance, there are many 'close friends' of mine who are convinced that I cannot swing a (cricket, TT, badminton) bat to save my life, that I cannot sing, who are surprised that I know some basic economic theory, and who just cannot believe that I can drive a vehicle at speeds greater than 30 kmph. Even when people find out that I have a particular talent, there are attempts at sub-categorization - oh, you prefer to sing particular types of songs, so you must be a guy who does not drive! Worse are the assumptions people make because of my lack of dress sense. I won't mention those here.

Here are some more categorizations: "Oh! you are a beautiful girl, so you must know how to sing". "Oh! you are clothed in jeans and t-shirts, so you must have modern views on everything" or, more insidiously, "Oh! you are so good looking that you have to be smart (In India) or dumb (in the USA) ".

I make no bones about the fact that I am guilty of it, and much as I try, there are occasions when linguistic flourish, a personable appearance, or an unfathomable accent has led me to making the wrong judgement about a person.

Are there any advantages of typecasting? From where I stand, there seem to be none. What do you think?

Feel free to post your opinions and experiences.

How to become a hacker

An informative guide to lead you to hackerdom
http://www.catb.org/~esr/faqs/hacker-howto.html

In particular, read the "Points of Style".

Saturday, May 28, 2005

RNI's

Everyone (in India) has heard of NRIs - Non-Resident Indians, Not Required Indians, and so on. In this post, I want to talk to RNIs - Resident Non Indians. This is a category of people I've met only recently (during the past 3-4 years).

The breadth of knowledge of an RNI is amazing. S(he) is usually an expert in everything 'global' - global warming, the effects of Monsanto on agriculture, the Iraq war, NBA, European League Football, Kosovo crisis...the vishwamanava of Kuvempu's poetry. But when it comes to India, be it the Emergency, be it Cricket, be it Indian music - s(he) knows nothing. Now, I am not against knowledge of any kind, but shouldn't one know basics about his/her own country while knowing so much about a foriegn land?

This is an attitude fostered by our news channels too. The Schiavo case made headlines on NDTV, the newsbar keeps talking about trivialities of US society like which actor married whom, or who is giving a concert somewhere. Nowhere in these news items will you find mentions of people like Somender Singh (from Mysore) [See story in this blog on engine efficiency], or Rajaram Bojji (the 'inventor' of Skybus), or any of the people that truly make India great.

What a shame!

Friday, May 27, 2005

A great link

See this link for some of the greatest film speeches:
http://www.americanrhetoric.com/moviespeeches.htm

Search for "Gandhi" to see some videos from the movie.

A good post on driving in Bangalore

Nice one - read in particular, the part about BMTC Golf!
http://o3.indiatimes.com/jonagil/archive/2005/05/12/114431.aspx

Thanks Vinay!

Me and Mozilla

Being in the IT industry, I obviously have many 'geek' friends, most of whom use Mozilla. Naturally, every one of them has been hounding me to use Mozilla, asking me to use a 'real browser', to stop supporting rich fat capitalist companies, and to desist from encouraging the big scourge - Microsoft. [Note the absence of quotes everywhere except 'real browser']

I've tried using Mozilla twice - once on my Windows XP system and another time on Windows 2000. While the bells and whistles are great, I haven't found that Mozilla is any more stable than IE. Furthermore, and this really irritates me, our intranet home page does not open with Mozilla, nor do many sites that use ASP. So, my question is - if a browser does not open your favourite website, what do you do? Change the browser, or stop visiting the website?

Now you know why dreams of Linux conquering the desktop world will remain just that - a dream.

A better IC engine

Now all of us in our Engineering undergraduate courses, learnt that the efficiency of an IC engine does not exceed 28%.
Here is a good story about how an engineer from Mysore has improved it:
http://www.goodnewsindia.com/Pages/content/newsclip/story/193_0_2_0_C/

Also, if you are interested in other good news on India (albeit a little optimistic), visit:
http://www.goodnewsindia.com

Thursday, May 26, 2005

Attitude and Aptitude

Heard from a manager:
"It is not your aptitude but your attitude that determines your altitude"

How true.

Amongst the people with a fantastic attitude I've known, are a large number of 94 UVCE folks. This post is simply to say - "great knowing you guys"!

Moneys for Bangalore devp.

Incidentally, ToI reports today that Dharam has sanctioned 135 crores for roadworks and the like in Bangalore. Recently, our Siddu (sic) had sanctioned 300 crores. Now, they are sanctioning 60 crores for desilting storm water drains, and god knows how many crores for the tree massacre that is going on.

In fact, the tree massacre is a great opportunity to make money. So many juicy contracts to hand out - contracts for cutting the tree, for transporting the debris, for replanting new trees...

If you wonder how these guys siphon off money, take a look at Ambedkar Road...recently, near the Indian Express bldg, they repainted the lane markings and zebra crossings...now, obviously, no one gives contracts to paint half the road and leave the other half - but lo and behold, that is precisely what has happened here! Wish I had a camera to take snaps and post them here - but I don't :(

Dr. Clean

Ok, I am sitting here at work, it is 12:20 in the night, waiting for my cab to arrive. So, what shall I do? Add a new post! So here goes...

One thing that burns me up is the Dr. Clean title given to the "aashaadabhooti" prime minister of ours. Now, the one person who deserves the title is the President - who has unfailingly kept up constitutional propriety in everything he has done. What about this guy? He has got this image by doing exactly the opposite! Jharkhand, Bihar, Buta Singh, Shibu Soren, Laloo...not just that, he addresses a conference of DMs where he says that DMs should have fixed tenures, and the evening, dismisses two honest DMs who had the guts to tackle Laloo's goons!

All this is the creation of the English media. Oh! the innocent Manmohan, the diffident Manmohan, the "father of reforms" Manmohan - what junk!

God save this country.

Anyway, read this article for some more temperature increases:
http://us.rediff.com/news/2005/may/25kanch.htm