Friday, January 17, 2014

Up and higher...

She sat on the top most branch of the neem tree wondering what's beyond the line of hills partially hiding the evening sun. The sun seemed to be angry at her for all her boldness and adamancy. She's already miles away from her family in the pursuit of life beyond their confines. Her well wishers tried with all their might to bring her wishes back to their world and tie her down. She couldn't reason out with them but she knows she had to do this.

None of what she spoke made sense to her mother. She was afraid of speaking to her father about it. The only person who seemed to understand is her best friend. She looked at her with concern and said "Let's say all you wish comes true. What happens after that? How do you live?" She never wanted to answer her best friend who seemed to speak like her conscience. She was to an extent impatient with her best friend and her conscience too for having to do all this explanation for her very own life and her freedom. She simply wanted to fly away... far away... up and higher... into the clouds... beyond the hills... as far as the wind takes her.

Her wings opened wide... wind brushed her feathers... her eyes shone with joy... heart beat fast. 

O perl! O my love!

O my perl, will you have some Java with me?
You know, I really like L&F of your CSS.
Don't be hesitant because I'm a C++ guy.
You will C, sharp guys are hard to find.
No Python can come our way.
I know you are well :-JRebel.
O my ruby, on rails we can roam the whole world!

Yours RESTfully


(Inspired by a post - Why is it convenient to have a software partner)

Wednesday, January 01, 2014

Complicated investments!



The interest on education loans or home loans is compounded by banks every year at 9-10%.  But, the returns we get on our investments may not be compounded in the same way in plans like some endowment policies or ULIPs. Here's a word of caution while trying to choose your investment plan. I created this java utility class to calculate the final amount I get in one of my investment plans - 198405, when I invested 24000 every year for 7 years compounded at the rate of 5.5%. To check this fact, just replace the 5.5 with 10. There's a difference of ~23000, which is almost an year's investment!
  
/**
In the interest of public
@Author yoursTruly
*/

public class UlipInterest {

    public double sumInUnitDuration(double principal, double rate){

    return principal * (1 + rate/100);

    }

    public double totalAfterUlipDuration (int duration, double principal, double rate) {
        double tempSum=0.0;
        double tempPrincipal= 0.0;
        double totalSum = 0.0;
            for(int i=0; i
            if(i==0){
            tempPrincipal = 0;
            } else {
            tempPrincipal = sumInUnitDuration(tempSum, rate);
            }
           
            tempSum = principal + tempPrincipal;
            //totalSum += tempSum;
            }
            return tempSum;
    }
   
    public static void main(String args[]){
           UlipInterest uInt = new UlipInterest();
           System.out.println(uInt.totalAfterUlipDuration(7,24000,5.5));
    }

}


Comes handy if you want to check if the interest on your investment is matching your interests!