30 May 2010

Excluding self traffic from Google Analytics data

Google Analytics lets you track how your site is used, which is great.  But did you know that the data Analytics reports includes your own visits too?  You probably wouldn't your own visits to your site to be included in the Analytics data.  Analytics Help Center has an article detailing how this could be done.  This post tries to add some clarity to the "To exclude traffic by Cookie Content" section of that help article.

Depending on which version of tracking code you are using on your site, you have to do this in different ways.  If your tracking code has the line
var pageTracker = _gat._getTracker('UA-xxxxxxx-x');
then you can follow the instructions provided in Google Analytics Help Center and everything should work fine.  However, if your tracking code has the line
var _gaq = _gaq || [];
then change your HTML file to contain this code instead:
<body onLoad="javascript:_gaq.push(['_setVar', 'test_value']);">
Pro Tip: You don't really have to create new HTML file on your site for setting the cookie.  You can just open your site on the browser and type the value of onLoad attribute in the address bar.  For example, in my case, I opened blog.manki.in on my browser; typed javascript:_gaq.push(['_setVar', 'test_value']); on the address bar and pressed Enter.

28 May 2010

Random thoughts: Talking

Frequency and amount of talking (between the related) is inversely proportional to the probability that a relationship might fade away and decay.

(related post: Love and distance)

27 May 2010

Promises are cheap

His promises were, as he then was, mighty; but his performance, as he is now, nothing[1].  Now again, we have more mighty promises.

[1] Henry VIII by Shakespeare, act 4, scene 2.

23 May 2010

Updating Google Spreadsheets over slow mobile networks

It's 2005.  I live in Bangalore.  I tell a friend that I am thinking of buying a PDA, or some device that has PDA functionality.

"A PDA?  Why do you need a PDA?  It's all so old-fashioned!" he says.

"Well, there are certain things that I wanna do when I don't have a computer.  A device like PDA would be useful."

"Like what?"

"Keeping track of my bike's mileage, for example."

"Use Excel dude.  Why would you buy a PDA for something an Excel sheet on your computer can do?"

"No no, I won't remember to update the sheet then.  I should be able to do it on-the-go."
Yep, ability to access and update my data on-the-go has been and still is important for me.

I have been owning a motorcycle for about 5 years now, and one of the things I really care about is keeping track of the fuel efficiency of the bike.  I create a spreadsheet that looks like this.  Mileage column would be automatically calculated by a formula.

Of late, I get nervous if my data is not on cloud.  Any data that is only available in a device that I own is at risk.  And I try to avoid it as much as possible.  Naturally, I created a Google Docs spreadsheet and started keeping track of the bike's mileage.

Now for the on-the-go update part.  Sure, I can open the sheet on my phone and update it.  But opening and updating a spreadsheet on a 2G mobile network is painfully slow.  So I went around and created a form for this sheet.  Whenever I fill petrol or run out of petrol, I pull up this form on my phone and enter the details.

Since it's a very simple HTML form with very little JavaScript, it loads fast even on a slow, congested network.  Saving the data is quite easy too, since all it has to send to the server is a few bytes.

Amores Perros

In all likelihood [Levin] would have been considered quite a suitable match [to Kitty].  But Levin was in love, and therefore Kitty seemed to him so perfect in every respect, so transcending everything earthly, and he seemed to himself so very earthly and insignificant a creature, that the possibility of his being considered worthy of her by others or by herself was to him unimaginable. [Anna Karenina, part 1, chapter 6]
Love is indeed a bitch.

20 May 2010

Random thoughts: Love and distance

It's easy to love the people we can see and talk on a day-to-day basis.  It's easy to stop loving, or caring for the people we don't get to see often.

(related post: Reality)

17 May 2010

Things I've discovered about myself

  • I fear the unknown; I fear the new.
  • Though I like Advaita's philosophy, a part of me is a devoted believer.
  • I am superstitious in multiple ways.
  • I am insanely optimistic.
  • I extremely care about whole eating experience.  It's not hard to make me skip a meal.
  • I quit easily.
  • I think slow (at times); I eat slow; I read slow.
  • I think fast (at times); I walk fast; I code fast.
  • I can honestly repeat these words of Cohen.
  • I am a fan of myself.
  • I like to generalize; I like to philosophize.
  • I don't like to receive orders; I don't like to explain myself.
  • I am a hypocrite (at times).

