Sunday, December 28, 2014

Modal dialog box and popups in Angular.js using ngDialog


If you are building an Angular.js application and wish to add a modal dialog box or a simple popup, then the ngDialog module provides an easy, simple solution. It provides two default css themes and we can also add our own custom themes.

Let's see how to create a simple dialog box with ngDialog.
For our example, we will have a base page with a button which when clicked will open a contact-us form as dialog box. The dialog box will have an 'OK' button which will save the changes and close the box and a 'Cancel' button which will just dismiss the box.

1. First, you need to download ngDialog.js and ngDialog.css (and the themes that you want) from https://github.com/likeastore/ngDialog

2. Create the base template - 'base.html'


3. Create the dialog box template - 'contact_us.html'

closeThisDialog() and confirm() are ngDialog's methods and they return an Angular promise object that is either rejected or resolved.

4. Angular.js code to handle the promise:

Now if you wish to add a popup message as per the response success or failure:

The plain option, if set to 'true' allows to use a plain string as template.
The API also provides a lot of other useful options and event handlers.


Saturday, December 06, 2014

Lookahead in regular expressions


As I was solving a couple of problems in Checkio, I came across a new concept - lookaheads in regular expressions. At first, it was slightly confusing to understand how lookaheads are different from normal regular expressions. But they actually prove to be very useful in certain cases.

Lookaheads are zero-length assertions as they do not consume characters in the string but only assert whether a match is possible or not. Positive lookaheads are represented as (?=regex) and negative lookaheads as (?!regex).

Example: 
    Hello(?=World) - matches any "Hello" followed by "World"
  Hello(?=World) - matches any "Hello" which is not followed by "World" like "Hello Today" or even simply "Hello"

The real power of lookaheads arise when you chain two or more lookaheads together.

Consider a password validation which requires the password to have atleast one letter and one digit. To construct a regular expression for this case, you can't use something like, "(.*\d)(.*[A-Za-z]) " as that implies one or more digits followed by one or more letters. So a password like "123hello" would pass whereas "hello123" would fail the regex. The regex engine would start scanning the string for a digit and when it reaches "123", there are no more letters following it, so it would fail.

Instead, this can be easily achieved by using lookaheads,  "(?=.*\d)(?=.*[A-Za-z])". As the regex engine begins matching the first lookahead for digits, it traverses the string "hello123" from 'h' till it reaches the digit '1'. The first lookahead is now matched. But since the lookahead doesn't consume any string, the regex engine again starts from 'h' till it reaches a letter which is 'h' itself. Now both lookaheads are matched and the entire regex returns true.

For a more complex password validation, we could use:
((?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[@?&$!]).{8,20})
which implies the password needs to have min 8 characters and max 20 characters. And it should have atleast one digit, one lowercase, one uppercase letter and one special character among "@,?,&,$,!".


Saturday, November 22, 2014

Configure Nginx for load balancing


Recently, in our project, I was asked to configure Nginx for load balancing as our app was becoming slow, owing to high traffic. I haven't worked much with Nginx, so I was a bit apprehensive at first. As it was Diwali holidays, nobody else was there in office and I had no choice. However, on fumbling around, it turned out to be much more easier than I had thought.

Imagine that you wish to run two different instances of your application to distribute the high traffic.
With Nginx, you can enable all requests to be proxied to your main domain, while Nginx takes care of distributing the requests to different servers in a round robin fashion.

Open the Nginx configuration file located at /etc/nginx/nginx.conf and add an upstream block and modify the server block as shown below: 

http {
    upstream yourapp {
        ip_hash;
        server domain1.com:8080;
        server domain2.com:8080;
    }

    server {
        listen 80;
        location / {
            proxy_pass http://yourapp;
        }
    }
}


That's it! Make sure your app is running on both the servers on your specified ports and then restart Nginx by running:
/etc/init.d/nginx restart

The ip_hash specified in the upstream block is used for session persistence so that subsequent requests of the same client can be directed to the same server. Nginx uses the client's ip address as a hash key to determine which server should be selected for the client's requests. Nginx also offers other options like weighted load balancing, least connected load balancing and health checks.


