Sunday, June 30, 2013

Using hash tags to organize bash history

We use hash tags all over the place in social networks. We use it extensively on Twitter and Instagram. Facebook recently launched support for hash tags as well.

So, in a way, our online life revolves around hash tags. Given that, it’s a really great thing for bash power users that # in shell means comment. I usually tend to type long commands and won’t bother remembering or saving them somewhere as it is in the bash history and i can retrieve it by reverse-i-search (Ctrl+R) anytime I want. 

As time passes by, more than often I end up retyping the whole command as reverse-i-search doesn’t have a unique combination of letters/words to search for. So, off late, I have found a dead simple way to never lose control over reverse-i-search because of too many similar commands. I just append a hash tag every command I type in. And later search for the hash tag in reverse-i-search. Since, anything that follows # is treated as a comment, the text is silently ignored, while giving you power to search through it alter on.

For example, when i write PHP code, I often tend to run lint on all the php files before executing them to make sure there aren’t any silly syntax errors. This is the exact command that i run:
find . -iname '*.php' -print0 | xargs -0 -n1 php -l
If you look at this command, none if its contents are unique by any mean. All these phrases and commands are something that we use over and over again. So it’s very plausible that this might get lost in the bash history and practically un-searchable with reverse-i-search. Now this is the command with a hash tag appended:
find . -iname '*.php' -print0 | xargs -0 -n1 php -l #phplint
Tada, there we go. From now on, we can do a reverse-i-search for “#phplint” or merely “phplint” to get back this command from the bash history. Also make sure you set HISTSIZE to a large value in your .bashrc to make sure you history is practically infinite.

-Vignesh

Do a good deed today. Donate to the Prime Minister's National Relief Fund.

Wednesday, May 8, 2013

Indians in USA: Why we do what we do!

Warning: Quite a lengthy article ahead. No pictures, mere yada yada yada.

