Thursday, July 17, 2008

So We'll Go No More a-Roving

While browsing idly on the web, I found this touching poem by Lord Byron. Quite aptly, a blogger has used this as his RIP post.
Paraphrasing it here for future reference

So We'll Go No More a-Roving
SO we'll go no more a-roving
So late into the night,
Though the heart still be as loving,
And the moon still be as bright.
For the sword outwears its sheath,
And the soul outwears the breast,
And the heart must pause to breathe,
And love itself have rest.
Though the night was made for loving,
And the day returns too soon,
Yet we'll go no more a-roving
By the light of the moon.

Thursday, July 10, 2008

Movies 2008: Atonement



When I first watched the movie, i turned it off after 20 mins. It was not very interesting and I didn't like the strange British accent in the movie.
After few days I gave a try again and I was not disappointed. In fact the first 45 minutes forms the core of the movie and the rest of the movie was an after effect of what happens in the first few scenes.
The background score for the music is very nice.

This is a very slow moving movie ,and becomes increasingly moving as it progresses. Watch it if you like tragedy movies.

Sunday, June 29, 2008

A farewell email

After working for 6 years,I resigned from my previous company on 27th June. It was a sombre and overwhelming feeling .Particularly this send-off email from our team members was very touching and made me feel very proud.

Movies 2008: Love in the time of Cholera.




This movie is about a man who waits for years to marry someone he loves. Its based on a novel . A rather slow movie that you should watch on a weekend with lot of time to spare :).
I liked some of the dialogs in the movie ,and the poems which Florentino Ariza writes for lovers.
If you are in a romantic mood and have LOT of time, then this movie is for you:).

Movies 2008: Into the Wild





Into the Wild will remain in my list of all time favorites. Its an adaptation of the life of a trekker Christophe McCandles .
This movie was a pleasure to watch. The scenes of this movie were poetic with subtle meanings.The songs penned and sung by EddieVedder added more beauty to it.
This movie and the songs in it will remain in my memory for a long time.
I highly recommend this movie .

Movies 2008: There will be Blood



I wanted to watch this movie after Daniel Day-Lewis won the Oscar for the Best Actor for his performance in this movie.
It shows the life of a person as he climbs up the ranks of his life to become a powerful oil tycoon.
The movie is quite lengthy and at times it was moving at an uneasy pace.But as the movie progresses you see the various facets of Daniel Plainview.

I would not suggest this movie for a leisurely Sunday afternoon. Its not the usual masala movie with a 'happy ever after ' kind. As the title says,its about hardships, greed, and a LOT of blood (a sample of which is shown in the first few minutes).
So watch it if you can withstand this for 2.5 hours .

Movies 2008: Children of Men




I watched this movie on recommendation from a popular site. Its somewhere around 2020 AD and the world is divided with problems of immigration,global warming, guerrilla warfare etc. Worse , all men/women have lost their ability to have children and there is no child birth for almost 18 years.
Its a dark depiction of our future. The movie is full of gore and blood and most characters in the movie die.

I didnt like the movie much .Its not for the casual viewer. I would consider avoiding this movie.

Movies 2008: American Gangster



I wanted to watch this movie for its director. I have great respect for Ridley Scott
most of it after watch some nice movies that he has directed.
American Gangster is about the rise of a mafia leader (Denzel Washington) and how a sincere officer (Russel Crowe) nabs him and his invisible network with meticulous planning and hard work. The movie has all the aspects of a masala movie .
I enjoyed watching this movie .I also liked the scene where FrankLucas is finally arrested outside the church in a quite/bloodless manner.
A decent movie which you could watch once.

Sunday, May 4, 2008

C++ Recommended Books.

