Tuesday, May 31, 2005

Fall to pieces

It's been long here
Since you've been gone
I've been alone here
I've grown old

I fall to pieces,
I'm falling
Fell to pieces
and I'm still falling

Every time I'm falling down
All alone I fall to pieces

I keep a journal of memories
I'm feeling lonely,
I can't breathe

All the years I've tried
With more to go
Will the memories die
I'm waiting

Will I find you
Can I find you
We're falling down
I'm falling

(c) Velvet Revolver - Fall to pieces (Contraband - 2004)
Great, great song!


This is for you - my lone companion.
Today we complete 3 years together.
From the day we got together, you've been faithful to me,
been right beside me whenever I needed you.
You look after me and I'll look after you.
And together we've travelled far and wide.
I hope this association goes on for many more years to come.

Thank you kid!

In my long journey of life, you've been with me for almost 20,000 kilometers.

Monday, May 30, 2005

Pythagoras theorem

Pythagoras theorem - Perfectly shown in this pictrue of a not-yet-fully fallen tree Posted by Hello

Note: I did not set the tree up like that!! LOL

Saturday, May 28, 2005

Holy Friday!

WOWIE! What an evening it was...

Friday 3-00PM: All hell breaks loose over Bangalore - it rains like crazy - so much that its difficult to see the building next to our office! Someone bet me to go stand in the rain for a minute and I'd get Rs.25 for that! I actually did that - got soaked and in the end I was not paid the agreed money! Anyway, I love to get drenched and I did that for myself.

6-00PM: I leave office for home. Rains had almost stopped and I thought it was a good time to get home fast. WRONG! Traffic jammed on double road all the way till wilson garden! Took almost half hour to get till the middle of double road. Frustrated with the traffic moving at the pace of a snail with a fractured leg, I take a diversion towards left into a road that I thought would get me to wilson garden sooner. WRONG AGAIN! This road had water till my knees and my bike was almost floating! Never knowing what lies beneath the water, I fell down 2 times - both my legs are pretty badly bruised! Amidst all this, there's no one but the locals to try and diffuse the traffic snarl. I could see many people discussing the bad state of management of the whole jam thingy. There was no difference between vehicles and pedestrians as everyone was fighting to inch forward sooner. Pedestrians were as stranded as the vehicles. To actually get to ashoka pillar took me another 45 mins. There was no place left that I had nto taken to get out of it - gutters, footpaths, potholes, heck I even had to ride over a bunch of steel reinforcements that was lying on the footpath near an ongoing construction site.

After all this, barely half a kilometer from home, there's this road called 'contour road' a part of which is a one-way. In my foul mood, as I was riding thru that road, an auto is coming in the opposite direction with no lights!!!! I snapped and shouted the F word at him. Totally agitated, he stopped the auto, got out of it and came foul-mouthing to me. I stood my ground - he was coming in a one-way and that too without lights! I told - no actually yelled this to him. To my surprise, he said that he did'nt know about that and actually apologised! 'Well, this is something new! I always thought all auto drivers are assholes' I thought to myself. This small incident made me forget all my frustrations of the earlier traffic jam. I had to get some medical attention for my leg. Now its sort of okay.

Time I reached home: 8-30PM. 2 and half hours for 10KMs. That's a new record I guess??

Friday, May 27, 2005

Pure virtual destructors

Ah! I can't stay away from C++ for long - can I??

Well, I encountered a situation where I needed to use a pure virtual destructor and also a query on the comp.lang.c++ newsgroups. You can read the newsgroup thread here.

OK - So, what's the hue and cry over pure virtual destructors?? To point this out, let me list the characteristics of normal pure virtual functions and then compare pure virtual destructors and the rationale behind them.

1) Pure virtual functions make a class abstract are declared as follows

virtual void someFunc(void) = 0;

> Pure virtual destructors also make a class abstract and are declared (and defined) as follows