Sunday, November 16, 2014

At Wayanad - In the lap of nature


"Actually, the best gift you could have given her was a lifetime of adventures..."
- Lewis Carroll in 'Alice in Wonderland'

Last week, owing to Muharam and Guru Nanak Jayanthi, we again had a couple of holidays and as I was heading out on another trip, my friends at office were kidding me on how "she never misses a holiday". I never realized that I was travelling that frequently. But yeah, I love travelling and adventures. As a kid, I loved reading "Alice in Wonderland", her adventures as she falls through the rabbit hole and meets queer, interesting characters. The ever tensed rushing White Rabbit, the mischievous grinning Cheshire cat quoting philosophical points now and then, the Mad Hatter and March Hare always having a tea-party and singing an Unbirthday song, the hookah-smoking caterpillar, the melancholic and sobbing Mock Turtle, the Queen of Hearts whose only way of settling difficulties was "Off with his head!", every character and adventure was interesting and exciting. As a kid, I always hoped that some day I too would fall into a rabbit hole and have such wonderful adventures. But growing up, I realized that adventures and interesting people are all around us and we only need to open our hearts to embrace them.

As Roald Dahl says in the book "Charlie and the Chocolate Factory":
“And above all, watch with glittering eyes the whole world around you because the greatest secrets are always hidden in the most unlikely places. Those who don't believe in magic will never find it.”

So coming back to my holiday, this was a "Deja-vu" of my dad's MIT batch-mates and their family, all getting together at Wayanad for four days of fun and reminiscing the old college days.

Nov 5th, 2014 (Wed): We arrived at Calicut railway station via Mangalore mail at around 8:30 am. A Tempo traveller had been arranged to take us to Wayanad. The drive uphill was dizzy and had lot of hairpin bends. We reached our accommodation at Silverwoods Resort around mid-day. The hotel staff courteously received us with a welcome drink. Sipping the fresh mint lime juice, I stepped out into the balcony of the lobby which overlooked the beautiful Banasura Lake. The clean, fresh air of the hill station and the calm, peaceful tranquility surrounding the entire place was enough to relax and rejuvenate the mind and soul. The resort was neatly maintained and as we walked to our rooms, we could see a variety of flowers and greenery all along. Our room was quite big with a nice comfy bed, airconditioning, LCD TV, and a kettle to make hot water/coffee/tea along with coffee, milk and sugar packets. The bathroom was so big that it was a room in itself complete with bathtub, a hairdryer and an assortment of kits - dental kit, shaving kit, shower kit, sewing kit, etc. To make everything perfect, there was the stunning view of the lake from the balcony. The entire day, we were relaxing from the travel and evening we all got together in a conference room and I got to know many of my dad's friends and their families.

Nov 6th, 2014 (Thu): Morning, we visited the Thirunelli temple located around 70kms from our resort and had fun playing in the waters of the joyful Papanasini stream nearby. Post-lunch we went for boating in the Banasura lake. The lake had an aura of serenity and utter placidity. There were little ripples on the surface here and there, but as the boat moved deeper, the surface was clear, calm and silent. Observing the still waters running deep evokes an inner stillness within and you feel a sense of connectedness with everything and everyone. The lone duck swimming, a kingfisher searching for its prey, the surrounding mountains and trees, the vast blue sky reflected in the waters, the people in the boat clicking pictures and joking around.. For a moment the mind stills, you become aware of awareness and experience a profund sense of peace and Oneness.

Nov 7th, 2014 (Fri): Today we visited the Kuruva Island, a dense uninhabited evergreen forest in the middle of the Kabini river. We crossed the river in bamboo rafts pulled by overhead ropes. The island was a dense forest with a narrow trail leading around the whole place. At one place, we could get down into the river and the rushing waters massaged my tired feet. After lunch, we took a nap in the room while the ladies went out for shopping. Evening was a perfect relaxation. I made a cup of coffee for me and my dad and we chilled out in the balcony, breathing in the fresh air and spotting some rare flowers in the garden. It was a full moon night and it added to the magic and mystery of the place. A refreshing warm bubble bath to revive the senses and a quiet, stroll around the place in the night were enough to end the holiday.

