Saturday, March 25, 2006

Microsoft On-site Interview 03/15/06


My first MS on-site interview .. it was a great experience! Hopefully this post will help all of you prepare for MS or for that matter any other interview.

Preparation : First a little bit about how I prepared for the interview. This is no way close to complete ...

There's always Google ! I found so many microsoft questions online ! So many good websites talking day and night about technical, logical and HR questions and their expected answers. Here are a few websites that I found useful :

http://www.sellsbrothers.com/fun/msiview
http://www.techinterviews.com/?p=115
http://geekswithblogs.net/jolson/archive/2005/01/21/20636.aspx
http://blogs.msdn.com/jobsblog/archive/2004/03/24/95265.aspx
http://www.glaak.com/interviews/ ---> Very Very Useful
http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=17697
http://www.techinterview.org/
---> Very Very Useful for logical questions

If you search online, you will find many such sites and believe me, just to read all that stuff online, you need at least 2 to 3 days !! There are a few videos available online as well which describe the MS interview process. They are here :

What is it like to interview at Microsoft : http://channel9.msdn.com/ShowPost.aspx?PostID=18608
Shuttle Experience : http://channel9.msdn.com/ShowPost.aspx?PostID=18718
Whiteboard Question Example : http://channel9.msdn.com/ShowPost.aspx?PostID=19171

Go get yourself a copy of the book "Programming Interviews Exposed" ! One of the very rare books which explains the logic and thinking involved behind the correct solution. Starting from obvious (and maybe wrong) solutions to correct and hard solutions - it gives all ... there are a few mistakes in the book but use the book to develop your logic & thinking process !

Interview :

All the above sites had specifically mentioned that you dont have to wear a coat / tie for the interview if you are not comfortable wearing it. So I decided to be in simple formals without tie / coat. The interview was scheduled to start at 9.00 I reached a little early at around 8.30 at building 30. I was to be interviewed by Live Communications Server group for a Software Development Engineer in Test (SDET) position.

1. My first interview was HR with the recruiting coordinator. She first of all told me about the heirarchy of peple in the group and also gave me names of first three interviewers. She then gave me a few tips such as always ask questions, just be yourself, understand and reiterate the question, state your assumptions clearly etc. Then she asked me a few non-technical questions such as "why Microsoft ?" , "where do you see yourself in 5 - 10 years" and other normal questions. This started at about 9.15 and ended by around 10 or so.

2. My first technical interview was with the SDET Lead (directly under whom I would work if selected). He took me to his room and asked me a few startup questions like which language are you most familiar with ( C/ C++ / JAVA ), tell me a little bit about your previous job and responsibilities .. then he gave me my first whiteboard question "Write a non-recursive function to reverse a singly linked list in place" .. I had done this so many times before but doing it on whiteboard is still different !! I asked him a number of questions such as what should it return ? what if null linked list is passed etc ... then explained to him the algorithm ... wrote the code after that ... he seemed happy. Then he asked me to delete a node from a singly linked list when only the pointer to that node is given. A few more questions on the similar lines and then I was given a chance to ask any questions if any. Its always best to ask questions so I asked him about the job resposibilities and work environment etc ..

3. My next technical interview was with SDE lead (this was a special request by the SDET lead, normally SDET interviewees are not interviewed by SDE leads but oh well !!). He started with some general questions regarding binary trees and their properties. Later he gave me an inverted binary tree (two children pointing to their parent node). Numbered the children in a specific order and asked me to find a relation between the numbered nodes. Then he asked me to write a function on whiteboard to place all the nodes of this binary tree in an array (of nodes) given the depth d. (as depth d is known, the number of nodes will be 2^d - 1 so array can be used). I wrote that and then I had to come up with cases to test it e.g. what if d is negative .. what if d is more than 32 .. 2 ^32 wont be integer anymore ! etc ) HE seemed to be happy with those cases ... then he changed the problem from inverted 'binary' tree to inverted 'n'ary tree and asked me what changes will the code have & so on.. After this excercise, he asked me to write a function to find the intersection of two linked lists. I was very close and had almost solved it ... but then I needed a hint from him to get to the final solution ... he seemed ok with that ...

4. It was about 12 O'clock and it was time for lunch interview with another SDET Lead. He took me out to a chinese buffet ... While driving asked me a number of technical and non-technical questions such as swap 2 integers without using temporary buffer, what problems are there with this solution, previous job etc ... During lunch, he asked me to write a function to find the second maximum in a given array on the tissue paper ! I wrote that and tested it with different examples ... wrote test cases ... then he asked me to write a function to find if the given string is a substring of other string - return true/ false. Again writing test cases and testing it with few examples was necessary. This interview was probably the longest as it was about 1.30 pm when we came back to MS campus.

He told me that my next interview is at 3 O clock and someone will meet me at the lobby. This is normally a good sign. Unlike other places, MS interviewers communicate with each other during the interview process and if the first 3 interviews are not good, candidate is sent back home right then. So when I was told that I have more interviews, that gave me a huge confidence boost.

5. At 3 O'clock, Test Manager (higher up the heirarchy from SDET lead) took my interview. He kind of shocked me with his first question. What is the difference between packet switching and circuit switching ? I answered that and I think I did good as he gave me a hypothetical scenario ... consider an airplane. I am not concerned about its communication with outside world. For what kind of communications inside the plane, will you use packet switching and for which situations, will you use circuit switching ? .... there was no correct answer ... all I had to do was justify whatever I say being consistent with the previous answer. Then he asked me a number of questions about software development life cycle and gave me a number of 'if ... then ?" sort of questions ... finally he gave me a whiteboard question ... 'a new database backup system over a network' .. test it .. I must say this was a very abstract interview as there was no code to be written .. no right/ wrong answers .. but I enjoyed it !