virtual ~SomeClass() { // ... } = 0;

2) Pure virtual functions should not have a function body a.k.a definition
> Pure virtual destructors must have a function body. (That's why I've defined in the example above) This is because, in an inheritance heirarchy all destructors are called while destroying a derived class object. If we could leave out the body of a pure virtual destructor, then there would be nothing to call while destroying a derived class baby!

3) A pure virtual function in a base class would make its derived classes abstract unless its defined in the derived classes
> A pure virtual destructor need not be defined in the derived classes and still the derived classes would not be abstract. This is because the compiler would supply the destructor when we don't write one.

So, what's the use of a pure virtual destructor if its so counter-intuitive to pure virtual functions?!?!

Well, you can fall back on a pure virtual destructor to make a class abstract when there are no other candidate member functions that can be made pure virtual. This is much better and recommended rather than having a dummy pure virtual function that might reduce readability!

Ah! Now I feel relieved :-)

Dreams have only one owner at a time. That's why dreamers are lonely.
~ Erma Bombeck
Posted by Hello

Photographer: Myself
Location: Hulkul Residency, Lavelle Road, Bangalore

Thursday, May 26, 2005

Liverpool complete stunning comeback

Liverpool are the best in Europe once again!! Posted by Hello
Match report here

YES!!!! Liverpool completed an unbelievable comeback in the UEFA champions league finals against AC Milan after being 3-0 down at half time. Strikes from Paulo Maldini, 2 from Hernan Crespo had left both the Liverpool players and their fans in tatters. In an inspired comeback during the second half, Steven Gerrard, Vladimir Smicer and Xabi Alonso brought the game back to level terms. When the scores remained tied even after extra time, the game went into penalty shoot-out. The hero of the day was Liverpool goalkeeper Jerzy Dudek. Saving 2 crucial spot kicks from Andrei Shevchenko and Pirlo, Dudek sealed victory and sent the fans into raptures.

The only sad part - No power at my home during the entire night yesterday that left me waiting for my friend's SMS to know the progress!!!! FAAAAAAAAAAAAAAAAAAAAAAK! Anyway, must make sure I watch one of the hundreds of replays on ESPN!

Celebration time!!!! - "You will never walk alone!"

Wednesday, May 25, 2005

Ok! This was purely for timepass!

My blog within my blog! Posted by Hello

Tuesday, May 24, 2005

Flowers seem intended for the solace of ordinary humanity
John Ruskin

Photographer: Myself
Location: Office terrace

Darn Combinations

const static int ARRAY_SIZE1 = 4;
static const int ARRAY_SIZE2 = 4;
const int static ARRAY_SIZE3 = 4;

What's the difference?? Wait - I need some time to see that they are actually different! But do they mean different things??

Read more

Wrath of nature

It could'nt have gotten any worse yesterday. Heavy rains, gusty winds - had to ride home completely drenched. Nobody at home and power cut leaves me in complete darkness. The winds become stronger uprooting a tree which falls right in front of our gate blocking the exit from the house. As I picked up to phone to dial the BMP helpline to get someone to move the tree away, I realised that the tree had taken the telephone wire down along with it. And I have only about Rs.8.00 left in my simcard. I had to sms my dad to give a complaint for the tree and the telephone line. The BMP people never turned up and we had to move the tree away with help from some local people this morning. Finally when power was restored, the TV cable was also found lying on the ground - thanks to the tree! I had to struggle so much to get my bike out of the garage!!!!

All these - Just a minisclue wrath of nature...

Monday, May 23, 2005

Palm Meadows

Palm Meadows - A serene self-sustained locality

Palm Meadows skyline from a terrace Posted by Hello

Sunday, May 22, 2005


One of the less known concepts to me. I never had a very big circle of people around me. Even within the family, I never knew people who are more than 2 hops away from me on the family tree. This almost got exposed last thursday!

Occasion: My sister's house gruhapravesham