Nov 8th, 2014 (Sat): After breakfast, we checked out of the resort and on the way to Calicut visited Pookot Lake. The lake was pretty big and a lovely path wound around the entire lake. After lunch, we also spent some time in the Calicut beach and then finally reached the railway station for boarding the train to Chennai.

Some thoughts about the entire trip:
* I got to taste a variety of Kerala cuisine during this trip. Aappam with veg stew and coconut milk, rice and wheat puttu with kadala curry, avial, more curry, ela ada, palada pradhaman, kappa, etc.
* I seem to have fallen in love with spiders. Inside the resort, I saw a couple of spiders with beautifully designed webs hanging from the trees. The web was so carefully, intricately designed with the same repeating pattern all over in a circle. Again at Pookot Lake, I saw one clever spider which had weaved a thin line between two trees, like a telephone line. One cannot help but marvel at the wonderful creation of nature. Where did the insect learn to be an artist? I so wished I could be a spider, weave my own net and sleep in it hanging in mid-air.
* It was interesting to meet all my dad's friends. Each of them were unique - some were always joking around and making people light-hearted, some always wanted to make their opinions heard, one of them had a unique talent of conducting magic shows and confusing people, one of them was a passionate photographer amazing people with his works, some were good at organizing games and fun activities, some had travelled far and wide and talked about lots of places, and some were nerds sitting quietly in a corner and observing the entire chaos. Some of the ladies were talkative, some had a wide variety of home remedy tips and some of them were so keen on shopping green pepper before going home. It is in the midst of such a group that you realize how unique everyone is, yet beneath all those differences, at the level of spirit, we are all but one, like distinct waves of a larger ocean. Each is but a reflection of the other and like in a hall of mirrors each one reflects a different version of ourselves.

Our room at Silverwoods Resort

Sunset view from the balcony

Bamboo raft to Kuruva Island

I would love to hear your feedback! What do you think of my travel blog posts? Are they too long and descriptive? Please share your thoughts in the comments.


Sunday, October 12, 2014

Night Trek and Cave Exploring At Antaragange


"We live in a wonderful world that is full of beauty, charm and adventure. There is no end to the adventures we can have, if only we seek them with our eyes wide open."
 - Jawaharlal Nehru

Last weekend was one of those rare long weekends with five days of festival holidays. I had been planning for these holidays since a month back, searching through all travel websites for best hotel deals and reading travel blogs for weekend getaways near Bangalore. Finally zeroed in on a night trek and cave exploring at Antaragange organized by BMC (Bangalore Mountaineering Club). The words "night trek" and "cave exploring" were enough to excite my adventurous nature. The BMC group was very well organized. I had sent them a mail to enquire whether the trek would be easy enough for my parents. They had a good ticketing system for all enquiries and responded promptly.
Next on list was booking hotels for the weekend. Luckily, Goibibo was offering 50% discount as part of their anniversary sale.
Everything planned and set, here's a short summary of the weekend:

Oct 3rd, 2014 (Fri): My parents were arriving from Chennai in the morning train. I had gone to the railway station to receive them and from there we took an auto to our hotel, "Abids Inn Homestay" which was located just behind Silk Board, in a very calm and peaceful residential area away from all the city traffic. It was more like a serviced apartment and we were given a room in a 3BHK flat. The other two rooms of the flat were already occupied. The kitchen was furnished with all vessels, a stove, microwave and toaster. Our room was separated from the rest by a bamboo mat curtain and hence total privacy for us. It was a tiny, clean and cosy room. We spent the afternoon relaxing and chit-chatting. Evening, we took a walk in the neighbourhood and reached the nearby bus stop. A bus to Banashankari was just arriving. We boarded the bus and within twenty minutes reached Banashankari. We visited the temple there and then spent timepassing in the area - having a hot coffee and masala dosa in the hotel there, window shopping of the small shops there, found an internet cafe and took a copy of our confirmation voucher for tomorrow's trek. Finally took a bus to Silk Board and reached our hotel for a good night's sleep (I managed to sneak in a face pack to pamper myself before sleeping. ;) )

