• Home
  • About Me
  • Musings
  • Programming
  • Open Source
  • Computers
  • Society
  • Books
  • Design
  • Movies
  • Free Software

    Posted on November 26th, 2009 by Rajeshwaran S P

    I am writing this post using WriteRoom, one super working space on my new laptop Macbook Pro.  I got this one as one major purchase after I landed in US.

    I gave up my only companion the PC, to which I have been faithful since my beginning days in computers for a new Mac. Why did I take the decision? I still use Microsoft’s own Visual Studio in office for my development activities. So half of my time, I am on a PC and the remaining time I am on Mac. They both are a different culture. Everything about Mac, at least my first feel of Mac is it is beautiful.

    Design – It is Apple’s forte. It has that good finish, wonderful, artistic and everything about it. That is what captured me to it. Being a designer myself, I wanted to own it, and it just happened that I did it in the home of software development.

    I have no regrets with Windows or Linux, the two other operating systems I have used fairly so far. The first software that I have licensed, other than the OS is TextMate. It was a worthy buy. So I have bought a license for it. It feels good to own and work on licensed software. I feel as if I own it. I feel that I respect the work that goes into the making of it. I love open source and free softwares. If there is some great work going on, and you can provide your own contributions to it, yes pay them. It is not for the software, but the people behind it.

    In India, we use pirated software all the time. Piracy is nothing. Everyone has a copy of Windows, Office running on their machines. The cost of software in Indian currency is much higher compared to the US counterparts. People don’t like to pay for just a CD. We are used to the belief that if you pay more, you get more. For something as big as Rs. 13,000/- a CD doesn’t suffice, we look for something more bigger. We are used to thinking that way, just like grocery and furniture shopping.

    Since, everyone is used to using Windows, no one wants to move from the comfort zone offered by it and embrace free software. There has to be paradigm shift, if people should start buying software.

    How can that be achieved. It won’t/can’t happen immediately. Schools should start using Linux and open source softwares. Students must be encouraged to read code, tweak existing programs so that they get what they want. They must get that idea, the machine does only what they want it to do, rather than stand amazed at seeing the computer working. After all it is what it is programmed for. Then as they grow up, they will start appreciating software and by the time, they get their own computers, they get to choose what they want. They can buy a Windows or a Mac, or write their own operating systems.

    Lets make this happen!

    After all, it is necessity that is the mother of all inventions.

    Survival of the Fittest

    Posted on November 8th, 2009 by Rajeshwaran S P

    This is going to be a musing… A rant, a self confession, a analysis.

    WARNING: Boring rant ahead.

    I have never been to the kitchen at home, in neyveli, or in chennai. I was just as worried, when my company offered me a H1B visa and wanted me to work from the client’s location. I am a foodie. I can’t live without tasting the great Rice for at least one meal a day.  But things have changed quiet a lot now. I am cooking my own food here. What has changed?

    Is it love? Might me. My girl helped me pack all the luggage for me. She got me two good books on cooking. She wanted me to help myself so that I don’t miss home food. She packed up everything I would require. It was very nice of her to do it. Also my mom did the final touch ups. It must be that I am in love and I end up doing something to please her?

    Survival? I am reminded of the film ‘Puthupettai’. There are two songs ‘Oru naalil valkai’ and ‘Nerupu vaiyinil oramai’, two of my all time favourite songs. The theme of the film is ‘Survival’.  When you are pushed to the limits, you tend to fight back, face the reality, tend to move forward. The simple ‘Darwin’s principle for evolution’. Not perpetuation, or theory of natural selection, I am not going scientific here. It is just the ‘Survival of the fittest’.

    Just analyzing on the same subject, we tend to perform or succumb when we are pushed to the limits. The is a comedy in a film that I watched recently, where the comedian says ‘I am cornered’. This has nothing to do with this post. Is it survival or love or desire or just a new learning? Questions unanswered.

    Hey why am I ranting. Actually cooking is good. So why this post at all in the first place. I have time to kill!

    Getting Settled

    Posted on November 5th, 2009 by Rajeshwaran S P

    Here is more update on my life in America. It was hard finding an apartment here. Office is in Downtown area. I don’t own a car. So I had to consider that fact too, either, the office must be reachable by Public Transit or walkable.

    I found one. A nice and a beautiful apartment (That is how anyone from Chennai will feel about any house here). I am now a resident of Downtown, Richmond, VA. After the apartment hunt, then comes setting aside enough money to furnish your apartment. I had to buy a bed and a few kitchen utensils, the minimum requirements to stay in any apartment. With no car to get to places to shop, I resorted to shopping online.

    In India, we just buy a bed (wooden or steel), then we order a mattress or we just leave it off. Here, we have more. First you have to get a bed frame, then a box spring, then the actual mattress. Still, I have not gotten used to not tracking dollar conversion to rupees. I have asked my stupid mind to stop counting it. And there are 4 sizes to choose from, King, Queen, Full and Twin. That is when my college friend, Abhilash (Nair as I call him), came. He was the friend in need. He has been here for sometime now, he dragged me to the omnipresent Walmart. And that ended all the shopping.

    We also made it a point to visit the local Indian Restaurant ‘India K Raja’ and the Indian grocery store, ‘Lakshmi Palace’. It was good to do a bit of shopping. Now I have moved to the new apartment. It is just 5 mins walk to my office. Also the SSN application is over. I am getting settled.

    First Week in America

    Posted on October 24th, 2009 by Rajeshwaran S P

    I arrived at the Chicago, O Harare Terminal on 20th October. Just like any other first time traveller to the United States, confused, excited, wondering, awe-struck, I entered at Terminal. My flight carrier was Lufthansa. It was a long day for me, I started from Chennai, India at 1:45 AM IST. I landed on Frankfurt airport at 8:29 AM German Local Time. Then the connecting flight landed me in Chicago at 12:26 PM CT. What a long day with 4 meals already done.

    Immigration and Customs were a breeze. I brought 2 huge check-in luggages, one with all items to wear here, and one with all groceries, equipped to run a Indian Grocery Store. Well packed with goodies, and love of my lover, mom and sister. I had my domestic flight that took me to Richmond, VA only at 4:49 PM CT. I waited all that time in the domestic Terminal 2, flipping through “2 States” by Chetan Bhagat. It is a nice book. (More about it in a separate post)

    There was Manoj here to pick me up. A nice colleague. He took me to a grocery store, restaurant and then to my apartment. He even took pain to see that I got myself comfortable in my apartment. Thanks Manoj, if you are reading this. Jaswinder Singh was there with him. He is my lead here. It was in his car, that I got to the Apartment.

    Till now, everything was fine. Then, I wanted to open a bank account, get a phone connection and all these wanted a SSN. God! Everyone and every service wanted to know my SSN. I am brand new to America, and I can’t survive without an SSN. The SSN application can be done only after 10 days, after my immigration information and I-94 forms have moved to the office. I was stuck.

    I work out of Virginia Retirement Systems office. It is located in the downtown area. Got used to the place now. I have started cooking. The second day, I cooked rice and ate it with “paruppu podi”. The next day morning, I did Top Ramen’s Noodles. Simple items though, this was my first try at cooking. Day before yesterday, I did “Pongal (Ven)”, it came out well. I was very happy! Today, I wanted to try more. So I cooked “Venkaya Sambhar” (Onion Sambhar). Though it came out with little salt, it turned out to taste good.

    From a software engineer, America turned me into a cook. Those in Richmond, looking for room mates, who knows to cook, you can look out for me. More ramblings in future posts! Watch out!

    And people out there, recommend me if I should take a separate apartment or go for a shared one with a room mate. Also, I hold a valid Indian License, will you advise me to buy a car and start driving now or 6 months later!

    Here I Come

    Posted on October 10th, 2009 by Rajeshwaran S P

    United States, Here I come. With lots of dreams, awe, fear, feelings. I am now an amalgamation of various feelings. I am about to get into a country, that had transformed dreams into reality for many, changed lifes completely from riches to rags and rags to riches. People chasing dreams, money and pleasure. A land that I have always wondered about all these years, Here I Come!

    Dreams of what is in store… Computers, People, Music and Stuff.
    Awe of the single name… United States.
    Fear of what is yet to come… How is America going to treat me, A lone traveller in a stranger land.
    Feelings of leaving home land, leaving home food, leaving my beloved here for a while..
    Questions about life….

    America! Here I come!

    Sick

    Posted on September 11th, 2009 by Rajeshwaran S P

    What a month!

    Started off, being sick  on the very first day! Loose Motion! Very loose I must say. I have not been having any junk foods recently. But then, I am having a running stomach now. It has been so for the past two weeks.

    Doctors! Wow! First when I visited, they gave me two tablets to stop it. Ya! it stopped! But then again it has started in two days. With it now the situation is quiet complex, I have fever, cold, cough and this loose motion stuff!

    Visited another doctor yesterday! She says that I have Stomach Flu (rhymes well with Swine Flu, she must have caught that term from there, marketing fellas wake up, now you have a new kid on the block). She says a Bacteria might be the cause. Yet she has prescribed medicines for three days, after which she says she might take the motion test.

    Another three days!!!! No Spicy food! No Oily food! Bread and Idly! Hope I get better soon!

    July – August Roundup

    Posted on August 22nd, 2009 by Rajeshwaran S P

    This is just an account of what happened in July and August, the period I have been passive on the internet. July 2 saw me turning into a Photographer at my friend’s Soms marriage. One event that I have been looking forward too for sometime. The wedding and reception were good. Special mention to the food served there, a buffet with stalls for Panju Mittai (What do they call it in English?), Pop Corn and Sweets. A different reception altogether.

    Then I received my first ever proposal, from a girl whom I have known so long, but have talked to very little in the recent past. A moment to cherish forever. That kept me busy for the remaining part of the month, deciding!

    Computers saw a sudden set back in my life, after nearly seven years! Cell phone took over a priority. Most of the evenings spent  and late night chit chats! Life is beautiful! I went on a trip to Athirappalli on the first week of August with Maarshal. It was a really nice trip. The second week I was sick at home. The third week went on visiting beach, giving parties and cinema halls.

    Between the wiring and painting work in our rented house is done. Now it is habitable, really nice interiors and colors. Wonderful lighting! Do visit! I promise a nice dinner or lunch to anyone visiting us.

    Have seen Ice Age 3, Nadodigal (thrice), Malai Malai, Aachamundu Aachamundu in these two months. Right now back in Neyveli, to have Kollukattai for Vinayaka Chathurthi.

    Happy Married Life Soms and Aishwarya

    Posted on July 3rd, 2009 by Rajeshwaran S P

    Somasundaram weds Aishwarya, on a fine thursday morning. One more member in my friend’s circle is happily married. To a girl of his choice, his first love, the only wish he had for some time now.

    Somasundaram – Met this guy during the second year of my college life at MIT. He was transferred from GCT, Coimbatore. He had the typical ‘Palam’ look in him. But he was ready to shed it the immediate instant he joined MIT. He could never speak more than a few sentences to any girl. No one ever imagined, he would fall madly in love someday, and never marry the same girl whom he loved.

    Life is really a interesting piece of mystery! When it reveals itself, you are a bit surprised. And really we were, when he revealed that he was in love with his team mate at his company. She, Aishwarya was in the testing team, and Soms was in the development team. When he announced his love to us, we would comment, “Instead of fixing the bugs that she reported, you fixed her”. An interesting person, he was, the comedian of our gang, the rocker who never listened to Tamil songs, till he found his lady love.

    I am reminded of the speech that Shahrukh Khan delivers in “Om Shanti Om”. “Happy Endings – If it is not happy, then it is not the end”. Here is one such really happy ending.

    Wishing Soms and Aishwarya, all the wonderful things on earth. Let them be blessed and ever live happily. For all those who missed the marriage occasion, here are some of the moments.

    Star Team : Missing Files from Source Control

    Posted on June 24th, 2009 by Rajeshwaran S P

    Here is a nice incident that happened today at office.

    We use Star Team for source code configuration tool. I wanted to move the location where I maintain the project files in my local system, from C:\ to D:\. So I logged into Star Team, and opened the project. Then I clicked on View -> Properties. This opened the Properties dialog. There I selected the “Alternate Path” option and specified the “D:\Directory”.

    Instead of showing all the files in the ‘Missing’ status, Star Team just didn’t display any folder excepting the Root folder. For any one who logged in after i made the change, Star Team just was reporting a ‘Not in View’ status, meaning, the file was not in the Star Team. Ah! It turned out that I had deleted all the files from “Source Control”… with a big stress on the word ‘Deleted’.

    Actually, we are living in a connected world. So it happened that, our Star Team administrator had removed the ‘Grant’ privilege on all of us as he was doing some testing and he didn’t want us to make change to the Star Team. What he failed to do was not intimating us of the grant change.

    So once, the grant was provided to all, we were all able to see all the files. That ended the case of the missing files!!!

    Here is the learning: To change Grant options: On the Folder Tree Menu, choose Advanced and then Select Child Folders. Then choose the users who need Access and Grant them the access to the folder. If nothing is specified, all are granted privilege to the folders.

    C#: Calculate Age in Years, Month and Days

    Posted on June 18th, 2009 by Rajeshwaran S P

    Today I was given the task of finding the age of a person, provided the birth date. When I was given the task, I just said, just use the DateDiff function. But it is not that simple.

    One thing I wanted was to keep the code simple and in a few lines of code. Here goes my first iteration.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    
             static void CalculateAge()
            {
                DateTime dateOfBirth;
                DateTime.TryParse("02/18/2008", out dateOfBirth);
                DateTime currentDate = DateTime.Now;
     
                TimeSpan difference = currentDate.Subtract(dateOfBirth);            
     
                // This is to convert the timespan to datetime object
                DateTime age = DateTime.MinValue + difference;
     
                // Min value is 01/01/0001
                // Actual age is say 24 yrs, 9 months and 3 days represented as timespan
                // Min Valye + actual age = 25 yrs , 10 months and 4 days.
                // subtract our addition or 1 on all components to get the actual date.
     
                int ageInYears = age.Year - 1;
                int ageInMonths = age.Month - 1;
                int ageInDays = age.Day - 1;
     
                Console.WriteLine("{0}, {1}, {2}", ageInYears, ageInMonths, ageInDays);
            }

    But then, there were problems with this method. If the current date is ’06/18/2009′ and the birth date was ’04/18/2000′, it returns, 9 yrs, 2 months and 2 days. The 2 days part is wrong. I didn’t have any clue as to why it appears.

    Then I went down to the basics, using elementary mathematics of subtraction. Here goes the second iteration of the code.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    
            static void CalculateAge2()
            {
                DateTime dateOfBirth = new DateTime(2000, 6, 18);
     
                int ageInYears = 0;
                int ageInMonths = 0;
                int ageInDays = 0;
     
                CalculateAge(dateOfBirth, out ageInYears, out ageInMonths, out ageInDays);
     
                Console.WriteLine("{0}, {1}, {2}", ageInYears, ageInMonths, ageInDays);
            }
     
            ///
            /// Calculate the Age of a person given the birthdate.
            ///
            static void CalculateAge(DateTime adtDateOfBirth, out int aintNoOfYears, out int aintNoOfMonths, out int aintNoOfDays)
            {
                // get current date.
                DateTime adtCurrentDate = DateTime.Now;
     
                // find the literal difference
                aintNoOfDays = adtCurrentDate.Day - adtDateOfBirth.Day;
                aintNoOfMonths = adtCurrentDate.Month - adtDateOfBirth.Month;
                aintNoOfYears = adtCurrentDate.Year - adtDateOfBirth.Year;
     
                if (aintNoOfDays < 0)
                {
                    aintNoOfDays += DateTime.DaysInMonth(adtCurrentDate.Year, adtCurrentDate.Month);
                    aintNoOfMonths--;
                }
     
                if (aintNoOfMonths < 0)
                {
                    aintNoOfMonths += 12;
                    aintNoOfYears--;
                }
            }

    And it works like a charm for all scenarios I throw upon it.

    Scenario 1:
    Current Date : 15 – 09 – 2009
    Birth Date : 09 – 03 – 2000

    Just a difference gives the result
    Age : 6 – 6 – 9 Result is 9 yrs, 6 months, 6 days.

    Scenario 2:
    Current Date : 15 – 09 – 2009
    Birth Date : 28 – 07 – 2000

    Here since 15 – 28 < 0: we borrow one from the month and then add the no of days in the month to the current date. 15 + 30 = 45: 45 – 28 = 17 days
    Then since one month is borrowed: 08 – 07 = 01 months
    Remaining is normal difference
    Age : 17 – 1 – 9 Result is 9 yrs, 1 months, 17 days.

    Scenario 3:
    Current Date : 15 – 09 – 2009
    Birth Date : 28 – 12 – 2000
    Here since 15 – 28 < 0: we borrow one from the month and then add the no of days in the current month to the current date. 15 + 30 = 45: 45 – 28 = 17 days
    Then since one month is borrowed: 08 – 12: So we are supposed to borrow a year and add no of months in current year to current month. 08 + 12 = 20: 20 – 12 = 8 months
    Since a year was borrowed: 2008 – 2000: 8 yrs
    Remaining is normal difference
    Age : 17 – 8 – 8 Result is 8 yrs, 8 months, 17 days.

    But I know there must be better ways to do it. Feel free to drop in code snippets. Comments too are most welcome.