There were so many faces around that I had seen earlier on similar gatherings but never knew either their names or their relations to myself! As I was playing with my nephew, I could see mom happily chatting with an elderly lady. Suddenly mom pointed a finger at me, mentioning to the other lady 'That's my son'. 'Uh oh - who's she?!' I thought to myself... I left my nephew on the ground as he was jumping at the taperecorder lying on the ground. I wearily went upto that lady. She began the none-less-familiar parade...

"Oh - look at you. Last time I saw you, you were only this long", she said bowing down almost to her knee level. "Now you must be over 6 feet tall!" she continued. Then followed some usual questions about what I was doing now, where I was working, how the work was, how I commute to work place, what my future plans are, etc, etc, etc.... I thought that it was the end and I started to move away. Suddenly she called me back and asked... "By the way, do you know who I am?!".

'Oh no! I'm doomed! After a conversation of 10 mins, why did she think that I did'nt know her?!'. That I did not know her is a different matter altogether. Just as I was thinking of some smartass answer, my nephew started crying. Someone had picked him up and he apparently had not liked it. Like a hero saving the day, I sprang into action and pacified my nephew and took him away for a stroll outside. In fact, it was my nephew who had saved me from the situation I had gotten into! Thanks Mukul!!!!

Btw - I found out later from my mom that the lady was (ok - hold your breath) - Mom's cousin's wife's cousin's mom! WOW that was a palindrome!!!! :-))

Tuesday, May 17, 2005

Namespace templates

This might be stupid - But I was just wondering why C++ does not have namespace templates. For example I cannot do something like this...

template < typename TYPE >
namespace SOMESPACE
  static TYPE data;