13 May 2010

Fairy tale

Six months back you said that you valued our relationship.  That made me happy like a kid.

And today you say the same thing.  But now this sounds to me like a fairy tale.

Have I grown up all of a sudden?

9 May 2010

Android apps I use

I have been using an Android Dev Phone 1 for about a year now, and I should say I am very happy with it.  Phones are not phones anymore, and the ability to run third party apps is quite crucial.  Here in this post, I am going to list some apps that I have on my phone.

CallTrack.  This app logs all the phone calls in a Google calendar of your choice.  Why would I need my call log in a calendar?  Well, I don't know yet; but I don't want to throw away my call log every time something happens to my phone (e.g. wipe user data, change the physical device, etc).

SMS Backup.  This one copies to Gmail all the SMS messages you send and receive.  It has proved quite useful to me.  For example, you can do a Gmail search for a friend's name or email address and you will see the SMSes you sent to them or received from them, along with other emails and chats you had with them.

Notepad with Sync.  I was using AK Notepad for quite some time.  But I prefer Notepad with Sync for one reason: it syncs to the cloud.  You need to sign up for a Helipad account.  One more user name and password to remember, but at least my notes would be much safer on their servers than on my own SD card. Also, I can edit my notes on the phone as well from a computer, without having to copy files around.

Handcent SMS.  Shows SMS messages in a popup and let me reply to or delete messages then and there, without having to switch to a different app.  Quite useful to me, as I read and immediately delete about 80% of the SMSes I receive.

Twidroid.  A full-featured Twitter client for Android.  (Update: I am now using the Official Twitter app for Android.)

OI File Manager.  Not something I use every day.  But it's good to have a file browser installed, so you can, for example, install some app that you get from some source other than Android Market.

U turn

I saw an alien today.  An alien that looks and speaks exactly like humans.  An alien that can ride motorbikes that we humans use.  Don't believe it?  Read this flashback:
The traffic signal turns red and no one would stop.  The cop "regulating" the traffic shows stop sign to them all, but only the inflow of traffic from the other side could stop people.

There's just enough space for one bike in the right extreme of the road, besides a Hero Honda Splendor, and I stop my bike there.  As soon as I stop I hear a honk from behind me.  Without caring much, I switch off the engine.  The honks won't stop and the Splendor guy next to me gives in and moves his bike aside to let the impatient bike move along.

Some fat dude on a measly Yamaha R15[*] comes near me and stops.  I look at the R15's dash and it looks quite nice with its white back-lit display.  "Horn suntha hi nahin kya?" (or something along those lines), he asks me.  I give a blank stare and turn my face again to the signal light.

"Are you not hearing my horn sound?" he persists on getting an answer from me.

"It's red."

"I want to go this side.  I am taking a U turn."

"You are not supposed to take a U turn when it's red."

"Who said you cannot?  Go and read the traffic rules!"

Awestruck, I am at loss for words.  The signal soon turns green and I leave the place.

Only after a few minutes I realise that I had been talking to someone who is driving in this planet following traffic rules of some other planet!  I didn't even ask him/her which planet he/she from.  Damn!

[*] I call the R15 measly because it's small in physical size.  I know it has a powerful engine, designed for race track and all that.