C++ is a language with lots of concepts and there is no one book that details all its features nicely. Here is a list of books you could read on to master this language. Read in the order listed.
  1. "Accelerated C++" Andrew Koenig and Barbara Moo.
  2. "The C++ Standard Library" Nicolai Josuttis.
  3. "Effective C++" Scott Meyers
  4. "More Effective C++" Scott Meyers
  5. "Effective STL" Scott Meyers
  6. "Exceptional C++" Herb Sutter
  7. ""More Exceptional C++"" Herb Sutter
  8. "The C++ Programming Language" 3rd edition or later Bjarne Stroustrup
  9. "Modern C++ Design" Andrei Alexandrescu
  10. "C++ Templates: The Complete Guide" Vandevoorde and Josuttis
  11. "Standard C++ IOStreams and Locales" Langer and Kreft
this list is from here. Books in BOLD font are the ones that I have already read in part and would recommend to others..

Friday, May 2, 2008

What happens when we call a function in C++

Here is an excerpt from Herb Sutter's blog about the process in which a function call invocation is handled in C++.

As soon as a function of an object is invoked like obj->function_within_obj() ,
the c++ does the following:
  • First comes name lookup: The compiler looks around to find a function having the requested name. It starts in the current scope (in these cases, the scope of the class we’re calling the member function on) and makes a "candidate list" of all functions having that name; if the list is empty, it goes outward to the next enclosing scope (e.g., namespace or base class) and repeats. If it makes it all the way out to the global scope and still finds no candidates, sorry Charlie, you get "name not found."As soon as a scope is encountered that has at least one function with the requested name, the compiler goes to step two.
  • Second comes overload resolution: If the candidate list has more than one function in it, the compiler attempts to find a unique best match based on the argument and parameter types. If two or more functions are equally good (or bad) matches, sorry Charlie, you get "ambiguous call."
  • Third comes accessibility checking: Finally, the compiler looks to see whether you may actually call the function (e.g., that it’s not private). If you don’t have clearance to call the function, sorry Charlie, you’re not calling from within a derived class, a member function, or friend function and you should have thought of that before trying to access an inaccessible protected or private function. For shame.

Movies 2008: JUNO



I watched this movie on recommendation from a friend. The movie deals with the problems a high school student faces due to an unwanted pregnancy at school. The movie is witty and the dialogs are pretty sharp.

I was not able to understand some slang used with the movie. Apart from that this is a decent movie that you could watch once.

Thursday, April 24, 2008

Creating Shared Objects in Linux- A primer

Here is some information on the various nuances involved in compiling and using DSO's in linux.

Lets assume the name of the source file is libhello.c. If we wanted to create a dynamic shared object we compile the file with the following flags.
gcc -fPIC -O2 -Wall -shared libhello.c -Wl,-soname,libhello.so.1 -o libhello.so.1.0

Meaning of the compiler switches:
-fPIC => This is a compiler option that instructs GCC to create Position Independant Code.PIC is a mandatory requirement for DSO's.
-O2 => This specifies the level of optimisation to be used by the compiler.
-Wall => Generate all warnings.
-shared => This option instructs GCC to generate a shared object library.

-Wl => This is a compiler switch that is used to pass options to the linker .
-Wl,-soname,libhello.so.1 => this string sends the soname option to linker. The soname option sets the 'soname' for the shared object. The soname attribute is used by the dynamic linker at runtime to make sure the application loads the correct library.
The '1' in so.1 is used as a versioning for the API's exposed by the DSO. If we upgrade the API such that its not backward compatible anymore,we should change the number in the soname.

-o libhello.so.1.0 => generate the shared object with name as libhello.so.1.0

Symbolic links to the DSO:
After generating the so, we need to create some symbolic links.

ln -s libhello.so.1.0 libhello.so.1 ==> This link is used by the dynamic linker during runtime .
ln -s libhello.so.1.0 libhello.so ==> This link is used by the compiler when we link this shared object
as -l hello

Why should we have the so.1 and so.1.0 => The 1 in so.1 is used to version the API level changes. The extra versioning in so.1.0 is used to track any change in the DSO (this may not may not break the API compatibility).
Hence we have 2 versions.

LD_LIBRARY_PATH : Includes the directory of libhello to the LD_LIBRARY_PATH,so that the dynamic linker searches for libraries in this path.

