How do you respond to people posting on your Facebook wall to wish you Happy Birthday?

The best option is to use the Graph API on your own. It’s as easy as using facebook. Go to Facebook Developers Tools –> Graph API.

First step, GET ACCESS TOKEN |–> Extended Permissions – read_stream, publish_actions. No more permissions are required.

Second Step, POST to GRAPH API.

I would suggest, do go through Quickstart and Making Multiple API Requests. Check the Specifying dependencies between operations in the request section. Yes, they have given you the curl script. Modify the batch curl script, Read the feed on your birthday, “me/feed?until=20xx-xx-xxTxx:xx:xxZ&with=nf&since=20xx-xx-xxTxx:xx:xxZ”

And, Post a comment “{result=get-wishes:$.data.$i.id}/comments” with message of your choice

or, like the wishes if you want “{result=get-wishes:$.data.$i.id}/likes”

Run it on terminal and save yourself from your friends. The graph API is nice 🙂 Within half an hour I commented and liked hundreds of wishes.. Shhhh!!! Don’t tell my friends!

Here is a sample, part of my curl script,

curl -F ‘access_token=blahblah’ -F ‘batch=[{ \”method\”:\”GET\”,\”name\”:\”get-wishes\”,\”relative_url\”:\”me/feed?until=2014-12-19T19:00:00Z&with=nf&limit=200&since=2014-12-18T16:00:00Z\”,},{\”method\”:\”POST\”,\”relative_url\”:\”{result=get-wishes:$.data.$i.id}/comments\”, \”body\”:\”message=Thank you!\”}]’ https://graph.facebook.com/

How do you respond to people posting on your Facebook wall to wish you Happy Birthday?

EDIT: Facebook’s APIs have changed. Looks like it does not work as is any more.

I’m grateful

Well, after a long time I found something to express. Although it has happened almost a month back, I would love to share it with you.

It was just another day, and after a lot of Indian Railways booking drama, my sister was coming back to Kolkata. She got down at Howrah station in late afternoon and my father picked her up and booked a prepaid taxi to avoid the queue. And as usual our fellow taxi driver demanded some extra money as soon as they approached home. But, in that bargaining my tired sister forgot her beloved Android phone in the taxi.

Soon she realized and started to panic frantically, by the time I called up from Chennai to know her well being. Her phone had been ringed several times, but nobody seemed to pick up. Then, the technology helped, for which I am writing this piece. I remembered how we once found each other in Marine drive, Mumbai when we didn’t come in sync. It’s the one who came to rescue us, the Google Latitude.

So, the journey began. The thoroughly followed journey of the taxi driver, using 2G network. I started tracking her phone from my Lab computer and I found he just crossed somewhere near Park Circus. My sister and father had already explained how important the phone was and how sensitive information it contained to the traffic guard police. They rushed to the Haridevpur police station. Meanwhile, I could not see the location for quite 40 mins. Then I suddenly saw the pointer at Kakurgachi and  it was there in Kakurgachi for sometime. As I was continuously updating my sister, she planned to go to Kakurgachi quickly. But then, you know, it was nonsensical to chase around a taxi taking rounds of busy Kolkata. When they were about to start for Kakurgachi, ah! it too started moving on the map and we realized it was going towards Howrah. Of-course!, the driver had to get his payment for the trip from the prepaid counter at Howrah. Oh, Barobazar it had reached. And then came the coolest part, it was traveling over the Ganges, the pointer was dangling on blue water tagged as Ganga on the Google map. But why not the great Howrah bridge, why it was hovering on Ganga! Panic loomed. I did even think of possibilities like, somebody might have taken the phone from the  back seat of taxi and crossing the Ganga by Ferry! But no! sigh! It reached Howrah station in few minutes. By this time, my sister already spoke to the prepaid taxi counter person over phone and one of her friend was driving them to Howrah. Well, finally she got her phone back.

Later it was revealed, that the driver kept the phone securely in his pocket and  Kakurgachi was his home where he was resting in between.
Trust me, it was really a thrilling experience to track something you lost in real time. And that to you see it just running around Kolkata and you are not able to catch it, while it may die any time. So, here goes my respect for Google Latitude. It was tremendously useful which I never realized before.

Note: Google Latitude has retired since 9th Aug. Google issued a notice to it’s users saying it is retiring and all the data on Latitude will be deleted. But they will have something similar in Hangout.

IISC MSc Engg continued…

On the very next day, 6th June, it was time for SERC interview. There was also a small written test followed by the interview. Here they selected candidates based on their performance in written, unlike CSA.

In the written exam, there were 8 questions among which 5 were to be attempted in 30mins. Very basic questions were there, but little tougher, rather more lengthy, than the CSA warm up. Questions were like,

1. Form a binary search tree with the elements of an array given
2. Probability problems (Bayes theorem)
3. Fill in the blanks in a linked list reversal pseudo code. Was to place the pointers properly.

… I could attempt only 4, but got selected for the interview.

