December 11, 2013

Embed fonts in a pdf after pdflatex

Command to embed fonts in pdf :)

gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf

If you run this in your final pdf file then you can end up having multiple copies of the embedded fonts -- thanks to pdflatex thinking that each font missing is belongs to a different font family.  
 I had this problem because I used R to generate the plots.
So for the folder in which the plots are present I ran the following command. 

for d in *.pdf; do gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite -sOutputFile=output.pdf ${d}; mv output.pdf ${d}; done

I then ran pdflatex and it worked :)

November 16, 2013

Disclaimer Email

Dear Ashwin S Rao,

Greetings from Mphasis Recruitment Team / Onboarding Team!! Thank you for accepting the position**. We are excited to have you onboard at Mphasis.
To take your hiring process further, we require some of your documents and for you to fill the Joining Kit.Please Click Here to upload the required documents and submit the joining kit.

Your login credentials are :
User name
Password :eiug2657EI
After logging in, you will find two links in the Work Queue page-

  1. Upload Documents: This will help complete all documentation necessary
  2. Online Joining Kit: This will help getting documentation organized, such as PF form, gratuity etc.

Click on the above links to complete each activity.

For more details on completing the above steps, visit the ‘Help’ section located in the left hand menu.

Don’t click on any of the options in the left navigation after taking an activity. In case you do so, please close the browser and Re-login.
For any issues faced in completing the above steps, please get in touch with the recruiter.
Mphasis Recruitment Team.

Disclaimer -

Position** - is defined as – A) Full Time/Part Time Employee in MphasiS payroll OR B) Direct/Individual Contractors for MphasiS OR C) Sub Contractors OR D) No cost contractors OR E) Trainees and all kind of Hire.
In case of A, B and E as mentioned above- please go through the terms and conditions of your offer letter/ contract/ Purchase Order before accepting/ rejecting.
In case of C and D please discuss with your employer on the assignment with MphasiS and then proceed with Accept / Reject.


Compatible Browser: Internet Explorer(IE) 6, 7, 8(Full Version)
In case of using Internet Explorer(IE) 8, please ensure to change the configuration as follows:
IE Web Page -> Tools -> Internet options -> General -> Languages -> Add only English (United States) [en-us]

This is an auto generated mail and Please do not reply to this emailID.
Information transmitted by this e-mail is proprietary to MphasiS, its associated companies and/ or its customers and is intended
for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded
to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly
prohibited. In such cases, please notify us immediately at and delete this mail from your records.

Disclaimer Madness

I was not the intended recepient of an email that was explicitly sent to my address. The email had the following disclaimer which mentions that "any use ...of this information is strictly prohibited."

Information transmitted by this e-mail is proprietary to MphasiS, its associated companies and/ or its customers and is intended
for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded
to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly
prohibited. In such cases, please notify us immediately at and delete this mail from your records

What worries me are the bullying words of "strictly prohibited." Who the hell are these idiots to prohibit me from reading my email? First they mail me and then they prohibit me from reading my mail. According to the disclaimer, I have violated their so called company clause by disclosing their secrets to me. If these guys are so paranoid about the content, they should not send it to external email address.

Furthermore, why must I notify them and why must I delete this email? They are not paying me, and they are not some charitable organization protecting humanity from some satanic power, so why must I work for them?

My concern is will a person like me have any legal protection if some idiot from say Big Bully Nuclear Inc sends me some nuclear secrets with such a disclaimer. Will I be the culprit of leaking nuclear information just because someone in Big Bully Nuclear Inc screwed up email addresses.

November 4, 2013

Thoughts on the peer review process

Each time I see a call for papers with the list of people in the Program Committee  see, I wonder -- "All animals are equal, but some animals are more equal than others".

In the spirit of peer review, is there any conference/journal/workshop  where the ones submitting paper are made (forced) to review at least one paper? For starters, one of the authors of a paper submitted must volunteer to review at least one paper.

Will such a system work, given that the ones that have submitted the paper have a vested interest to reject papers? If we have to model this system, how do we go about it? Is the hawk-dove game a right approach?

Will the knowledge of this vested interest change the way members of the PC  review the paper?

Has such a system ever tried?

August 20, 2013

Hyperref and bibtex: Linking the document title to its URL