6. The final interview was with the Program Manager who had been working in MS for last 12 years ! He initially asked a number of questions based on previous job and why MS etc .. then gave me another whiteboard question "given a fixed length stream (wrap around possible) of characters, implement a puchar and getchar function" ... queue data structure, head and tail maintenance was what he was looking for .. I did that and he asked me for an alternate solution which I could provide after thinking for about couple of minutes ... then he asked me if there was any project / any particular thing I was proud of and such HR type questions ...

Finally at about 5 - 5.15 pm, the interviews were over and I was told that MS will contact me tomorrow (normally they take a week or so but I explained to them my special situation so ...). Once you give an interview, you also kinda feel how the interview was ... you kinda know what the outcome would be ... I felt pretty positive at the end of the day !! It was a long long day and I was tired !!! Next day MS offered me the SDET position which I was more than happy to acept :) !

Labels: , ,

Sunday, March 19, 2006

Everything happens for the best ?


When was the last time you felt weak ? when was the last time you realized that you can never have full control over your life ? .. of course we all know it but if things work out the way you wanted them to - for a long period of time - then you start feeling, hey I decide the rules ! I have control over my life !! You start planning your future and then suddenly it hits you !! when you are completely unaware & unprepared ... its like someone out there wants to remind you, you are in the Matrix !! and you play by someone else's predecided rules !! You try to look back and redo all your calculations thinking that there must have been a mistake somewhere ... you must have done something wrong somewhere .. you try to debug the problem but after a long research you realize that ... there is no bug !! (there is no spoon !! remember ?) .. this is the expected behaviour !! what am I trying to debug ?

Why am I saying all this ? coz that realization happened to me just a few weeks back !! and I am glad it happened (of course ! now that its over ! duhh !!) Heres how ..

This new year 2006 had been going pretty well for me ... The job life had been good .. I was getting more and more responsibilities, the start-up I was working for, had been doing well or at least it looked like so .. I was getting more projects and was busier than before ! I had just been to India in Deewali 2005 and spent about a month ! Austin had been treating me well & I liked austin ! So all in all .. I was pretty happy, no issues whatsoever ...

I moved to a new apartment - bigger (and of course much higher rent !), better and close to my workplace on March 1st & signed a 12 month lease ... I threw away my old sofa & bed (they were in a very bad shape anyway !) and was ready to spend some money on buying a new sofa, bed and other furniture .. that day, I came back home a little early from office for unpacking and getting the new house in shape ... around 7 pm, my colleague called up and he is like 'Dude, you might want to come back to office" and I am like "why?" .."The company is closed down !!" ...I must say the first time it was damn funny but after a while when I found out that he was serious .. it hit me ! hit me hard !!!

What does this mean now ? what the hell went wrong there ? I am out of job ? i am out of job ? whats gonna happen next ? am I even allowed to stay here in US ?.. how many days ? what abt my visa ? what abt the money, the paychecks ? again, why the hell did the company close down ? why is this so sudden ? no notice no intimation no nothing ?what am I gonna say to my parents ? questions, questions and questions !! it filled my mind ... 'I am ok .. I can do this .. I can survive !!' I told myself but then looking back, the seven stages of grief were inevitable ... acceptance, anger, denial, depression, fear, guilt and shock. Exactly in that order !! It took me some time before I could get back in my senses and started thinking straight.

There it was .. the worst day of my life or so it seemed ! I was in US .. all alone .. with no job & a grace period of 10 days to find a new job before my H1 visa becomes invalid ! great !! 10 days .. is that some kind of a joke ? I didnt know what to do ... what I needed was a plan !! right !! a plan !!
Next day it became all clear ... we all spoke to a lawyer and here is what I had to do : I had to get a job or at least apply for an H1 visa transfer within next 15 - 20 days !

Next few days were so bad !! no time to sleep, no time to eat ... all the time just applying to any and every job online on dice, monster, yahoo hotjobs and company websites, forwarding resumes to my friends, calling up as many people as I could ... I mean it was just crazy ... But I must say things were not looking that bad ! I had a couple of phone interviews with Qpass, a couple with Amazon, one with Microsoft, Silicon Labs , freescale, Marvell and a few others within a span of hardly 7 - 10 days .. ! A few of them thru' contacts and (believe it or not !)a few by applying on company websites !!

so in all, things were moving .. but then so was time !! Microsoft on-site interview was scheduled for Wednesday March 15. That day was another great experience (check this out !) .. after a whole day's tiring interview, next day Microsoft called me up and gave me an offer !! My dream company was offering me a job !! How could I say no ?

So here I am ! A to be Microsoft-employee !! Truly believing that "Everything happens for the best !!" ... I could not have imagined a better end to this whole thing !! Looking back, I realized that I was at a curve 15 days back ... I could not see whats beyond and things looked pretty shaky at that time ...So does that mean I can see everything clearly now ? of course not !! .. so what has changed ? well, now I know that there will be more curves to come and I will be prepared for each of them ... I might skid on a few, I might hit a few obstacles on the way but journey wont stop ... its only just begun !! and I am going to enjoy every moment of it !!!

Labels: ,