Oct 4th, 2014 (Sat): We got up late in the morning and were too lazy to get ready and go out and have breakfast. Luckily, they offered us a complimentary breakfast in the hotel. Toast and egg omelette and a cup of hot tea. Yummy! There's nothing better than getting up late on a holiday and having breakfast served to you in bed (and then going back to sleep again. ;) ). Next, my most favorite part of the trip came. Packing my backpack for the trek - track pants, tshirts, ponchos, water bottles, chocolate bars to munch on and emergency medicines. Unfortunately the camera was not working. So I had to do with my mobile camera. But I doubted whether it could click pictures in the dark. After packing, we went to have lunch. We couldn't find any hotels nearby and finally after walking around for 15 minutes, we found Hotel Adigas. After lunch, we took a nap, as we were going to be awake most of the night, we needed all the rest. Evening, we checked-out the hotel, took a bus to Majestic, dropped our luggages in the cloak room and then reached BMC office in Shivaji Nagar which was the boarding point for our trek. We still had lot of time to kill, so we had our dinner and kept timepassing in the area. Around 09:30 pm, the bus arrived. We were the only people boarding at Shivaji Nagar apart from the guides and instructors. The bus picked up more people at Domlur and Tin Factory. Totally, there more than 60 people so it was a lot of fun.

Antargange is about 60kms from Bangalore in Kollar. It is a massive field of volcanic boulders and rocks which heaped on one another create a whole network of cave-like formations.
We reached the place around 12:30 am. Getting down from the bus, everything was totally dark and only the flash lights of everyone lit the place. Each of us were given a sleeping bag. It was a like a perfect adventure from a Famous Five book! We had to climb a long staircase that lead to a temple with a pond. There was a stone bull with water flowing out of its mouth. From there, we had to climb uphill for about half an hour. The trail was very narrow and we could go only in a single line. The experience was pretty spooky with screeching owls, bats flying overhead and an occasional nocturnal animal scurrying around in the bushes. It was pretty much like the Forbidden Forest from Harry Potter and I wishfully hoped I could meet a sleeping dragon, tickle it and make it angry and slay it! But sadly, we didn't even run into a bear or a fox.

On reaching the peak, we dropped our sleeping bags there and proceeded for cave exploration. This was my first caving experience and it was just too fun. There were many places where we had to crawl, climb, lie down and slide, and perform other gymnastics. Some places were too narrow and tiny, that we couldn't even walk straight, we had to turn and walk sideways in a single line. After more than an hour, at about 3:00 am, we came out and reached the place where we had left our sleeping bags. Some people slept on the rocks and some down on the grass. It was a beautiful night. The moon had already set. I had never spent a night under the open star-lit sky. For a long time, I was awake counting the stars and watching some moving lights (mostly planes). Also, got lucky enough to see a shooting star in the clear night sky which excited me so much that I lay wide awake waiting for more. Finally, dozed off.

Oct 5th, 2014 (Sun): Waking up in the morning to witness the sunrise was the most beautiful experience ever. The stillness of the dawn (something that we never experience in a city), the freshness of the morning air and dew drops on the grass, few birds chirping around, everything seems like you are in heaven. Somehow being with nature opens up a deep inner space within you. You realized how insignificant you are in the universe and at the same time how interconnected you are with everything and everyone else. We then proceeded on the trek downhill and reached our bus. On the way, they stopped at Hotel Kamath for a good, hearty breakfast. We reached Bangalore around 10:00 am, went to the station to collect our luggages from cloak room and took an auto to our hotel, "Hotel VT Orchid", near Corporation circle. One thing I love about booking different hotels at different locations is we get to experience a different area each time. Also, it pushes us out of our comfort zone to explore something new. Contrary to our previous hotel, which was located in a peaceful residential area, this hotel was in the midst of a crowded and very busy street. The room was too tiny, but thankfully, atleast it had air conditioning. We were so tired out by the trek, that we just slept the entire day. Evening we took a stroll outside to have coffee and dinner. There was a nice restaurant nearby "Hotel Pai Vihar". Every area of Bangalore seems to have a good budget restaurant, a nice bakery and a juice shop. We went back to the hotel and slept late after talking about yesterday's trip.