Here also we had to give our lab preference, in which all lab we would like to work and interview questions were supposed to be in accordance with that. This time the interview started with data structure by default.

  • Draw an arbit binary tree
  • Represent it using an array (with out caring about wastage of memory)
  • postfix and prefix notation
  • can construct the tree back?
  • why not?
  • With infix? why?
  • made it a expression tree. Now why with postfix we can evaluate?
  • draw a 4*4 grid. In how many ways one can come from (0,0) to (4,4)?

So, it finished within 30 minutes and I realized in interview confidence and faith on yourself really matters, specially comparing with the last day’s one.

Again IISC.. MSc (Engg)

After a long month it was again time to roam around a bit with the excuse of interview. By God’s grace, I got interview calls for MSc (Engg) from both the departments, CSA and SERC in IISc. Former through JEST and later through GATE.

First, it was CSA on 5th of this June. I was pretty sure that I wont clear the written paper like last time, the SERC M Tech exam. Actually, I was so sure that I would not clear the written and hence would not get the chance of appearing for interview, that I didn’t prepare at all for the interview. And there was subjects like Discrete Math, Linear algebra, Probability for interview.

The subjects for interview are in accordance with the research interests you select, like I selected mostly from intelligent systems, machine learning, pattern recognition and got those subjects for interview. They send a interview note,via email, before hand, so that candidates can select there area of research interest and prepare the subjects for interview accordingly.

Now this time,with all my surprise the paper was easy and they gave enough time to finish it. There were 10 question for 30 minutes. As they said, it was for warm up,

1. How many number <100 has odd number of factors?
2. Uniform distribution, P(X>0.3)?
3. Rank of a matrix, a (i,j)=0 ,if i+j odd, else 1
4. Difference between Divide n Conquer and Dynamic Programming
5. Recurrence relation and worst case time complexity of Merge sort

Rest was also easy, n I dont remember them  🙂

With in few minutes they called everyone (I guess everyone was called) for interview in three panels. And I was taken upstairs directly into the interview room. Profs were smiling n I kept saying myself, “am I going to make a big fool of myself?” I think this is something you should never do. You should always go for the interview with a confident face, confident mind. Anyways, it stared with Discrete Math followed by Linear algebra, followed Probability.

1. Define relation and function
2. Difference between them
3. Cross product of a set
4. Write definition of reflexive, symmetric, equivalence relation in mathematical expression
5.  Number of symmetric relation

6. Eigen values, define, write n mathematical expression

7. Define random variable

I was so very struggling for most of the answers, specially the definitions, that they finally asked me about a subject choice and again I said Data Structure and Algo.

8. What is min heap
9. Build one from an array
10. How heap sort works using min heap

Finally they let me go.

Journey Continued…IITM MS Interview

26th April, 4am, I woke up in train with anxiety that I still had not reached Chennai Central and I had my written test at IITM from 8am. Some Goods’ train got derailed and I was stuck somewhere, far away from chennai, at least 25km. Not much locality around, the only way was to reach near by highway, by walk, to get a bus, the station master said. In that all dark, thanks to my friend, I found a contact number of fast track cab. I booked a cab which reached the near by highway almost around 6am. I rushed to CS department with my luggage at 7:45am. oh..(sigh of relief)! O, I forgot to mention, I saw a deer just standing by the road while coming to the CS department. 🙂

Soon I learned, the test got postponed by an hour. With all tiredness from last two nights’ train journey, I was feeling really sleepy..Oh, the test was going to start in minutes!

The test was in two parts, first a short mcq paper followed by a descriptive type paper. Mcq paper had few 1marks, few 2marks questions with no -ve marking. 🙂 It had questions from  digital, basic aptitude, combinatorics. Unfortunately, I don’t remember them.

Descriptive part was actually tougher. It had questions from Cache hit-miss, Sequential ckt (counter), Complexity- recurence relation, Fibonacci series, Ramsay theorem (thanks to sarthak, I didn’t know it before), combinatorics n all. Here among 8 questions we had to do 5.

The good thing about iitm was that they took the application fees from the candidates were called for interview. But with my forgetful mind I left my demand draft at home and after test, ran to the campus SBI to get a new demand draft. Quickly finished my lunch and planned to dump my luggage at hostel. But only could reach up to the hostel reception and I had to literally ran back to the department as I came to know that they had started announcing the result and declaring interview timings. I kept my luggage at the reception only. And trust me, Chennai is the hottest and perhaps one of the most humid places in India.

Got selected for interview which was on that very day only. Document verification started soon I reached. In the same day, same dress, same me, after 2days of train journey, I appeared for the interview! Drank a cup of  coffee, which they served for free, to keep myself from dozing off . I tried my best not to go with a haggard face. And in all these I got confused which subject I should choose for interview. My interview call came around at 5pm. Although I had had a plan to say Automata, I suddenly selected Data Structure in front of a panel of 7-8 profs and one of them started questioning with a cynic smile in his face,

1. What is equivalence relation?
2. How can u represent equivalence relation with a data structure?
3. Which data structure? how efficient? How can u test for equivalence efficiently?
4. Shorting algo which does not take any xtra space
5. matrix inverse