Most of us read our papers on our computers or tablets. Though printing a paper has its own charm, I prefer to minimize the trees chopped. The one thing that I dislike in research papers is the big bibliographic entries. Yes, in the middle ages we needed to know the names of all authors, the article title, the conference or journal details, the details of the publisher, and other information to search these articles. However, I have never seen any one walk to a library and request the librarian for a copy of some journal for an article -- my father apparently had to do that but I guess I am privileged enough to use the article title followed by one of the authors to find the article. But even this is not required to get to the online copy of the article. Also remember that each google query costs at least 1 kJ of enery. So why should we waste this energy when we have hyperref? Sadly,   for some reason the default acm and ieee bst files are lazy enough to ignore the doi and url values which their own online libraries provide in the bibtex entries of articles.

This is frustrating and I wanted to use the good things present in the natbib for my thesis while still using the acm.bst file.

The following steps need to performed to ensure that the name of the paper points to URL containing the paper. I did this for the acm.bst file, however, I believe that the same steps can be used for other .bst files. 
  1. Ensure that the line indicating doi and url values present in the .bib file are parsed. The acm.bst currently does not parse the doi and url entries.
  2. Format the title such that the title of the document (name of the paper) points to the URL contained in the url or doi entry.
You need to edit the acm.bst file (or the .bst file you want) in the following manner.
Step 1 is performed by indicating that the url and doi entries need to be parsed.The text in bold need to be added at the appropriate place. I have added a diff -- this might change depending on your .bst file.
  { address


  { label }
The lines containing url and doi ensures that the values in the .bib file shall be parsed.

The code for Step 2 is as follows

FUNCTION {format.title}
{ title empty$
    { "" }
    { doi empty$
    { url empty$
        { title "t"$ }
        { "\href{" url * "}{" * title "t"$ * "}" * }
        { "\href{" doi * "}{" * title "t"$ * "}" * }
What the above code does is that it links to the url if the url is present. For entries that do not contain the url value it tries to use the doi value. Entries that do not contain the doi and url values are treated in the default manner.

The diff between the default acm.bst file on my machine and my modifications are as follows.

<     doi
<     url
< %FUNCTION {format.title}
< %{ title empty$
< %    { "" }
< %    { title "t"$ }
< %  if$
< %}
<     { doi empty$
<     { url empty$
<         { title "t"$ }
<         { "\href{" url * "}{" * title "t"$ * "}" * }
<         if$
<     }       
<         { "\href{" doi * "}{" * title "t"$ * "}" * }
<       if$
<     }
>     { title "t"$ }
Please note that you need to include the hyperref package in your tex file this change to be effective.

August 6, 2013

Astrid Winding Down

I received this email in the morning. I was using Astrid for some time now and I really liked its interface. After gmail, it was one of the most usable online tools that I came across. Sadly, it seems that the tool was so good that it was bought by Yahoo so that its engineers can try to breathe life into Yahoo.

Hi Ashwin,
Once again, we want to sincerely thank you for being an Astrid user over the years. We want to remind you that as of August 5, 2013, the Astrid service will be closing and will no longer be available.

We know that a transition can be tough, but we want to make it as easy as possible for you. Please go to this link: to download your data.

Once you have your data, we recommend you check out one of these applications. They will allow you to easily import your data, so you can pick up where you left off: Wrike, Wunderlist, Sandglaz, and

When we built Astrid, we sought to help as many people as possible become happier, healthier and more productive – and we certainly hope we helped you. Thank you again for your support.

Best regards,
Jon Paris & the Astrid Team

August 1, 2013

Refreshing bike ride

I really like the 6 km morning bike rides from my residence to the airport. The red sun and the cool sea breeze is refreshing even in days of extreme stress. A welcome addition is the splashes made by my bike when passing over puddles of water left behind by the trucks that wash the promenade in the morning. Today, after a very long time I got to see the boats sprinkling water on the stones on the beach. The sprinkles that leaked over to the promenade were a gentle reminder of the Monday's storm.

July 29, 2013

Storm in Nice

Monday, 29 July 2013, was to some extent unforgettable. It began with the storm that caught me by surprise.

The bike ride up to nice parking was like riding in heaven, cool sea breeze, surprisingly well oiled velo blue, the clouds rumbling and teasing with light drizzles. I thought I could make it to the airport and decided to continue biking.

Once I crossed the smelly nice parking bend and started rolling parallel to the aircraft hangers, the clouds decided to make me nostalgic. They showered me like their counterparts have showered me in Mumbai and coastal Karnataka and cherrapunjee.
I was completely wet. Only a small part of my shirt, tucked in my shorts, was dry. Luckily, I as planning to run into the afternoon so I could change to something decent once I reached my office.
By noon things became clear and I could enjoy an amazing run in the forests at Sophia. The soft mud was perfect for running

June 21, 2013

Life at INRIA Sophia-Antipolis: Wild boars and memories of the baby fox

Days are good when emails like this bring back sweet memories of the time as a student.


Following the repeated presence of wild boar(s) on the site, an
administrative hunt will be held on Sunday morning.
To avoid accidents, the center will be closed from midnight until
noon on Sunday, June 23rd.
Please do not come to the site during this period (not even by
coming through the Campus).
Thank you and have a nice weekend.

A la suite de la présence répétée de sanglier(s) sur le site, une battue administrative sera organisée dimanche matin.
Pour éviter tout accident, le centre sera fermé de 0 H à midi dimanche 23 juin.
Merci de ne pas venir sur le site pendant cette période (y compris par l'accès Campus).

I have never come face-to-face with a boar on campus, though I have heard twigs and dried leaves being stomped upon in the bushes near the campus.
My only face-to-face encounter with a wild animal was in late 2009 or early 2010 with a baby fox. The fox was apparently scarred of me and my clumsy feud with my umbrella -- fluttering wildly with the noisy wind --  while I was scarred despite being amazed by the hypnotic sight of its magnificent furry tail and the shiny worried eyes. I believe it was crying on being lost as it jumped to hide under the trees and give a timid stare at the student soaked in the rain, a student who could not decide if he should run without the umbrella or keep it in case the mother decided to come out and protect her child.

On the walk back home I only wished that the fox survived the night the rest of the rainy winter at Sophia-Antipolis.

June 1, 2013

Imperialism and America

Some nice take aways from this talk
1) Expansion as a strategy to ensure security.
2) Salt water fallacy.
3) Wilsonian idealism:  McDonald's cannot flourish without McDonald's (Douglas).
4)  George Kennan Pps 23. Maintain a disparity such that 6% of population controls half the worlds wealth and 6%of population and must maintain this disparity. Despite such statements Kennan removed as soft hearted!
5) Cold war as War of us against third world. Use other power as pretext to quel nationalism in each ones backyard.
6) Nationalism is a virus -- Kissinger. Small weak countries to be crushed as an example.
7) End of cold war:  Change from weapon rich target to target rich region.
8) Two principles of rule (bullying): i). We own the world, and  ii). Everything we do is done with the best of intentions
9) Oil sanctions made directors of oil for food program resign because they considered sanctions to be genocidal.