Oct 6th, 2014 (Mon):
After breakfast, we checked-out the hotel and went to the railway station. My parents were leaving by the 3:00 pm train to Chennai. After loving goodbyes and seeing them off, I returned to my room.

Overall, it was a memorable, fun and adventurous weekend.
(Pictures below were taken during sunrise. Couldn't take during night with my phone.)




As always, I take away some key learnings from every travel. On this trip, what fascinated me most was trekking in the dark with flash lights. The flash lights just illuminate the next step in the trail. At any point of time, you can only see one step ahead of you. But then, actually, one step ahead is all you need to see for the entire journey. When morning comes and you see the entire stretch ahead of you, it just makes you wonder "Did I actually climb all this way in the night?". Life too is like that. You can never see your entire life ahead in advance. Planning too much just creates fear and doubt. "Will I be able to do all of this? Is it possible for me to try that?". However, at every moment, you know what action to take next. And that's all needed. When you learn to embrace the uncertainty of life and trust the present moment, life too becomes an amazing adventure.


Wednesday, August 06, 2014

Calculating the number of working days using Python

At times, we have a requirement to calculate the number of weekdays / working days between two dates.
Here's how you do it using Python:

But the above method involves usage of loops.
A more optimized way of doing it would be:

In our project, we faced a requirement where given a start date, we had to calculate end date as start date + x working days.
Using the above logic, we can do:

If you have a list of holidays to exclude, you could then do:


Saturday, June 21, 2014

Stripping whitespaces and deleting duplicate rows in a PostgreSQL database

Two weeks back, in our project, we noticed that there were lot of values with leading and trailing white spaces in our database and also many duplicate row entries, as a result of which our program was not working correctly. I was assigned the task of cleaning up our PostgreSQL database.

There were two clean ups to be done:
1. Stripping of leading and trailing white spaces in string values.
2. Deleting duplicate rows from tables

I started learning a bit of plpgsql scripts to accomplish the above tasks. Since, its a very generic, common issue that most of us face, I thought I would document the steps.

Stripping white spaces:
For this, we need to fetch the list of all text columns in all tables in the database, loop though them and run a update query stripping the leading and trailing white spaces. Since the column names are available only while running the script, we need to write a dynamic sql query for the update process.

Below is the script for that:
(In all the below scripts, replace db_name with your database name)

If you also want to coalesce multiple whitespaces into a single whitespace in a string, you can use the regexp_replace function as shown below:

Deleting duplicate rows from tables:
The problem of duplicate rows will occur when the only primary key in the table is an autoincrementing id. So let's say we import data to the table by reading from a file. And if the file has duplicate rows in it, then, since there is no other primary key check, we would run into this issue. In such a case, to delete all those duplicate records, we would use:

DELETE FROM table1 a
USING table1 b
WHERE a.col1 = b.col1 and a.col2 = b.col2 and a.col3 = b.col3
--These are the non-unique columns
AND a.id > b.id; --(or a.id < b.id depending on whether we want to retain the first or last row among duplicates) 

But we need to run the above delete query for all the tables in the database. So, we need to construct a dynamic sql query that will take the table names and group by the columns present in the table.

Below is the script for that:

To execute the above scripts, save the script as a .sql file and run the below command:
psql -U db_username -d db_name -f filename.sql
 

Friday, May 23, 2014

A Tryst With Beas


"We travel not to escape life, but for life not to escape us."

Last week, I had taken my parents to Manali on a family adventure trip, 'Tryst With Beas', organized by Countrysideindia. Manali is one of my favorite hill stations mainly because I have fallen in love with the magnificent Beas river that flows through most of the place.
We have been planning the trip for almost a month and I was really excited about it. Here is a short note about the trip:

May 10th, 2014:
We took a flight from Chennai to New Delhi and reached HPTDC office. It is an overnight journey to Manali and I fell asleep as soon as I boarded the bus, tired out by all the packing that we did the entire night. The bus was slowly moving through the city traffic.


May 11th, 2014:
Morning came and the first rays of sun hit my face. I woke up and peered out the window to see a totally different scene. Surrounding us everywhere, there were mountains, snow-covered peaks and the Beas river flowing merrily down in the valley. We reached Manali and took a taxi to Solang. Solang is a quiet little valley situated away from all the hustle-bustle of the crowded city. We checked-in to our room at Hotel Iceland which was warm and cosy. The Beas was flowing just a little distance away and we could view it from our balcony. Unfortunately, the weather changed after some time and it started raining. So we couldn't go out anywhere. We spent the entire day in the hotel.


May 12th, 2014: The skies cleared up a bit and so we had a acclimatization trek to the nearby Shivlinga temple. The path was very rocky but everybody was enthusiastic since it was the first day. After a long walk, we reached the temple. The Shivlinga was at the top of a little slope which was fully covered with snow. So we had to climb through the slippery snow-laden slope. At the top was a waterfall and the cold water splashed all over the Linga. We were shivering there in the cold but still running here and there to click photos.
Afternoon, we planned to go on a small trek to the waterfall gorge in the nearby village. It was drizzling, yet we proceeded. There were many small bridges on the way and we hopped over rocks at some places of the river. Halfway though, the rain increased and the whole placed was covered with mist. Visibility was very poor and our hands and feet were all numb in the cold. We stopped after sometime and decided to turn back. I was disappointed that I couldn't see the waterfall. But still this was a different experience, trekking in the heavy rains and getting drenched from head to foot. It was like a monsoon trek, but in summer.

May 13th, 2014: Today again, the rains spoiled our plans for going to the campsite and we stayed in our room the whole day. Evening, we went for paragliding. We took the ropecar to a high point and sailed from there. Just looking at the ground view while flying so high is a really thrilling experience.

May 14th, 2014: Today, the weather was very sunny and so we started on our trek to the campsite at Dhundi. We all carried our ponchos with us, ready for any change in the weather. Last night, at teatime, while chatting about the weather, we had come up with a nice name for this weather, 'Designer Weather'. We followed the river for some time and then went by the road. There was a tricky spot where we had to cross the river and there were just a couple of logs laid out. We had to balance on it and get to the other side. The camping spot was located little uphill and we had to climb a lot. Nearby, there were lots of camps where trainees taking mountaineering courses were put up. We finally reached the camps and were welcomed with hot lemon water. The weather started changing again and skies became cloudy. As the sun set, it was becoming more and more cold. The temperature reached around 3 degrees Celsius. It was the first time in my life that I was experiencing such a low temperature. We were all wearing multiple layers of clothing, yet we felt shivering and numb. Sitting inside the tent was more colder as we needed to keep moving our bodies for warmth. The entire group went out and we were doing yoga stretches, jumping, dancing and singing, all in an effort to keep ourselves warm. Finally, after dinner and steaming hot chocolate, we went into our tents and cuddled into our sleeping bags.


May 15th, 2014:
As per itinerary, we were going to trek to Beaskund today. Beaskund is the starting place where river Beas originates. The trek was slightly more harder as there were steep slopes where we needed to climb up and down. We crossed a glacier and at the edge, the water was gushing through at a tremendous speed. Close by, there was a steep slope which we needed to climb. One small wrong step could take you down to the underwater. Thanks, to the help of the local guide, who accompanied us, we all reached the other side safely. There was fresh snow surrounding us on all sides and it was difficult to walk. We followed the footsteps of the trainees team who went ahead of us. After about four hours of trekking, the snow got knee deep and we couldn't proceed further. We all sat down on the snow, opened our backpacks and had juice and chocolate chip cookies to energise us before descending down. The descent down was the most fun part of all. We spread our ponchos on the snow and slided down.. wheeee.. on the snow. On some places, where it was too dangerous to slide, we walked, but we kept slipping and falling down multiple times. After all the rolling, playing and sliding in the snow, we reached the campsite dog-tired. My whole body was aching after the numerous falls. The weather was not that bad and so we had a sound sleep.





May 16th, 2014: We trekked back to Solang and reached our hotel. The afternoon, we went to do rappelling. Rappelling is such an interesting adventure activity where you need to descend down a huge rock using a rope. A harness is secured around the waist for safety. Your legs need to be in a 90-degree position to the rock and you need to let go of the rope. And that is the tricky part. Letting go.. I was afraid to let go and just stood at the top. I made several attempts and finally let go of the rope and with that, it actually got easier. A few steps down, the fear goes away and I actually started enjoying it. Finally, reached the ground victorious.

May 17, 2014: The last day of our trip, we checked out of our rooms and went by van to Kullu. There we had white-water rafting activity on the river Beas. The whole ride was for 14 kms and lasted for more than an hour. There were lot of rapids along the line and it was very exciting. At one point, the guide stopped the boat and and said it was the jumping point. I immediately jumped into the water (we all had life jackets). The water was ice-cold and I couldn't stay for more than a couple of minutes. After the rafting ride, we reached the end of the tour. Our bus to Delhi was in the evening and from there we took a flight to Chennai.

It was a really a very memorable trip. Basically, I love travelling a lot. I think there are lot of insights and worldly wisdom that we gain from each trip. In this trip, I could just jot down the following:
  • At times, even the most simple things in life can seem like a luxury. After the tiring journey from Chennai to Delhi, having a hot cup of chai and samosa from a local roadside vendor was very rejuvenating. I relished every bit of it.
  • Always look at the bigger picture of things. Parasailing high above the mountains, I was just mesmerized over how beautiful the world is. The short ride changed my perspective. Down, on ground, we tend to focus on the negatives - the muddy ground, the open drainage, etc. But when we focus on the bigger picture, all these seem to disappear. Life too is like that. Whatever problems we face, however depressing the situations maybe, always learn to look at the bigger picture and feel gratitude for all that you have.
  • Little, silly things actually prove to be most fun. Stop taking life too seriously and have more childlike fun. When we climbed up the snow slope to the Shivlinga, the waterfall was too cold and spraying all over. In the shivering cold, I spotted a bell near the Shivlinga right under the waterfall. Tempted by that, I ran, picked up the bell, rang it three-four times and ran back, and in the process, got fully drenched and cold. Yet, it was most enjoyable and fun.
  • The journey is more important than the destination. When we trekked to the waterfall gorge, we couldn't reach it because of the rain and mist. I was disappointed. But still the trek was a very different experience which I highly enjoyed. Trekking through heavy rains with very less visibility was a challenging and memorable one.
  • Turn every negative situation into a positive one and learn to laugh more. At the campsite, the temperature was very low and everyone of us were feeling numb. Instead of complaining and whining about the weather, we started enjoying that too. Looking at the temperature, every few minutes, we all were doing a countdown, 5 degrees, 4 degrees, 3 degrees.. Yay...
  • Rappelling teaches you about the importance of letting go. To be the person that you want to be, you need to let go of the person that you are. Often, in life we tend to hold on to something and fear leaving it. We fail to realize that letting go can be actually be truly liberating and we actually gain more confidence from that.
  • Step out of your comfort zone and take little risks in life. When the rafting guide announced that we had reached the jumping point in the river, many people got enthusiastic and jumped into the waters immediately. Some stayed back fearing it. Get rid of your fears and jump right into the adventure of life, after all you have a life jacket...
  • Above all, trekking on the high mountains, surrounded by beautiful peaks on all sides, I felt a sense of oneness with nature. The mountains and trees were beckoning me to live life to the fullest. I felt gratitude for having the opportunity to witness all this in my life and thankful to meet all different kinds of people. Travelling broadens your mind and heart truly.

Wednesday, April 23, 2014

Review of Uber cab service in Chennai


So its going to be nearly two months since, Uber, the luxury on-demand cab service provider, officially launched here in Chennai. And being an ardent lover of technology, I am pretty much excited about the new Uber mobile app which provides an easy, hassle-free, affordable and luxurious car ride to anywhere in Chennai.

For those who don't know, Uber is a San Francisco based startup providing mobile technology to connect drivers with passengers. The drivers in the Uber system are independent contractors who are screened and verified by Uber. Uber is funded by many well known VC's like Google Ventures, Goldman Sachs, Menlo and others and is available in more than 35 countries.

The Uber mobile app is super easy to use. You just tap your phone to request for a taxi and the app connects with the nearest available driver and in a few minutes - voila! - a cool Mercedes car shows up at your place. And there are no cash transactions or tips. The payments are automatically debited from our account. So in true style, you can just get out from the car, close the door and walk off like a queen. ;)