Again, I cannot think of when someone would find use out of this construct. But, say a class has just static data (usually classes won't end up with only static data unless the design is flawed) then one could think of using the above construct. The data can be accessed as...

SOMESPACE< int >::data = 100;
SOMESPACE< std::string >::data = "Srinivas";

Anyway a class would become a namespace of its own name. That's why I was wondering about namespace templates. I've posted this on the comp.lang.c++ newsgroups. Just need to wait for some discussion on this. It can be found here.

Monday, May 16, 2005

Old classic

Wish you were here - The Wall - Pink Floyd

So you think you can tell
Heaven from hell,
Blue skies from pain
Can you tell a green field,
From a cold steel rail
A smile from a veil,
Do you think you can tell

Did they get you to trade,
Your heroes for ghosts
Hot ashes for trees,
Hot air for a cool breeze
Cold comfort for change,
Did you exchange
A walk-on part in the war,
For a lead role, in a cage

How I wish, How I wish you were here...
We're just two lost souls
swimming in a fish bowl
year after year
Running over the same old ground,
What have we found??
The same old fears...

Wish you were here

The song finally sinks in after listening for about 20 times over n over again...


A packed day! That's what the saturday was... For starters, I did not have any plans made. I was just to see what comes up and go with it. So, the person who would call me up first with some plan would get my esteemed company! (Hahahoohhoohaohahheheaa) Just as I was wondering who that lucky person would be, my cell started ringing and it was my sis. She had to go shopping for a few items needed for her new home. We left with my nephew in a very sleepy mood. A few miles of drive and he was sound asleep on my sister's lap! After 6 years I could talk to my sister properly - talked all sorts of things for almost an hour. It was almost 4 when I came back home. I was exhausted had just as I was about to got to sleep, my friends call up - "Let's go to the college fest. Will be there at your place in 15 mins. Be ready". 'Alright', I thought to myself - 'Its going to be one of those days...'

There was nothing going on in the college. The next event was the fashion show which would start only at 7! We had 2 hours to kill, with absolutely nothing to do! But we were greeted by many juniors and people like PK kept on blabbering so much that we kept moving thru the crowd. Eventually he would have to call one of us to find out our co-ordinates. "We are near the wide screen display", "We are very close to the cricket pitch", "We are in the central library", "We are in the 4th floor department". Phew, so much use being connected all the time! When the fashion show started, the presenter made it such a drab affair - he was eventually laughed off the stage when he announced that 'For the first time in PESIT, we'd have a bikini round!!!!' - What the hell was that dude thinking?!!? The initial round was a 'Shaadi and Vivah' round. We could see some atrociously outrageous wedding costumes on the ramp. One of the colleges almost had a text-book wedding minus the holy-fire! Gimme a break! One of the teams was disqualified - guess why?! One of the girls on the ramp kissed a guy on stage!! Hahaoeohohoehohohahhahaaa! :-)) That was a hilarious episode. The highlight of the show was the fireworks display that was going on in the skies. I preferred to watch that instead of the show on stage. Really, pathetic music and horrible ambience. I'm not a fashion person - but we could hear grunts of displeasure all over the place. I could not believe that we were allowed to sit and walk around the turf of the new cricket ground. On normal days, one would be fined Rs.100 for walking on it!! We all saw our chance for rebelling and merrily stomped around the whole ground. By the time I got home at 10.00, all my limbs were sore from roaming around the whole day and my throat was aching from all those screaming we'd done!

"AT-05 : Quench the thirst of souls" - YA RITE!

Friday, May 13, 2005

My drawing - Depiction of Slash, for which I was widely appreciated in office!!!!  Posted by Hello

Threading processes or Processing threads?!

The linux kernel does not support threads, even some might say that it does. There are also user space thread libraries. But they all suffer from the basic limitation within the kernel. Within the kernel threads are treated as processes. This can be seen even with the most widely used PThread library. Suppose you create a process that itself creates 10 threads...

extern void * threadrunner( void *parms );
pthread_t tid[10];

for( int i = 0; i < 10; ++i )
  pthread_create( &tid[i], NULL, threadrunner, NULL );

for( int i = 0; i < 10; ++i )
  pthread_join( tid[i], NULL );

// threadrunner defn
void * threadrunner( void *parms )

So now, each thread will sleep for 20 seconds before they can join into the main 'thread'. If you run this in background and run a ps -u - there'll be 11 seperate processes with the same name but different PIDs. What's happened here is that, 10 seperate processes are created and the library is providing the necessary abstraction so that they behave as threads. It does it internally with the help of the 'sys_clone' system call and also the process control calls. So, pthread_join does something very similar to waitpid call.

Recently there has been a new POSIX thread library that patches the kernel to modify the main process structure within the kernel code.

struct task_struct;

It adds a 'tid' (thread id), 'tgid' (thread group id) to the struct. It also modifies the getpid and the getgid calls to return the tid and the tgid respectively whenever the process id is the same. This implementation is a lot better than the previous one. I guess that it's supported only on the newer 2.6.x kernels.

So, all this while, were we threading processes or processing threads?! :-)

Thursday, May 12, 2005

Perfect fit

Its 6-15PM and people around me are wondering what this guy is still doing at office. I have a rep of leaving early at office - 'So what, I come early too - and right now I've no work', I quip. Fine, that's not what's on my mind now. I'm just wondering about something - life has ups and downs, sorrows and joy. But all these are supposed to build character and not make one weaker. How is a metal weakened? Alternately subjecting it to high and low temperatures. May be humans have evolved so that these alternations strengthen people and not weaken them.

I make everyone believe that I like to be different, but really I just don't know how to fit in.
- Anonymous

I totally identify with this line... afterall we all are trying to fit into this world, this society of ours, our surroundings. And there's no perfect fit. It all begins with a change in the environment - say one changes schools, moves to a new locality, goes abroad - the first thing they have to deal with is the new circle of people around, their new mentalities, new ways of interaction. At first everything seems to be so different. Yes - it will be different. Some 'fit-in' quickly and some don't. Its this latter lot that can feel aggrieved when people don't understand them properly. But one has to realise that when we were introduced into a new environment, the environment itself would have changed and would need time to settle down. A variety of things could lead to a variety of results.

There were days when I felt exacly the same - that I don't fit in anywhere.

I'd rather be a popular idiot instead of a lonely genius...