I recently came across a post in Facebook (could not link to it as I don't remember who posted it and there is no way to search posts in Facebook - a story for another day). The same article can be found here: http://goo.gl/F31qK. Even though the article is quite old (2009), I've seen the same resurfacing on social media often and it's pretty relevant even today.The article was titled 22 things that Indians do when they return from the US. Though most of it is true, some of it is done as a force of habit and not as an intention to show off.

In this post I would like to go through those points and give more context to why we do what we do. I don't intend to justify that what we do is right or wrong, I would just like to add a little perspective as to what we go through in the USA that makes us behave the way we do when we are back in India.

22. Use Nope for No and Yep for Yes.

This is absurd. All the peters (Tamil slang for – oh man, what a pseud) in India these days do this. You don't have to come back from the US to do this. Ever since facebook and whatsapp became the norm of communication, "yep" and "nope" have become the norm too. This could be one of those things that could have been relevant in 2009 but certainly not today.

21. Tries to use credit card in road side hotel.

Yes, it is true. It happens because in the US, even the so called potti kadais (small shop usually as a part of a moving truck or some such) accept credit cards. I hold a credit card in my phone's case and that acts as my wallet. I do not carry a separate wallet. I mentioned this on one of my earlier posts as well.

20. Drinks and carries mineral water and always speaks of health conscious.

I haven't done this personally and I believe not many people do this. It may be true that Americans do that when they visit India as they grow up in a little better hygienic environment, they are less immune to lower hygienic environments like India. So if an Indian who grew up in India does this after coming back from the US, you have all the rights to mock at him as he doesn't have any immunity issues.

19. Sprays deo such so that he doesn’t need to take bath.

Name one software engineer in Chennai/Bangalore who doesn't do this.

18. Sneezes and says ‘Excuse me’.

I have seen this a lot among those MBA type people, but it isn't very common among Americans either. So I don't honestly understand why we do this (although I don't). A common thing that Americans say is "bless you" when a person nearby sneezes. I think this more of a manner than show off.

17. Says “Hey” instead of “Hi”.
      Says “Yogurt” instead says “Curd”.
      Says “Cab” instead of “Taxi”.
      Says “Candy” instead of “Chocolate”.
      Says “Cookie” instead of “Biscuit”.
      Says ” Free Way ” instead of “Highway”.
      Says “got to go” instead of “Have to go”.
      Says “Oh” instead of “Zero”, (for 704, says Seven Oh Four Instead of Seven Zero Four)

This is absolutely a force of habit. It is not about showing off. Had the Americans invaded India instead of the English, this would seem natural to all of us (and words like Biscuit and Taxi would have seemed absurd). In the US, everybody uses the words that the Americans use. I have gotten weird looks from many shopkeepers when i ask for Biscuit. I have been stared at for saying Capsicum. So, as time goes by, you get used to these and it becomes usual. It takes time to change it back when we get to India.

On a similar note, does anyone know what the back portion of a car is actually called? "Trunk" may be? After coming to the US I learned that it's called "boot" here. In India (atleast in Tamil Nadu) we call it "dicki". Does anyone even know what language that is? I am 20+ years old and I don't know it.

16. Doesn't forget to crib about air pollution. Keeps cribbing every time he steps out.

If someone does this, he/she is showing off (or putting scene, if you will).

15. Says all the distances in Miles (Not in Kilo Meters), and counts in Millions. (Not in Lakhs)

Lakh is a term used only in the Indian sub-continent. Million is used pretty much every where in the rest of the world. So when you are away from the sub-continent you tend to stop using the word Lakh. You tend to count in millions (for heaven's sake even your salary is counted as hundred thousand dollars or some such and not as one lakh dollars).

In the US, all distances are in miles. Google Maps gives you miles, all sign boards are in miles, all cars' speedometers are in miles. When you live here for a while, you forget to count in kilometers. Miles become an inherent part of your life. So it is really hard to change that mindset when you are back in India. So this is absolutely a force of habit and not a show off scheme. To quote Sheldon, America should have followed the metric system, but sadly they don't.

14. Tries to figure all the prices in Dollars as far as possible (but deep down the heart multiplies by 50).

I would say this is natural human behavior. When your income is in one currency and you are spending it in the form of another currency, it is natural for you to convert it to the currency that you are actually earning. I don't see anything wrong with this. For example, I have seen many Indians say "you can get an iPhone in the US for 10000 Rupees" (referring to the $199 2-year contract price point). It is exactly the same, people earning INR see all the prices in INR. Same applies for USD.

13. Tries to see the % of fat on the cover of a milk pocket.

People in the US are really health conscious. At the same time, they know the difference between being health conscious as opposed to being health freaks. So, they do look into calorie count on every food product they buy. Almost all restaurants list the calorie content of every dish they serve. Few Indians might have genuinely picked this habit up while living here. But most of us do it for showing off. Accepted.

12. When need to say Z (zed), never says Z (Zed), repeats “Zee” several times, if the other person unable to get, then says X, Y Zee(but never says Zed).

Despite being good at English, only we know how much we struggle to make people over here understand our accents. When talking to any sort of customer service representative, making them understand your name itself is a huge pain in the a** (my legal name is Vignesh Venkatasubramanian - try pronouncing that to an American and make him understand). Also, many customer service IVRS systems here work on Voice Recognition rather than keying in numbers (instead of saying "Press 1 to make a reservation", it says "Say 'make a reservation'". So it is absolutely necessary to have some sort of a fake accent so that everyone here can understand what you are saying. Again, force of habit.

11. Writes date as MM/DD/YYYY, on watching traditional DD/MM/YYYY, says “Oh! British Style!”

When I first entered the US, the immigration officer wrote the expiry date on my I94 in MM/DD/YY format. I was totally puzzled at first and it took a while for me to realize that. All the forms that you use on a day to day basis (bank, government forms, etc.) all require the date in MM/DD format. All television channels, newspapers and posters have the date in MM/DD format. So, naturally, once you are here for a while, you will start writing that way too. It's hard to switch a 20 year practice of writing it in DD/MM format when you get here from India. Similarly, it's hard to switch back. Force of habit.

10. Makes fun of Indian Standard Time and Indian Road Conditions.

Indian Standard Time itself begs to be made fun of. It's not just us, even people in India criticize IST. No other country in the world that has 2.5 hour time difference between its extremes has a single timezone throughout the country. No comments on Indian Road Conditions.

9. Even after 2 months, complaints about “Jet Lag”.

Showing off. Accepted.

8. Avoids eating more chili (hot) stuff.

Honestly, I haven't seen anyone doing this. If anything, I was totally sick of lack of spiciness, so I have all sorts of extra spicy food when I go back to India. To give more context, most Indian restaurants here serve sort of Americanized Indian food. Because Americans generally have a low tolerance to spiciness in food (most of their food is bland). So to make business here, restaurants have to reduce the spiciness. Unless you go to a Andhra restaurant, most Indian restaurants serve less spicy food by default unless you explicitly ask for super extra spiciness.

7. Tries to drink “Diet Coke”, instead of Normal Coke.

This is something that many people see as a show off thing, but it is not. Whenever you ask for a coke here, the shopkeeper replies "Regular/Diet/Zero?". Have anyone heard of Coke Zero back in India? Nope, me neither until I got here. Every soda product has a diet version here (ever heard of Diet Mountain Dew, Diet 7up, etc?). Naturally, we end up choosing Diet Coke/Coke Zero when given a choice over Regular coke (as it all practically tastes same to us Indians). It becomes a very heavy force of habit that at some point of time, we start looking at regular coke as some high calorie'd demon that could induce a lot of fat in you. Force of habit.

6. Tries to complain about any thing in India as if he is experiencing it for the first time.

Accepted. Even I am annoyed by people who do this. Especially, second generation Indian kids who despise India and Indians.

5. Pronounces “schedule” as “skejule”, and “module” as “mojule”.

No one does this. A better accusation could be, "Talks in a fake American accent". Even though some genuinely can't lose their accent, most of us do it to show off (even I have done it a couple of times).

4. Looks suspiciously towards Hotel/Dhaba food.

I don't think most of us do it. On the contrary, roadside food is something that is practically non-existent in the US. So most of us miss it like crazy. For instance, I went to the roadside bhel puri shop when I visited India (I took 30 minutes off to do this despite all the other important stuff I had to do).

3. From the luggage bag, does not remove the stickers of Airways by which he traveled back to India, even after 4 months of arrival.

Agree that this happens. But it is more towards the sense of happiness of having been in the US than to show off. Also, most of us do it within India when we take a bag on a domestic flight. It's very rare for Software Engineers in Chennai/Bangalore to go on a domestic flight home. But when he/she does, they don't remove the flight's baggage tag either. I have seen many people doing this.

2. Takes the cabin luggage bag to short visits in India, tries to roll the bag on Indian Roads.

I got nothing to say about this. I am surprised that people have even noticed such minuscule things.

Ultimate one: 1. Tries to begin conversation with "In US..." or "When I was in US..."

Guilty as charged. :-)

If you read this far, you should probably follow me on twitter.

-Vignesh

Wanna do a good deed today? Help someone, visit http://www.computerkindness.org (or click on the banner in the top right corner of this page).

Tuesday, April 23, 2013

Solving Boggle (Scramble with Friends) with a Bot!

Headnote

I am always fascinated by Android games, especially puzzle games. This is how it usually works with me and a puzzle game. I start playing them with random friends. They beat me and I beat them on and off. Then I sit and think, this is so monotonic and algorithmic that a human being shouldn't be sitting and doing it. Then I sit with the computer (with my favorite monkeyrunner Jython in it) and try to come up with a simple algorithm for it. Then i plug in the standard monkeyrunner code to actually feed the output of the program back to the device. Then I usually become #1 among my friends in the leaderboard (often even in the global leaderboard) ;-)

This is one such scenario. Zynga's Scramble with Friends has been really popular among my friends off late. So i hit this routine cycle and ended up with a beautiful bot which usually scores a centum (like the one TamBrahm parents force their kids to get in Mathematics).

With that out of the way, let's begin.

Objective of the Game

The game consists of a 4x4 grid of letters. You have to form as many words you can by starting from a letter and by moving to one of the (upto) 8 adjacent letters. Dead simple, but really interesting and addictive.

The first thing needed to solve this is a dictionary of words. I went on the internet and downloaded a plain text dictionary file which had about 170k words in it. Good enough to start with.

Algorithm - Breadth First Search

The number of valid words is usually very limited. In most games, the total number of valid words is usually < 400. So, a simple Breadth First Search (BFS) will do starting with single letter elements and then add the neighbors recursively. One key insight is, if you come across a prefix that never occurs in the dictionary, you can discard that prefix at that point instead of adding it to the traversal queue.

A rough sketch of the algorithm is as follows:
  • queue = [all 16 characters]
  • while queue is not empty:
    • word = head of queue
    • if word is in dictionary output it [1]
    • for all neighbors adjacent to the last character of word
      • new_word = word + neighbor
      • if dictionary has words with prefix new_word, add new_word to the queue [2]
That's it. Straightforward implementation of a BFS-like algorithm.

Choice of Data Structure

The key to solving this problem efficiently lies in choosing a good data structure for implementing the dictionary. The dictionary needs to support two major operations. One is looking up if a word exists. This is used for step [1] in the above algorithm. The other operation is, given a prefix, check if there is atleast one word containing that prefix in the dictionary. This is used for step [2] in the algorithm mentioned above.

Array ?

One good looking candidate is using a simple array (note that the dictionary is already sorted for us). Look up can be performed using simple binary search. Prefix checking can also be performed using a modified binary search (if search succeeds, then prefix exists. if search fails, prefix existence can be determined by looking at the bounds in which the search failed). Also, note that the dictionary has ~173k words. So, searching is gonna take log(173k) which is approximately 18 hits in the worst case. This is a totally fair deal.

Trie ?

Another possibility is using the Trie, whose raison-d'etre (very reason for existence) is to implement such dictionaries. The Trie implementation is also fairly trivial (since we require only two major operations apart from Trie construction). In the Trie, both the operations are gonna take as many hits as the length of the word or the prefix being looked up. So asymptotically, both these data structures are more or less similar and we don't have a big advantage in using either one over the other since our output is always gonna be < 400 words.

I decided to go with the Trie. After reading this article about Trie implementations in Python, I decided to quickly write my own implementation of Trie. Also, this made life simpler as I couldn't quickly find any good resources about using external libraries within monkeyrunner.

Implementation Quirks

Since I had already used monkeyrunner a few times before, implementation turned out to be pretty straightforward. The following are a few implementation quirks and nuances that the script deals with:
  • Input is manually entered as a raw row-major string of length 16.
  • If the same word can be formed by two different combinations, only one combination is actually considered valid. This is overcome by storing a list of already found words in another Trie.
  • Even though the script finds smaller words first (because of BFS), it actually starts outputting words of length >= 5 first and then after it has exhausted all the lengthier words, it then outputs the smaller words in the reverse order of length (4,3,2). This is to maximize points in case we don't find time to output all the words.
  • The game offers three lifelines. I found the freeze option to be useful to the bot (as each freeze gives you 15 additional seconds of game time). So, the script automatically taps on the freeze lifeline every 30 seconds.
  • We also need to store the co-ordinate of each letter in the queue along with the letters themselves in order to simulate the output in the device.
  • The co-ordinates are hard-coded for Nexus 7 portrait mode.

Code

The whole implementation can be found here: https://github.com/vickyg3/scripts/tree/master/scramble_bot

Sample Video

Here is the exciting part. This is how it looks like when my bot plays the game:



It's always a very nice feelings to watch you script do such beautiful things.

-Vignesh

Wanna do some good deed? Visit http://www.computerkindness.org (Or look for the banner in the top-right of this page).

Saturday, April 20, 2013

C++ COW Craziness

Note: This isn't one of those Linus'ish articles that bitches about C++. I like C++ and I would just like to point out one of the many nuances in the language that could affect the performance of your program without your knowledge.


C++ STL's string class promises Copy-on-write. What that means is that, you can make as many copies of the string, but the actual memory duplication will happen only when one of the strings are actually written to (i.e.) no memory duplication will be made for copies that are made for pure reads. Or atleast that's what I thought, until I discovered today that, if you use the [ ] operator on the string, you rig the COW functionality of it forever. It is something that you normally don't do, but doing so could cost you a lot of performance. Let's run through an example.
string s1(1024 * 1024 * 16, 'g');
for(int i = 0; i < 1000; i++) {
  string s2 = s1;
}
This runs in 19 milliseconds. That's because (obviously) there are no actual copies made. Just 1000 pointers being created to the existing 16 megabytes of data. Now, lets try modifiying the copied string.
string s1(1024 * 1024 * 16, 'g');
for(int i = 0; i < 1000; i++) {
  string s2 = s1;
  s2[0] = 'v';
}
This runs in 4.3 seconds. That's right, from 19 milliseconds to 4.3 seconds for making 1000 actual copies of 16 MB of data. This is the expected behavior, a copy is done when you try to write to it. Next comes the weird part, consider the following code:
string s1(1024 * 1024 * 16, 'g');
for(int i = 0; i < 1000; i++) {
  string s2 = s1;
  s2[0];
}
Guess how much time this should take? Intuitively it seems like this should hit the COW fast path (i.e.) no actual copies, because there is no "write" here. This takes 4.3 seconds too! The problem behind the [ ] operator is that, you can easily stash away a pointer to some portion of the string and modify it later thereby screwing up the state. So, it is impossible to perform COW once you use the [ ] operator on a string. The following snippet illustrates this:
string s1("hello");
char *p = &s1[2];
string s2 = s1;
*p = 'v';
You see what happened there? You stashed away a pointer to the middle of the string and then tried to change it later after the copy. This is sort of an indirect write, and there is no way for the compiler to determine this. So, the moment is sees the [ ] operator, it removes the COW functionality for that string. One way to do such a read without rigging the COW functionality is to do a crazy cast like this:
string s1(1024 * 1024 * 16, 'g');
const_cast<const string &>(s1)[0];
for(int i = 0; i < 1000; i++) {
  string s2 = s1;
}
This snippet takes the fast COW path and runs in 20 milliseconds. The takeaway from this article is that, do not use the [ ] (or the .at()) operator on strings, especially large string that could be copied later on. Even though you think you're doing an harmless read, you are rigging the COW functionality of that string forever. You are paying the price for that pointer you stashed away (or may be even released long back) without knowing.

 -Vignesh

Tuesday, February 26, 2013

The Last One by Myself!

Before you start reading, I really would like to warn you: Stop, Do not read. What follows is utter crap.

It has been almost 5 years now since i fell in love with this amazing girl. It’s almost time now. I am literally counting the last few days of my bachelor life. The 7 and odd years that i have known her has just swung by very fast. It just seems like yesterday that I was a small school kid. I honestly can’t remember how college life went on so fast. Here I am now, sitting in a totally different part of the world, still unable to believe that I am actually here.

When I look back at the past 7 and odd years, there are various wonderful moments which I would say have made my life what it is now. Not to brag, but not many people in life get almost everything they want, especially at such an early point in life. I am indeed one of the lucky ones. I am surprised at so many things that I do these days. It just seems like yesterday (literally like yesterday) that i went around nagging people for career advice. Yet here I am today, talking to many of my friends about building their career, etc. I really am surprised at the way I have turned out.

I am in this state where i ponder upon looking for words to express how my life has turned around to what it is now. There has been unexpected twists and surprises, expected happiness and so many other feelings which words cannot describe.

If I sit back for a moment and think about why I am writing this post, I honestly have no clue. I just felt like I should write something that will forever remain as the last post I ever wrote as a bachelor. Not that it is a big feat or anything, but blogging was something which, despite many resolutions and swearings, i could not keep up with. So, not to feel bad about myself that I hardly write anything these days, I started out writing this particularly pointless post.

I am flying out to India tomorrow. It’s gonna be the most #epic trip of my life. Loads of things to look forward to. Girl of my dreams, getting together with her. Life is fun. Hopefully I write something meaningful sometime soon (of course after I am back from the India trip).

-Vignesh

Wednesday, December 12, 2012

Life on the Pacific Coast!

Disclaimer: These are my impressions. They're not facts, they're my impressions, so they can't be argued with. Also, it's quite a lengthy post! With that out of the way let’s begin.

It has been close to 3 months since i moved to a totally different part of the world. The experience so far has been mind blowing if anything. Dream job, wonderful location, awesome co-workers and above all, amazing culture of people. I have been taking notes since the past three months and am posting my observations about this part of the world as i have seen it in this short period.


First Picture after I landed in the US

Human involvement == Expensive
Anything involving one to one human attention for a significant amount of time will be significantly expensive. For instance, you can reach from place to another in a bus for $2 but the same might cost anywhere between $20 and $100 in a cab. A loaf of bread costs around $3 whereas a bread toaster costs $13. This is because bread loafs are perishable and requires constant human interaction for replacing it, probably on a daily basis. Whereas the toaster will be mass manufactured by a machine in thousands and requires the least human interaction. The main upside to this is that people are very hands on. They usually assemble their own furniture and so on. Hiring a human on a hourly basis is *much more* expensive than buying the required tools and doing the job yourself.

Public transport == Longer
In India, if you can cover a certain distance by car in 15 minutes, you can usually cover that in a public bus in 30 to 45 minutes. Here, if you take the bus for the same distance, it could take anywhere between 60 to 90 minutes (depending on whether you have direct bus access or not). You can see this for yourself as to how long it takes from a location to SJC airport by car (15 mins) and by public bus (85 mins). The reason behind this is quite straightforward. In the US, traffic is in two extremes: you either take the freeway which has no signals whatsoever or you take some internal road with overwhelming signals and other obstructions. Cars take the freeway and public buses don’t, hence the significant time difference.

CTM!
Can anybody guess what CTM stands for? Ok now can anybody guess what this is doing in this post? I’m unsure of the reason, but whenever people here refer to Indian food, CTM is the de facto scale of reference. They tend to compare the spiciness of other stuff with CTM as the base scale. Also, people who have never been to India usually differentiate between North and South India as bread eating and rice eating parts of India.





New term for Public Wifi
When i was back in India, I always used to wonder what’s the point in having any wifi only tablet, or any other wifi only device for that matter. Now I understand why it totally makes sense. All the public places usually have free wifi. Especially since i live in mountain view, i enjoy free city wide wifi provided by Google. Also, Starbucks wifi is the most common example of public wifi. Starbucks is a coffee shop which exists on almost every street and usually all Starbucks shop have free wifi, thereby extends that almost all streets have free wifi.

New notion of City
The notion of a “city” is very different when compared to what it means in India. Cities in the US are small, very very small when compared to cities in India. For instance, the distance between Mountain View and San Francisco airport is 25 miles (~40 kilometers). In India, if you drive 40 kilometers from a place, it is very likely that you’ll still be in the same city. Whereas there are some 5 to 7 cities between Mountain View and San Francisco. They are that small. On an average, if you drive about 6 to 7 miles from any city, you’ll definitely be in some other city. There’s another level of granularity known as counties. County sizes here match with city sizes in India (size, not the population!).

Meat is De Facto
I am not sure if it seems so because i am a vegetarian, but in general what i have noticed is that meat is the de facto ingredient for preparing any sort of food. Even soups by default have a meat based stock. You will have to specifically ask for the restaurant guy for food without meat and seafood (for which the choices will be usually limited in a normal restaurant). But there are a lot of places in the bay area where one can get very nice vegetarian/vegan food. By the way, McDonalds in the US does not have any vegetarian dishes which makes me realize how much they have customized their menus for their Indian version (there’s McAloo Tikki!). Tofu is the usual vegetarian replacement for any meat.

Go Karting
Car driving in this country is a joke. Yes, the traffic is high speed, but apart from that there’s no thrill in driving. Majority of the vehicles have automatic transmission (which means that one hand and one leg is always free while driving). The only challenge is to learn the lane discipline, but that’s a matter of very short time. Once you learn the rules, driving is a piece of cake. If you have ever done Go Karting in India, you can drive real cars here. That being said, rules have to be followed here even while driving in a small road where there is no traffic whatsoever. Cars are the default mode of transport, there are a very very small number of motorcycles (bike == bicycle here, hence the term motorcycle). Motorcycles are more of an enthusiasm here than a mode of transport. They cost about 4 times as a car and hence very rarely found on roads (Edit: I realized this was an exaggeration. Depending on the type of car and type of motorcycle the prices vary. But the general idea is that motorcycles aren't intended as a primary mean of transport. They are more of a fun thing).



US-101

Water, Coke and Beer
Almost all these three cost the same, in the sense that the difference isn’t significant as it is in India. You can get water and coke for the same price and beer will cost a little more. Again like meat, beer is very commonplace. All shops usually sell beer and there are bars in almost every major places in the city.

Pedestrians and Bicyclists
Contradicting Indian behavior, pedestrians and bicyclists (bikers) are given priority at any intersection. Vehicles taking free right turns or passing an intersection without signal always come to a complete halt to look out for pedestrians and bikers. Even if the pedestrian or biker is a little away from the intersection, the vehicles usually wait for them to pass. This is religiously followed by all vehicle drivers irrespective of the type of powered vehicle they drive.

Silicon Valley == Epitome of Technology
Technology is used almost everywhere, it is more or less ubiquitous. One of the main reasons for this is availability of internet everywhere (as i mentioned earlier 1Mbps internet is free in mountain view). Buses and trains are high tech and have systems for ticketing that logically make a lot of sense. For instance, a single ride in a bus costs $2 and a day pass costs $6. You can use a prepaid smart card and the system is actually smart enough to charge you not more than $6 for the rides you take in any 24 hour period. Debit card cash back is really an awesome system. I don’t see any reasons why they don’t have that in India. It is a true win-win.



San Antonio Caltrain Station

Cash? Why not card?
Cash transactions are very very rare. It’s been three months and i still have the cash that i bought along with me when i came from India. Every shop, as in every single shop, accept credit/debit cards. So there is no necessity carry a wallet. I just carry my card in the pocket along with the phone. There are even mobile phone cases with credit card holders.

Differences in words
There is a lot of difference between American english and Indian english, many of which i learnt only after getting here. Glaring ones include: 1) Ground floor is mentioned as First floor here, First is Second and so on. 2) Capsicum is called Green pepper (the guy from subway stared at me when i said capsicum). 3) Bill is called Check and Cash is called Bill (the paper note). There are loads of such word differences.

Numbers can be Deceiving
Not following the metric system is a pain in the ass. The distance unit is particularly very deceiving since you look at 1.3 miles and start walking, whereas walking 2 and odd kilometers is really difficult (when comparing the distances which i used to walk in India). 



Note: Image copied from Facebook

More than all this, the best part about this country is its people. They are friendly by heart. Even strangers greet each other. The bus driver tells you to have a nice rest of your day when you get out of the bus. The person whom you held the door for tells thanks. To reiterate, the best part for me so far has been the People!

Such has been my experience in this country so far. I am enjoying every moment of it. It has given me a whole new view of how life can be, since all this is a sudden surprise (something i never constantly dreamt of). Maybe i’ll do another blog post after 6 months describing the views then.

Good grief, my blog is not dead. I will definitely write more soon!

-Vignesh

Thursday, September 20, 2012

On Leaving India!

Warning: This is a random rant. And some of you may not be ok with the attitude of this rant.

It's almost time and I'm all set to leave India for the first time and it is probably for my good. It is a bit ironic that of all people I've been the one chosen to leave the country at such an early stage of life. As my email id goes, few months back, i had the least idea that i would go out of the country and that too as a long term business. Nevertheless, it's hard to turn down when your lifelong dream calls you to make a choice between itself and the country you love.

I've been known among my friends and family to often pass off niche comments whenever I'm asked about going to another country for a long term. And truly, by heart, even now i cannot think of settling down permanently in country other than India. So I've been in extremely mixed emotions about this. I'm not saying it was a hard choice to make, the choice i had to make was damn easy. But somewhere in the corner of the heart it pricks a little bit as i am actually about to go through with it. Nevertheless I'm damn excited on this new phase of my life. It has really moved very fast so far.

As most of you might already know, I'm now formally engaged to my long term girl friend Gayathri. She is the most amazing human being I've ever met in my life. So naturally, this adds even more excitement to my trip given that marriage is around the corner. In a way, I'm more excited about coming back here for marriage than about going there and taking up my first job.

Personally this journey is a big step for me as I've never gone beyond South India most of my life. Bangalore and Hyderabad have been my borders except for one Delhi trip during college. So I'm half excited and half scared to face the new geography, new culture and what not. Everything is a bit overwhelming, I'm gonna be staying right across the road from Stanford for my first few weeks there.

Off late the only question I'm being asked by everyone is "Are you gonna permanently settle down in the US?". I really don't know the answer for this question. All my life i never thought I'd set foot in another country for a long time. But here i am all excited about how things have turned over in a few months. So I'm not really in the mindset of planning for the long term. Deep down the heart i wish to be back in India sometime in the future.

I'll conclude this almost pointless rant by saying i will miss a lot of things about Indian lifestyle but I'm looking forward to the most important phase of my life and I'm not a least bit sad about it not being in India.

And hey, I'm getting married on March 4, 2013 in Chennai. I will surely invite every one of you personally later, just book your calendar for that date right away :-)

-Vignesh