I first came to know about Uber when I attended the GDG Women Techmakers Meet last month at The RainTree Hotel. Apart from the inspiring talks from many women entrepreneurs, an Uber representative also gave a small presentation there. At the end of the day, we got a lot of goodies to take back including a cool GDG WTM T-Shirt, 'An Introduction to GCC book' and also a discount voucher from Uber which we could redeem on our first two rides.

I was intrigued by the Uber presentation and wanted to try it out soon. So, me and my parents planned to take a ride from our home at Anna Nagar to the famed Shirdi Sai Baba Temple at Mylapore. I downloaded the Uber Android app to my phone (they also have an iPhone app) and signed up. While registering, it asked for the credit card details so that payments can be made automatically. On log in, the GPS points to our current location in the map. I could also see images of little black Uber cars moving along the nearby areas. The app showed the estimated pickup time as approx. 20 minutes. I clicked on the 'Request a Taxi' button and waited. What's so cool was, on the live map, I could see where the driver exactly was and in which route he was coming. I also received a text alert when the taxi arrived at my place. Coming out, I could see a shiny, new Toyota Corolla sedan had pulled up in front of my house. :) Unlike the conventional call taxis, there were none of those bumper stickers and so true to what Uber says, its really 'Everyone's private driver'! We all got inside the air-conditioned cab and after a smooth ride of 45 minutes, reached our destination. The app displayed the receipt for the trip. The tariff too was very reasonable and comparable to other call taxi services. The app also allows us to rate the ride and provide feedback. At the end of the ride, I was just left wondering, 'Wow! Such a cool thing has come up in our Chennai city!'