But now I've grown passive and I really don't care anymore. I'd rather let my surroundings 'fit-in' according to me. Wierd but true...

New profile photo

New profile photo Posted by Hello

No prizes for guessing who it is... :-))
Its SLASH - Ex GNR and now in Velvet Revolver - and my favorite guitarist!

Wednesday, May 11, 2005

New sounds in my ears

For the last 2 days, I've had very little work and I've been digging up stuff on the newsgroups out of my own interest, reading some documents, etc. Found some new songs to listen to. Found some of them really good. Two of them stand out. Excuse me if these songs are already very popular... I just heard them yesterday.

Velvet Revolver is the band (Ex-GNR - Slash and Izzy Stradlin are in the band) and the songs are - Fall to pieces and Loving the alien.

Sometimes I think I'm scared
Sometimes I know
I feel like letting go
Maybe not
I feel like giving up
Is this all we got

Sometimes is all the time
And never means maybe
Sometimes is all the time

And I'm moving on
And I'm moving on (Sometimes I feel alone)
And I'm moving on
And I'm moving on
(Part of Loving the alien)

Monday, May 09, 2005


An electronic, self-narrating story book - $45
A stuffed dog that can generate barking sounds - $40
A stuffed bird that sings a melodious song - $38
Watching my nephew play with my helmet instead - PRICELESS!

There are somethings that money can't buy - for everything else, there's my sister's Mastercard! :- ))

I spent almost 6 hours playing with me nephew - the time just flew by. Its just magical how babies just know somethings without anyone teaching them. How does a baby know that it has to smile when it feels happy. I make a funny face and a funny sound, my nephew smiles wide! Of course, very young babies (< 4 months) have only crying as a way to communicate. Its amazing how babies learn from observation. Like, when hungry, he starts groaning and crawls towards the kitchen. 'Cos he's seen his mom prepare cereal there so many times. I find it fascinating how babies find way to communicate. Also, I taught him how to give a hi5! :-)) I don't know the logic behind this - but whenever I put my hand close in front of his face, he claps my hand. May be its just that he's trying to get me to move away my hand that's blocking his vision. I'll take that as a hi5 :-D

Can't wait to play with him again today :-)

Sunday, May 08, 2005

Drunken evening

There are a lot of things that can happen over a night-out and particularly when the people are drunk. My friends are usually not philosophical, but when they are a bit drunk, they can get very philosophical. I discovered this yesterday! The place was one of my friends home - he's due to fly to california next week for a duration of 5 months. We started talking about college life, job life, nature of job, salaries, career growth plans, etc. Turns out that the better paid people are not particularly happy about their jobs. Then we cooked dinner for ourselves! Thank god we had got noodles as a backup!!!!

By midnight we were almost sloshed out of our senses... one of my friends started a topic about relationships (hey - don't blame me for this - for once I was'nt the one to start this kinda discussion!) - "Lots of people walk-in to our lives and lots of people walk out. How do you cope up when someone walks out of one's life?". There were quite a few points...

1) Does one keep waiting for the person walking away to at least glance back or turn back oneself. 'Cos once we turn our backs, we never know if the other person ever turned back towards us.

2) Turn back from the situation and not from the person itself... that way we can always get back

3) Why bother with the overhead man! Its as good as a zombie process!

4) No one would bother if the person did not mean anything to you - but if the person did mean something to you, then it'll be hard - there's no use wondering abt what's the right thing todo - Just go with the flow and the right things would happen in due course of time...

This was just a summary - the discussion went on for over an hour - and for people drunk to that level, we were not making that much of noise!!!!

We all concluded that nothing could be worse than having to eat our own cooked food!! :-))

Thursday, May 05, 2005

I wanna get one of these - A Les Paul custom chrome!  Posted by Hello

Strange meeting

It was years ago that we had studied together. Yet, this guy actually found out my mobile phone number and rang me up yesterday evening.

