Skip to main content

Posts

Showing posts from June, 2005

Do Your Best

A very long time back I had read in a book: “Do your best and let god take care of the rest”. Sounds like a very simple line but if you think of it carefully it actually sums up the essence of how we must live our lives in just a few words. All of us have experienced times when we do not have any control over what happens. All we can do is try our very best and pray that events turn out in our favor. In such times it is very easy to fall prey to fatalism and think that all events in our lives are pre-destined. But in reality it is not so. Ramana Maharishi used to say that the only control we have is over our reaction to events that happen to us. It is this reaction that sows the seeds of future events. If the reaction is positive, meaningful, and benign then it will pave the way for better future events. The Bhagwad Gita preaches: “Perform your duty in the best possible way and relinquish the fruits of your actions to god”. Applying this simple principle will help us lead meaningful, c

Writing, does make you think

Yesterday I send an email to some friends about a particular Java feature. The original email read "JDK 1.5 has introduced a cool feature to allow overriden methods to have different return types". I had just read about this feature in a newsletter and decided to share it. However just before clicking on the 'Send' button, I decided to review the mail to ensure that it was correctly phrased (I always have to review my first draft... even if it's just a line :-). While reading it again, I stopped at the word 'cool', and thought to myself - Is this a cool feature, or is it just a feature. Was the use of 'cool' appropriate here? This made me think a bit more about this feature. This feature was intended to remove the hassle of downcasting an object returned from a method. But wouldn't different return types for overriden methods break the "program to an interface" concept? Now the client code has to know the exact subclass that it is ca