The Reality Of New Year

As a new year is about to dawn on us and a portion of city is on the streets in the name of "party", I sit here in the tranquility of my house along with my family feeling a mixture of amusement and confusion at this uncanny behavior shown towards the concept of New Year for I cannot quite fathom what a change in the third column of date can quite possibly bring.

Yes I understand what New Year means. Scientifically, it denotes the completion of the Earth's rotation around the Sun (neglecting of course the 1/4th extra distance); teenagically another chance to have great fun with friends; parentically it denotes a sudden increase in the expenditure column and the hopes of better fortune come the new year; grandparentically it means calls from their children; commercially, time to cash in.

Though every New Year is welcomed with a bang, all the party and merriment ends as quickly as it "bang" and finally ceases into a quiet, calm day - just like any other. Come Jan 2nd, we all return to the everyday routine - the same commute, the same job, the same everything. Two consecutive days, two totally different ways of living it. How human.

Of course that's only one view of seeing things. And every coin has two sides to it right?

Every one makes mistakes. It is only human to do so. And we need a fresh start more than once to properly sort things out. New Year is one way of mentally giving ourselves that "fresh start". For doesn't New Year indicate the wonderful beginning of another set of 365 days with a clean slate? It fills people with hope, joy and above all a sense of togetherness.

Jan 1st is the day when we both look back on the past while contemplating the future, all being done in the present. It gives us that all important chance of analyzing what we have done, what we are doing and what we are going to do.

As the fire crackers begin to fly, channels showing people jumping around i come to the end of this year now. And I as I want this to be the last thing I do, I have only one more thing to say.
Cheers, ppl.

The Story As Hero

One fine evening ( I know this sounds like such a cliche, but still...) my friends call me to see some movie called Bommalatam. I hadn't seen much movies lately and as my interests in movies have been steadily falling I had no idea what the movie was about. I actually thought I was going for a Telugu movie or something :)

Ten minutes into the movie i got the feeling that this was no hero-falls-in-love-with-heroine-and-fights-the-villain kinda movie. This surprised me. Cos, for almost a year most of the films have had love as the story's core and I am fed up with them.

I admit the first half was bit confusing but still by no measure boring. It was little hard to keep up with what exactly was going on. And before i knew, it was interval. Another odd thing for a tamil movie for it seemed it was a 1 hr 45 min movie. In that intermission gap i learn the movie was supposed to be a thriller. The first half agreed with that.

Second half is the part where the movie kept me guessing. Having seen few weird english movies, i thought of all kinds of possible story lines. And when the plot was revealed, I admit not in a thousand years could I have guessed it. There is also few other twists that catches the viewers off-guard.

But all this doesn't mean the movie was a perfect one. Far from it. It had it's own share of loop holes and drawbacks. But the story more than makes up for it.

Finally a movie with a superb story. I left the theater with a satisfied feeling. Forty rupees well spent.

Prog - Private Members in Java/C++

Well as we all know private members of a class cannot be accessed directly by objects. We need to use member functions to access them. This is true for all cases. Or so I thought until I encountered few cases where this ain't true.

For the first, one thing has to be understood. Memory for the member variables are arranged in a sequential manner. So by performing arithmetic calculations on the address of the public variables we can get the address of the private members and hence access them.

Second. I found this when i was looking at copy constructors. A sample copy constructor would look something like this.

class sample
{
private : int i,j;
public:
sample(sample A)
{
i=A.i;
j=A.j;
}
...
...
};

Here the object A seems to access it s private members without calling any of it's own member functions(the constructor it is present is not called by that object). Now look at the following code.

class sample
{
private: int i,j;
public:
void well( )
{
sample test;
test.i = 5; //test accessing it s private members without
test.j = 10; // use of any objects
}
...
...
}

So the point is an object created inside a member function of the same class can access the private members directly. Note that the member function should be from the same class. For eg if the well( ) func had been in another class it would show error that object trying to access private members.

There is of course another, much simpler way of accessing these private members. By simply changing the "private" keyword to "public" keyword :)

Note : The above logics are applicable in both C++ and Java.