Thursday, March 3, 2011

C++ funny quotes

Reading a good C++ book is really fun. Everything in C++ is so well thought out that every single line in a good book is full of enlightenment. I am reading a book called accelerated C++. The name may suggest that it is just another "learn C++ quickly" kind of book but don't go by the name (a book should never be judged by name anyway). The book is a master piece. It's one of those books where it would be difficult to take anything out or add anything else in, it seems so perfect.

Anyway, what I wanted to write about was the funny quotes that you keep encountering while reading C++ books :). I will keep adding them below.

1. Bang you're dead ( accessing out of bound memory)
2. Instant disaster (returning pointer to local variable from a function)
3. What happens at this point is anybody's guess.

Tuesday, February 15, 2011

Nice Quote

"Being humorous in an agreeable way."

Marcus Aurelius - about Maximus.

Saturday, January 1, 2011

Vim plugins I have started using

NERDTree - Best file explorer for vim that I know of
TComment - Commenting made easy
MRU - Most Recently used files
Matchit - Match more than brackets
SuperTab - Awesome tab completion

Saturday, August 14, 2010

VIM

I stumbled across a good vim book today and started reading. vim has mind boggling number of features. I just discovered an interesting one today. In vim you can jump to a particular character on a line very quickly. In the command mode just press f followed by the character. E.g. if you want to search for the letter 's' just type 'fs' and the cursor will move to the first location of s on the line.

I also practiced the recording feature today. q is the key used for recording. Like many other functions the recording feature also uses alphabets to store various states. Recording is done as follows. Press q followed by any alphabet that you want to identify the recording with. Let's say we use b as the alphabet. So press 'qb'. When you do that vim will show you the message 'record ing' in the status bar at the bottom. Now just perform any operations. When you are done press q. This will stop the recording, which will be identied by the alphabet 'b'. To run the recording press ampersand followed by the alphabet. For example in this case press '@b'.

Monday, July 12, 2010

Venice

The first pleasant surprise that Venice greeted us with was that there was no road in front of the railway station. Instead there was water with boats on it. Another first in my life, that was courtesy of this Europe trip. We were warned about the smell of water that supposedly hits one when putting foot on Venice the first time but somehow it didn’t hit us.
It was really hot in Venice. Our hotel was located at a very good location: near the Giardini or Garden created by the great Napolean, sometime in the past. It was located at just the edge of the famous Venice island, near yet away enough to save us from the hustle and bustle. Our hotel was a full four floors above the ground and there was no lift. We hated those stairs for all of our three days in venice.
Venice is a collection of many small islands which are close enough to be joined by small bridges which have become so famous. They used to be made of wood in the medieval times but have been converted to the current stone structure as recently as the 18th century. The canals running between these pieces vary in width a lot. The biggest and widest canal is the Grand Canal that divides Venice into two. It looks spectacular at night. Water is said to be very romantic. If this is true then Venice is the most romantic place on earth, for there is a lot of water and in a very gentle form. The best way to pass time in Venice, in my opinion, is to sit on the banks in the evening and just see the water play, always promising to touch your dangling feet.
Venice is also a very happening place. There are numerous beautiful shops. The island is almost a never ending bazaar. All the biggest names in fashion are here, along with innumerable street side cafes that serve a variety of European food items. Surprisingly, the variety in non-European food was almost absent. It seems that there is only one Indian restaurant there and that too did not have good reviews so we skipped it. We lived mostly on Pizza and pasta. We must have walked a lot in Venice but it was a breeze compared to the earlier part of our trip for there wasn’t much time to walk. It was exceptionally hot in the day.
Did I say hot? It wasn’t hot, it was scorching. Here was how we spent a typical day. We would get up really late, 9:00. Leisurely do the routine of toilet plus brushing the teeth with just enough time for the breakfast. After breakfast, leisurely do the bathing and preening routine. Then lie down on bed to read something or watch tv. Sleep, get up, watch tv, may be sleep again etc. At about 4:00 go downstairs and outside. Find that it is still hot. Go upstairs, curse the stairs, lie down. Until about 6:00, the time when it became good to go out. Leisurely get ready again and step out at 7 to curse the wasted hour from 6 to 7 that could have been used. Enjoy Venice from 7 to 10, just walking in the beautiful streets, running between beautiful houses and shops decorated with flowers, to meet the beautiful water, alongside beautiful people. At 10 the interiors of the island turn suddenly quite. The activity then concentrates on the banks of the Grand Canal and major squares. The streets becoming so deserted as to appear unsafe. Of course they must be safe but we were new and helpless because of being ignorant in Italian. Before 10 we would reach San Marco square, from where we knew we can just keep walking on the side of the Grand Canal to reach our hotel. At San Marco, or thereabouts, we would find a spot near the water and just spend time watching it. There is always some music playing in the night at San Marco. Music, lights and water combine to create a serene dream that marvelously seems to have persistence about it. It is not ethereal but real and has been there forever. Almost everything about the place is beautiful. I suspect that it appears even more beautiful while remembering then it must have been because until now I felt that InterLaken and Cinque Terre were the most beautiful places in the trip. I guess it takes time to take in the beauty of a place as exquisite as Venice.

Saturday, June 19, 2010

Paris

Well, let me say it. Paris is the best city I have ever been to. I
love Paris. The city is an eternal mash of Maple lined, often cobbled,
streets with innumerable road side cafes. Parisians are really
friendly people who are very cultured. I wish I lived here.

Thursday, June 17, 2010

Paris

So, we are finally in Paris. Our plane journey consisted of two parts.
First let was from Delhi to Doha and the second one from Doha to Paris.
It turned out to be an interesting experience.

The first part of the journey turned out to be uneventful except that,
for the first time in my life, we got upgraded to business class. The
business class experience was awesome. The seat turned into a bed and I
slept through the flight. Rashmi tried a few things, including thee big
TV and amazing bathroom.

We had a 7 hour stop over in Doha. We got free breakfast which was good
because otherwise it would have cost a packet. Doha airport is really
expensive, our lunch cost us Rs 750. We also did not have appropriate
electricity adapter so couldn't fully utilize the free internet in the
Airport.