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.
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.
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.
By Rajeshwaran S P
When I logged into the machine today, I was shocked to see no panel appearing on the ubuntu desktop. I thought the computer has hung. But when I right clicked the desktop, I got the regular pop-up menu and was able to change desktop wallpapers.
Here is what I did to get the panel back. With the desktop without the panel and not remembering any of the shortcuts, it was quiet difficult.
First, I created a launcher for Terminal. Right Click on any area on the desktop and then choose ‘Create Launcher’. Choose any name and then in the command text box, type in
This should create a terminal launcher. That done, double click to open a terminal session. Enter the following command,
Then right click on the desktop to create another launcher. This time in the command text box, type in
This creates a gnome-panel launcher. Double click and viola! you have the Panel.
By Rajeshwaran S P
Little lately, I am obsessed in finding the best font to use, when I do the coding. I try to keep the same font across all editors and IDE’s that I use. The first font that I loved was ‘Courier New’ set at 10pt.
Then with VS2008 came in a new attraction for Consolas a true type font from Microsoft. Consolas is really good. And it appears even better on TextPad, jEdit and VS2008 IDE.
Last month, I began using Anonymous font. I would have sworn by it, if not for Monaco.
Now I use only Monaco. Smooth and pleasing! So what fonts do you use.
By Rajeshwaran S P
Angels and Demons, starring Tom Hanks. An adaptation from the book Angels and Demons by Dan Brown. It is one of the books I enjoyed reading, a unique blend of art of Rome and fast paced thriller. But on seeing the movie, I was totally disappointed. Here goes my reasoning behind it.
I expected to see Rome and its beauty. Its churches, the art of Bernini, in its regal splendour, if not in the entire movie, atleast some portions of it. I expected to see the cardinals chanting the Carmelengo’s name, it is the highlight of the book. The speech between Langdon and Carmelengo, the speech that Carmelengo gives to Cardinals to justify the war between the church and science, the BBC correspondent and his adventures. I expected an aerial view of Rome, showing the giant cross that marks the Path of Illumination. I expected the final Illuminati symbol, the Illuminati Diamond to be shown.
Lots of expectations, but all these were missing in the movie. So my verdict will be, if you have already read the book, Avoid watching the movie. If not, go and do watch it.
By Rajeshwaran S P
To fix the error, “This application has failed to start because LIBMYSQL.DLL was not found. Re-installing the application may fix this problem.” while working on rails using mysql as the database,
Copy the libmysql.dll found in the mysql installation directory (mysql\bin) and paste it in your ruby installation directory (ruby\bin)
Restart the server and viola, the error is fixed.
By Rajeshwaran S P
Today, I complete three years in the professional software industry. I thank all who have lent their helping hand in making the journey possible for a guy with little knowledge in software to what I am now. There are still hundreds of miles to go. This is just a small step.
Three years. Why is this special? With three years experience, you are no longer considered a newbie. People start to have expectations out of you. You are supposed to have atleast some basic understanding of how a professional software project setup is and how it operates. You are given more responsibilities in the projects. You also qualify for most next level positions in all the job search engines like Naukri or Monster.
So what have I learnt or unlearnt in these three years? I should say a lot. They may not be big things, but they surely are something that is really needed.
Things that I have learnt:
- Debugging a program
- Searching the internet effectively (Googling up things)
- Write effective emails.
- Sell solutions to the clients.
- Work as a team.
- C# and the .Net platform. (Yet to start using the features in version 3.5)
- Technical Writing.
- The bare minimal HTML, CSS and Javascript.
- Talking on conference calls.
- Using Source control.
- Unit Testing.
More to learn, more experience to gather, more to everything. Yet again, I am forced to quote, “Miles to go, before I sleep…”. Will be sharing the experiences here on this blog with you, as and when they happen.
By Rajeshwaran S P
Borrowing the idea from Sharon’s post on prophecy of dreams, here’s my take on dreams.
Dreams are a way to vent out your mind, that is what my mom says about dreams. They reflect the deepest desires in your heart. I dream a lot, by lot I mean everyday. All my dreams are centered on the theme “Me, Rajeshwaran”. I always and mostly 99% of the time dream in the first person, i.e., I dream where I do things, not that I see me doing things.
One that I have told all my friends about and to the person involved in this:
“I am in my college’s hangar (MIT has a hangar, where aeroplanes are supposed to stand. We use it for conducting culturals and indoor games, that is a different matter altogether), sitting in the very last bench in one corner. I see her (the heroine), coming a taking a seat next to me. I am in a sober mood. She starts the conversation asking me why I ignore her. She asks me to come closer and sits next to me. (I still remember with precision, the dress color she was wearing, a black shirt with white flower patters and a sky blue jean). One of our college professor, a close aide of her father, sees us there and moves past us. The scene ends there. (Might be, I changed to a different position in sleep, that changed the course of the dream). It again starts, where she and myself are holding hands together, ready to begin a run. We are chased on a bike by the same professor, who saw us chatting. We run across our college roads and reach the Rubber and Plastics Department. There we see a small cottage (There is no cottage in MIT near RPT dept.), we enter it, actually it a small illicit arrack shop. I search for known faces all over, I see a very close friend of mine coming towards me. He asks me why I had brought her to this place, I tell him that the professor is chasing us. We turn back, at the entrance. we see her father standing. He calls out her name and asks her to come with him. She just hides behind my back and says, “I want to stay with Esh.”
There the dream ends. What to conclude from this dream? But the dream was one that I will remember forever.
Some one month back, I had a dream, where I am standing on a mud path. I have to go some route, I see a lion eating a deer lying on the mud path just ahead of me, turning to the right, I see one more lion roaring and getting out of a small pond on the way. I turn to see another path, where a tiger is just lazying. I decide to take the path, where the lion is eating a deer, my consciousness in the dream, says, since the lion is eating he won’t mind you taking his path. Totally weird dream, could not make a head or tail of it.
Just share your dreams. I invite Sudar, Yuvi, Sukumar and Kaddu to continue on this meme “Dreams”.
By Rajeshwaran S P
I have a very weird feeling in me today… I feel, I look nice and better today, smart, handsome. I am feeling intrinsically happy. I don’t feel words to express this feeling. I feel light.
Wow! This is something you got to experience. What is happening to me? This is not love. Come on, (Sudar, Soms, Sri and Mani … wicked…), believe me. I have not met any girl, to turn me inside out. I am not lying.
I am experiencing a high! This feeling is really good. Light on mind and heart. Let me celebrate with some great Rock numbers…
|
About Raasukutty's is a personal website. I blog about my everyday life as a person, friend, software engineer, indian national. Topics vary from personal life to coding. More about me...
|