And finally they asked me to leave. I left with a puzzled face, thinking whether it was ok or bad. Profs were mostly helpful, but they cross interrogated a bit, asked about research interest also.

Finally, a long day ended. Had dinner at Gurunath, a food court where u could get burger, juice, bread omlete, even fuchka, n came back to the Saravati hostel. This time I found a bunch of deer and they stayed calmly by the side of the lane, while I walked past them. There were three green colored iron beds in the room without any mattress. Whatever it was, I took a shower and lied down on one of them.

Btw, let me tell you, the day was a success. 🙂

Journey continued unexpectedly … IITKGP

Now, I had no clue about this and I am sure many people do not know about such opportunity. So it’s for those who want to go for MS/PhD at IIT KGP.

As soon as I was back to Mumbai, I got a call from my friend and learned that there were something called Temporary Assignments in IIT KGP.
Let me tell you, in IITKGP the scenario is you can not apply for MS/PhD program until and unless you are a project staff (it is called project scholar perhaps) there. So you have to get a temporary assignment and become a project staff to become eligible to apply.
So, with this rank and with no hope I desperately ran for the temporary assignment. The test was on the very next day and eventually emptied my pocket. You know what I mean, I had to fly.

It’s 20th April, Friday and I somehow managed to reach there by 9am. Spent so much money but could not rest in my bad for a while 😦
But it was good that there were a plenty of trains available from Howrah to Kharagpur. I missed Dhouli, there was Jan Shatabdi, then Ishpat … and express takes you much faster than local or passenger trains. I got Jan Shatabdi Exp. and reached there with in 2.5hrs and took a rikhshaw to “Takhyashila”, the building where SIT (School of Information Technology) department was.

About the exam, it was easy. It had multiple choice as well as descriptive question.
Multiple choice questions covered the whole GATE syllabus. There was questions from cache, TCP, paging, indexing, programming, algo.
Descriptive questions were from Data Structure and Programming only, structure, linked list, tree. So, it went well.

Now it was time for lunch, in that BIG campus it was not difficult to find a place to eat, and mostly those were cheap. I could not find a canteen to get the pleasure of unlimited rice n dal in a thali of Rs. 20, as I experienced in my last time visit. But I found Veggies which was also good.

After lunch the results were declared at 2pm and it was time for interview. I went first. I realized that they went through my CV seriously and asked few project and algo related questions. All over, it also went well.

Came back to home and next morning got ready for tatkal booking of another journey.

A Journey

Hi everyone. This is the first time I am trying to write a blog, a Big-LOG from the server inside my head. 😀

This time I choose to write because, may be, I have a lot of things to say, but very few people to hear. So why not say it to the world. I may get some audience. 🙂

Now you must be wondering what the topic is. This is about my journey towards doing my Masters. It’s been almost two years I am working with an IT organization and finally planned to move on for higher studies which was actually my initial planning after B.Tech.

Firstly, I did really bad in GATE 2012 and ended up with a rank of 1025. AIR 1025, that too in 2012 where people who ranked 70, was doubtful to get IITB. But somehow I got few interview calls, God’s grace.

It started with IISC Computational Science M. Tech. This was the one and only call for M. Tech I received. I was at Mumbai, my base branch. Thank to God that there were bus services available from Mumbai to Bangalore, I did not have to fight for railway tickets and I could manage a place to stay. Unfortunately IISC does not arrange for any accommodation.

16th April,It was supposed to be a written test followed by an interview. My test was in 2nd half and I found 1st half test had started so late that our test got delayed by few minutes. “No problem, stay calm and give it a try”, I said. Well, as was expected, it was full with +2 mathematics and that became enough to kill me. The question paper was like,

1. Lim (x->inf) integration (0 to inf)1/(1+(x/a)^n) dx

2. coefficient of the term with out x (sqrt(3x)+/(2.x^2))^10

3. n*n matrices AB, eigen values lambda, eigen value of lambda*BA?

4. F(x) = integration (0 to x) (x-t)f(t)dt. F'(x)?

5. |z-1|=5*|z-i| represents an equation of circle?ellipse?

6. No of functions from a set of cardinality m to n. mn

7. System of linear eqn, no of roots?

8. logx base 2 = |x|. No of solutions?

9. log base 2(log base 3(log base 4 x))) = 2. x?

10. Probability f having only one odd number.dice rolled 5times.

11. hexagon n square of same perimetre. ratio of area?

12. Square of area 6, rotated along its diagoanal. area covered by rotation?

13. [ -sin(alpha) -cos(alpha)]

    [ -cos(alpha) sin(alpha) ], mutiplied to a vector.then, rotation about orgin?

 translation?reflection?

14. simple array ques

15. Harmonic Oscillation, eqn given, phase lag between phi and d(phi)/dt?

There was 30 questions for 45 mins which seemed to go very fast.

Finally, the result came out at 5pm on SERC website and I was not selected. Booked a bus for next morning and back to Mumbai.

Hey, are you thinking this is the end of the story, no dear it has just started.