I really liked the way in which he ends the talk. Despite all the crazy facts the talk ends with a positive and optimistic note,  "On issue after issue the major problems happen to be right here, which is a very optimistic conclusion, because it means we can do something about it. It is here where we can have an influence, not elsewhere."

The calm manner with which he handled the first question is breathtaking -- worthy of the applause he receives.

April 21, 2013

Facebook ads!

Ever since I changed my marital status from married to single I am bombarded by the following ads! Time to remarry my beloved fake account?
Femmes Russes

Rencontrez des femmes Russe via l'agence Eurochallenge et trouvez l'amour tant recherché !

April 15, 2013

Interesting SPAM/Message

I am really bad in using smart phones and message like the following one always amaze me
You have one new message. Please click to access the message.
Clicking on the link takes me to a page like this. I am really amazed by the effort the spammers go through to make sure that I click on anywhere on  this page. Each click will result in a call that costs 1.35 + 0.34 = 1.69 Euros! 

April 11, 2013

Phishing Test at INRIA

Lately I have been receiving about 4 to 5 emails with the following content

Dear Account Owner,

This is a message to you from the INRIA® Messaging Center to all our
Inria account owners.

We are currently carrying out scheduled maintenance,upgrade of our web
mail service and we are changing our web mail host server to privent scam
mails,as a result your original password will be reset.

We are sorry for any inconvenience caused.

To complete your Inria account upgrade, you must reply to this
email immediately and provide the information requested below.
Re-type Password:
Failure to do this will immediately render your email address deactivated
from our server.
********************************************************** *************
This E-mail is confidential and privileged. If you are not the intended
Recipient please accept our apologies; Please do not Disclose, Copy or
Distribute Information in this E-mail or take any action in Reliance on
its contents: to do so is strictly prohibited and may be Unlawful.

Please inform us that this Message has gone astray before deleting it.

Thank you for your Co-operation.
Copyright© INRIA WebMail 2013. All Right Reserved

I am really tempted to send them the following reply.

My beloved sys admin,

Please do not delete my account. I have experience in running a lot of man in the middle attacks, creating fake wifi hot spots, and gathering passwords and hijacking SSL content. If you really need the user names and passwords I can help you setup an infrastructure that give you access to a lot of the private content that you can ogle in your free time!

Thanking You, Yours Sincerely,



March 25, 2013

Google Tasks (Canvas Mode)