"Remember, the road gang?!"
"Oh! hell yes!! Where were you all these days?!"
"Lots to talk abt eh?! I've called the others too... lets meet up in half hour!"
"Half hour - thats quite a short notice..."
"You in or out?!"
"Alright - be there in half hour"

So, we met at the BDA park in BSK 2nd stage. It was surprising that everyone still were almost the same as they were years ago... All of them are working now. But the road gang still roars! For almost 2 hours, we talked, talked and talked more... It was great to catch up with old friends and felt glad that they still remember all the things we'd done during those days. The rain broke up the meeting after 2 hours...

I got home, fully drenched, and mom was promptly waiting to deliver her lecture :-)) Like a dog, I sprinkled some water on her and both of us stood there getting wet in the rain and laughing. It really was a beautiful day :-)

Wednesday, May 04, 2005

Reds are going to Istanbul!

Liverpool beat Chelsea to reach UEFA champions league finals! Posted by Hello


They have beaten the EPL champions Chelsea in the UEFA champions league semifinals! The match telecast was at 1AM in the middle of the night. Just 4 mins from the start, the Luis Garcia goal was enuf to send me into a frenzy - jumping and screaming "GO REDS!". I'm sure the neighbors would be cursing for the midnight madness :-)) You can go have a look at the match report here.

Chelsea needed a defeat to shut their ego filled mouths and asses! Liverpool played really well. The strategy was simple - get a goal asap in the first half and defend for the rest of the game. That's exactly what they did. Even though Luis Garcia scored the all important goal, the real heroes were the Liverpool defenders - Jamie Carragher, Sami Hyypia, Steve Finnan and Djimi Traore. Salutations to all the defenders - you rocked! Yay!

Here's to all the reds! [CLANG]

Tuesday, May 03, 2005

Echoing advice

After all the advice that I received since last week, now I stand here in an I-don't-know-what state. I don't know 'cos I can give at least 10-15 words to describe my mood rt now. Its not as simple as a finite state machine to describe a human condition.

Of late I've become very obsessed with observing people. Its very interesting to observe people, how they react to the various situations that they're faced with. I don't end up making a judgement as to whether their actions were correct or wrong, but I just like to observe and record some aspects of human behavior. Being a passive observer has helped me a lot over the last month or so. In other words, I've become more passive than I ever was. Its been good for me actually - I mean, not involving myself deep in anything, just sit at a distance and watching things happen on their own. This might just be a passing phase, but definitely one that has benefits...


There are many questions for which trying to find an answer is futile! These are some questions I was asked during the last 3 days!

1) How can I transfer 4 bit value over an 8-bit wide bus?

2) How do I know which is the best programming language?

3) How can I pass a value by reference in C?

4) How can I access kernel memory from a user space pointer?

Life's like this

Its the little things in life which hurts... wanna know how??
Well, you can sit on top of a mountain, but not on top of a pin :-))

Monday, May 02, 2005

Weekend adrenalin rush

End of a long n exciting day! Posted by Hello

Jaladhaama - Cauvery island resort. That was our destination on saturday. It was really hard to wake up all the guys as early as 6am in the morning. The plan was to leave by 7-30, but it was 8-45 when we eventually left after much discussion about where to have breakfast! The drive was great! One can imagine the adrenalin levels when the car stereo is playing Master of puppets and all the occupants are singing along at the highest decibel level possible! :-) The whole journey was all about playing core metal songs and singing along without giving a fuck to the world around. One needs such a ride from time to time. There was so much done at the resort. 2 hours in the swimming pool, playing cricket in the water, a game of volleyball in the hot sun, then basketball, table tennis. We had a late lunch at 3 and slept like dogs on the hammocks that were present everywhere around the place. The one hour boat ride was superb. The water was so clear and sparkling. Mind you it was very deep though! We got wet with our clothes on below the waterfall. Fully rejuvenated, we left the place at 5 and reached back at 8. There was a tree that was cut in a very peculiar fashion. It resembled a middle-finger! :-))

Looking back on the fantastic weekend, I forgot all my worries and tensions and now am back to work with a fresh outlook...