The app also offers lot of features. You can check for an approx. fare quote to your destination before requesting for the taxi. Once the taxi is confirmed and en-route, the app shows the type of car, the driver name and photo. There are also options to call/text the driver, in case you want to provide directions. 'Split the fare' feature is very convenient when we are travelling with a group of friends. There is another feature, 'Share my ETA', using which you can enter your destination and the app calculates the Estimated Time of Arrival. You can share the ETA as well as the live map with your family or friends to inform them when you would be arriving. After the ride is over, your trip details are recorded and in case you have left any item in the car, the 'Find Lost Items' feature helps you to recover the item. Cool!

But there also some cons in the service which I feel can be improved. For one, it is only an on-demand service. There is no option for advance booking. So, if you are planning to catch a train or flight in a hurry, and you open up your app and there are no cabs at that time, then you are stuck. Two, your phone GPS needs to be enabled, else the app totally crashes. I don't see why it should rely so heavily on GPS. If there is no GPS, the app should allow user to enter the pick up address manually and request a cab. Third, the app doesn't allow you to specify the number of passengers. Last time, we were five passengers and after requesting, a Honda City was en-route to my place. I cancelled the request (if cancellation is done within the first 5 minutes, they don't charge anything) and placed another request hoping a Toyota Innova would arrive. But unfortunately, even the second time, a Honda Accord, which could seat only 3 passengers arrived. This feature of choosing among different cars is available in U.S. I guess, it would take some time to roll out to India.

They have also partnered with some restaurants like Tuscana Pizzeria, Kryptos, etc. which offer discounts when you take a Uber ride to there. I hope they partner with some very popular ones like Hotel Saravana Bhavan, McDonalds, Wangs Kitchen, Dhaaba Express and the like.

All in all, I think Uber has leveraged technology to provide an efficient transportation service. If you want to try out Uber, you can use my promo code while signing up and get Rs.300 off your first ride. You can redeem it here.

I think there are lots more services in Chennai where technology would really make a difference. Salwar stitching is still a pain in the neck for many women and I am surprised why an online service hasn't come up for it yet. Similar to Uber, a live map feature would also work well for home delivery of food. Imagine if we could just place an order for pizza, and there is a countdown timer showing the estimated time it would be delivered, also allowing you to track where exactly the delivery boy is coming!