Tasks is by far one of the most useful and yet one of the most inaccessible tools developed by Google.

The best way to access tasks is by using tasks in canvas mode. Surprisingly, apart from iGoogle, which will soon shut down, no other google application such as calendar or email, renders tasks as beautifully as iGoogle!

The good think is that the canvas mode can be accessed via the link

March 8, 2013

Why do the IIT undergrads spam?

Dear Professor Rao,

I am Chamchuram, nth year undergraduate student of godknowswhat
Engineering(Bachelor of Technology program) at Indian Institute of
Technology, (www.****) Timbuktu, India. I came to know about you 
from your research paper "One of my toilet papers". 

I am writing this mail to request you to provide me with an opportunity to undertake research internship under your able guidance during summers 2013 (May-July). I am willing to apply
for the "Charpak" scholorship (details can be found at )
under your esteemed guidance.s 

During my undergraduate studies, I have developed an interest "in all what you like that I copied from your homepage." I have done courses on all important stuff.

I have also undertook the following projects to gain insight into the
various areas of Electrical Engineering.

      1) Pinky and Brain take over the world
      2) Why did the chicken cross the road? Why did Fred marry Wilma?
I am comfortable with mathematical and simulation tools like "all what I heard to be important." I am an avid programmer and possess good programming
skills in *, *++.

I believe that my knowledge in the field of **** and
coupled with the dedication and commitment I work with, will lead to some
productive research work and make my internship truly fruitful. Though
my experience is not much significant, I assure you that it will not be a
matter of concern as I enjoy a steep learning curve.

I have attached my resume along with this mail for your perusal. I shall
be highly grateful to you if you provide me an opportunity to explore
academic opportunities in your group.

Thanking You,
Yours sincerely

February 4, 2013

Why to use visudo?

The /etc/sudoers file contains the details of the users that can execute the sudo command.

The good thing about this file is that it contains examples, in comments, on the various ways in which a users permissions can be specified. Also this file must have the only read only permission for the user root and group root.

 [root@localhost]# ls -alh /etc/sudoers
-r--r----- 1 root root 3.7K Feb  4 12:17 /etc/sudoers

The best way to edit this file is visudo. This command ensures that the permission are always correct -- there have been instances when the booting of one of my machines failed because I forgot to reset the permissions when I did not use visudo.

The other reason to use visudo is that once a file has been written, it is parsed for correctness.

[root@localhost]# visudo
visudo: >>> /etc/sudoers: syntax error near line 100 <<<
What now?
Options are:
  (e)dit sudoers file again
  e(x)it without saving changes to sudoers file
  (Q)uit and save changes to sudoers file (DANGER!)

What now? e

January 27, 2013

How does the world appear to non-believers?

The answer to this question can be found in closing remarks of Sam Harris in the debate embedded below. This debate, between Sam Harris and William Craig, was the second debate in the  "God Debate" series held at the Notre Dame University. I like this debate primarily because of the closing remarks made by Sam Harris (at 1h31m in the video).  For believers of a particular religion, these remark highlights how the world appears to non-believers and to people believing in another religion. I am para phrasing these remark as follows. For all Muslims, replace the word Koran in the next paragraph by Bible, or Bhagvad Gita, or any other text you wish you use.

We all know that the Koran exists and is considered by many to be the perfect word of the creator of the Universe. We all know that once having heard of this possibility, and rejecting it, the ones rejecting it  shall all go to hell for eternity. If this vision of life is true then all non-believers and the believers of other religions shall go to hell for eternity. Now what if Muslims are right, and the Koran is indeed the word of God, and all the words in the Koran are true. How would we (non muslims) view God in moral terms? We (non muslims) have been born in the wrong place, to the wrong parents, given the wrong culture, and given the wrong theology. Most scientists who are non-believers have been thoroughly misled by science. Now where is the compassion of the God of all the monotheists? Now this God is omnipotent and compassionate. He could change this if he could, and yet he would not do it for mysterious reasons.  Therefore, hell awaits all non-believers and believers of other religions. Not only this, hell awaits the little children of these misled believers -- these mislead believers shall continue to mislead their children. Now hold this vision and just appreciate how little sleep you have lost over this possibility. Now how comfortable we all are despite the fact that we failed to recognize the perfect word of God. This is how Christianity, Hinduism, Buddhism, Judaism, and all other religions appear to someone who is not indoctrinated by any religion! Our scriptures were written by people who, by virtue of their placement in history,  had less access to scientific information and facts that we have now. In fact we now have a wider world view compared to people living thousands of years before us! We now have the power to build a global civilization of close to 9 billion people! The only tool we need for this is honest inquiry!