Siddhartha, a novel written by Hermann Hesse, is probably the first English novel I read.  It's one of my favourite novels of all time.  I chose to buy a copy of Siddhartha as a gift for a friend.  Before giving the book away I read the book once, and collected some quotes as usual.
  • Love can be obtained by begging, buying, receiving it as a gift, finding it in the street, but it cannot be stolen.
  • Everyone can perform magic, everyone can reach his goals, if he is able to think, if he is able to wait, if he is able to fast.
  • Everyone takes, everyone gives, such is life.
  • Stop scolding, dear friend!  Nothing was ever achieved by scolding.  So, leave it as it is, my friend, and don't harm yourself by scolding me!
  • Most people are like a falling leaf, as it wavers, and tumbles to the ground.  But others, a few, are like stars, they go on a fixed course, no wind reaches them, in themselves they have their law and their course.
  • Perhaps people of our kind can't love.  The childlike people can; that's their secret.
  • It is foolish, this path, it moves in loops, perhaps it goes around in a circle.  Let it go as it likes, I want to take it.
  • This [river's] water ran and ran, incessantly it ran, and was nevertheless always there, was always and at all times the same, and yet new in every moment!
  • "It is beautiful, sir, as you say.  But isn't every life, isn't every work beautiful?"
  • There was no teaching a truly searching person, someone who truly wanted to find, could accept.  But he who had found, he could approve of any teachings, every path, every goal, there was nothing standing between him and all other thousands any more who lived on that which is eternal, who breathed what is divine.
  • Even if you would die ten times for [your son], you would not be able to take the slightest part of his destiny upon yourself.
  • This pleasure also had to be atoned for, this pain also had to be endured, these foolish acts also had to be committed.
  • The opposite of every truth is just as true.  Any truth can only be expressed and put into words when it is one-sided.  Everything is one-sided which can be thought with thoughts and said with words, it's all one-sided, all just one half, all lacks completeness, roundness, oneness.
  • A person or an act is never entirely Sansara or Nirvana, a person is never entirely holy or entirely sinful.
  • The world is not imperfect, or on a slow path towards perfection: no, it is perfect in every moment, all sin already carries the divine forgiveness in itself, all small children already have the old person in themselves, all infants already have death, all dying people the eternal life.
  • What is one man's treasure and wisdom always sounds like foolishness to another person.
  • Salvation and virtue as well, Sansara and Nirvana as well, are mere words.  There is no thing which would be Nirvana; there is just the word Nirvana.

Random thoughts: Joy

Creativity is one of the ultimate joys in life.

6 May 2010

Dealing with Windows's slowness

I am not a fan of Windows, and everyone knows it.  I have to run Windows (XP, if you care) for some time, and so my laptop has Windows on it.  One problem with Windows is that it becomes very slow after running for a few days.  Do you know why?  Because applications that we keep running eat up all the memory and Windows doesn't have enough memory to keep running.

When you see that the apps are getting slow, open Windows Task Manager (by right clicking on task bar and choosing Task Manager from the menu) and see how much memory your computer is using.  In this particular screenshot, about 1.42GB memory is used by Windows and all currently running applications.

If it's using more memory than what your computer actually has[1], your computer will be slow and you should free up some memory.  Freeing memory is easy: just restart the apps that are consuming a lot of memory.  If you are like me, most of your memory would be taken up by browsers.

Go to the Processes tab of Task Manager and sort the list on descending order of memory usage.  You will see something like this:

You can see from the image that Chrome is taking up a lot of memory.  It's natural because I never close my browsers.  You will see several entries for Chrome in the task manager because Chrome starts one process for each tab, extension, plugin, etc.  Close the unnecessary tabs and restart Chrome.  (Your Chrome restores all previously open tabs, right?)  Restart any other app that has been running for a long time and consuming a lot of memory.  This should make your computer considerably faster.

Maybe you don't have to do so much
Sometimes, one Chrome tab could be using a huge amount of memory and you could probably close only that tab and keep going.  Chrome has its own task manager.  Chrome's task manager, when sorted based on memory consumption, shows which tabs take up lots of memory.  In my computer right now, Gmail alone is consuming 82,500KB of memory (which is a lot).  If I don't need Gmail to be open now, I can close it and I will get this 80-odd MB's of memory back.

Of course, this technique may not work for you if your usage patterns are different from mine.  By doing this once in a few days, I have been able to run my Windows machine for more than 17 days now, which is impressive.

[1] It might sound ridiculous, but your computer can really use more memory than you actually have.

4 May 2010

Engirundhu Vandhaayadaa from Five Star

One of the things I like about web is that you get ideas and inspirations from people you don't know.  Inspired by Thinkala's song translations, I am attempting a translation of a Tamil song.  A favourite of mine, no need to say.  In the movie, this song is sung by a girl whose husband runs away immediately after their wedding.  She awaits his return, and this song she sings in someone else's wedding.

I am trying to translate it without ruining the beauty of poetry.  But then, translating poetry is hard, and more so if you are not an expert in both languages.  Please leave a comment if you have a better translation for any part of the song.

The song is here:

Engirundhu vandhaayadaa -- nee
Enai paadu padutha?
Engu kondu sendraayada -- naan
Enai thedi edukka?
Inbam thunbam thunbam inbam
Inbam endru nee
Sogam rendum kodukka
Sugam rendum kodukka

Where did you come from to trouble me?
Where did you take me to?
How'd I find myself?
Joy and sorrow, sorrow and joy,
You gave them both to me[1]

Vaanavillaay aanum vannam ezhaay pennum
Irundhaal innum vaanin azhagu koodum

Sky would be more beautiful
When the man is rainbow, and
Woman, its seven colours.

Suttu viralaay neeyum kattai viralaay naanum
Ezhudhum edhuvum kavidhaiyaaga maarum

With you as the index finger, and I as the thumb
Everything we write would transform as poetry[2]

Vidaamale unai thodarndhidum enai
Ore oru murai manadhinil ninai

Think of me only once,
The one following you always.

Ennai enna seydhaayada?

What have you done to me?

Vaasal vaazhaiyodu vaarthaiyaadal aachu
Iniyum pesa pudhiya kadhaigal edhu?

There isn't more stories to share with the banana tree
That stands in our threshold, talking to me.

Oruvar vaazhum ulagil mounam dhaane pechu
Mozhigal edharku iruvar inaiyum bodhu?

In a world of single person, silence is all talk.
When two unite as one, who needs languages?

Vizhaakkalil ival thanithirukkiraal
Kanaakkalil dhinam vizhithirukkiraal

This girl is alone in all celebration gatherings.
And she's awake in dreams.

Ennai enna seydhaayadaa?

What have you done to me?

[1] This is a super-diluted translation where I've devoured the poetry; sorry about that.  I will make an attempt to atone for it by giving meanings to individual words so you get a better idea of the lyrics.
inbam = joy, pleasure, etc.
thunbam = suffering, sorrow, etc.
nee = you (naan = I)
sogam = sadness
rendum = both (it comes from rendu (in spoken Tamil), which means two; it's written as irandu)
kodukka = to give
sugam = pleasure, happiness

[2] The man and the woman as the fingers holding a pen

3 May 2010

Maldives - 2

Found this bike when I was walking on Malé's roads.  Using a padlock to lock your bike is an interesting idea :)  (Look at the disk brake's disk if you can't see the padlock.)

During our team offsite, we were all given a plain t-shirt.  We can draw anything we like on the shirt, and I drew this one.  Although my phone is still running Donut.


I was in Maldives for the past few days.  This post is a list of disconnected observations from the trip.
  • When I was playing in the water in a lagoon with a float, I told a friend: "I want to be left alone in deep sea, with no one to help.  All I'd have is a float like this.  I want to starve and struggle and die in a few days."  When I was taken to deep sea for snorkeling, I thought "Wow, how I wish to be here forever!  I wouldn't mind if a fish eats me alive when I am in the water, if only that means I am not going back."  After all this, when I was in the real sea, I was scared to touch the plants in the sea and kept some distance from even tiny fish!  That showed me how scared I am to new things.  It takes a while before I get used to anything new and feel secure.
  • I was not very enthusiastic about this trip.  And my stay in the island didn't make it much different either.  The pictures I took in the trip range from average to bad.  Except for one or two pics that I like.  When I think about it now, it looks like my good pictures -- at least the ones I think are worth sharing -- are taken when I am happy.  The pictures are in my Picasa album, if you are interested.
  • Best times for me in the offsite:
    • Sitting in an Italian restaurant during sun set.  You get a great view of the sea water.  Evening breeze and not-so-hot-and-bright Sun.  Some French fries and coffee.  A book to read.  One friend sitting with me, mostly minding his own business.  We talked now and then, but we were both doing what we wanted to do.
    • The time we spent near the beach under the moon.
  • We rented water scooters and rode them into the ocean.  It was a great experience.  Seeing so much water all around you is an experience of its own kind.
  • When my friends used to finish reading a whole novel in a couple of days, I took two to three months usually.  That was because, I thought, I was a slow reader.  In Bangalore airport, I bought a copy of Keep off the Grass on a whim and finished the book before the offsite ended.  I am still a slow reader; but the books I usually read are heavy text and only that makes my reading slow.  (As if you care!)