ldconfig: The ldconfig command is used if we want to move our libraries to one of the standard system locations. This command also sets the symbolic links that we did manualy. This is a system administrator command .So ,to run this command you should login as root.


The rpath linker option: Another important linker option used during development is the -Wl,-rpath. During development, there's the potential problem of modifying a library that's also used by many other programs -- and you don't want the other programs to use the `development' library.
To resolve this, we used ld's 'rpath' option, which specifies the runtime library search path of that particular program being compiled.

From gcc, you can invoke the rpath option by specifying it this way:
-Wl,-rpath,$(DEFAULT_LIB_INSTALL_PATH)

If you use this option when building the library client program, you don't need to bother with LD_LIBRARY_PATH other than to ensure it's not conflicting, or using other techniques to hide the library.

Thursday, April 17, 2008

Movies 2008: Good Will Hunting.



I wanted to watch this movie for long. The movie was very nice.
I liked the performance of Robbin Williams and Matt Damon in the movie. The movie also has some powerful quotes. Especially the ones that Will Hunting says during his first session with MattDamon.

This movie is classic.I would recommend anyone to watch it at least once.

Movies 2008: No Country for Old Men



I read about this movie at kirukkal.com . When I downloaded the movie I didnt know much about it .Thought it would be a nail biting thriller etc.

The movie starts, and within a few scenes things get quite serious. Javier Bardem's role as Anton was extraordinary. So much so that you feel very bad/frightened each time he comes on scene.

The weapon he uses to kill ... How did the directors thought about it!

There is very little music in the movie but a morbid mood is always there.
At the end, the movie leaves a very bad taste in your stomach . Not a movie to watch on a leisurely day friends. But if you are serious about movies and you like movies like SinCity ,PulpFiction etc this one is for you.

Though I watched once, the scenes are etched in my mind. May be thats why the Coen brothers got their oscars.

Saturday, January 12, 2008

Some movies that I liked (2007).

After getting a BB at home, I had the chance to watch some nice movies last year..

Here are some movies that I liked

1. The Pursuit of Happiness --
Will Smith's acting was very good. A touching story indeed. The scene where Will Smith gets selected for the job : very nice.

2. The Life of Others (German) --
My first non-English /European movie.Read about it from a blog . Barring annoying subtitles (which were always out of sync) from opensubtitles.org, I enjoyed watching the movie .

3. Fight Club
A movie with interesting twists. Lot of blood and gore.But worth watching.

4. Forrest Gump.

5. Finding Nemo

6. The Pianist

Tuesday, January 8, 2008

Foreclosing a loan

Here are the list of things to check before one closes his loan in advance.

1. Inform the bank about the date of pre-payment through a letter.
Its better to give a month's notice to the bank.This gives time to the bank to calculate the exact outstanding interest and penalty that has to be paid. (if any).

2. Take a letter from the bank regarding the exact amount that needs to be paid and the break-up of the amount. Also,ask for acknowledgment of the cheque through which you prepay the loan.

3. You will get the documents once the cheque gets cleared. Takes usually 15 days.

4. Check the original documents received from the bank with the duplicate copies you have kept. Ensure that EVERY SHEET is intact.

Closing a homeloan

Here is a small write up on closing a home loan and the documents that need to be collected from the bank:

1. Request for an acknowledgment of the cheque through which you pay the last EMI of the home loan. The bank will return your documents once the cheque gets cleared.

2. If your home loan is from a cooperative bank and you are paying your last EMI in cash, you will get your documents right away.

Documents to be collected from the bank on closing the loan:
1. A letter specifying that the loan has been closed. This usually includes a no-dues certificate. This document is very important whenever you are going to sell your home or your car.

2. An account statement for the entire loan course.This will help keep a record of all the payments that have made and income tax benefits availed.

3. Obtain a letter specifying your payment track record. This would help in case you take any loan in the future.

4. Get your title documents of your car or home ,or any other security that you may have deposited with the bank while taking the loan,apart from agreement documents.