Sunday, February 14, 2010

Microsoft Interview (February 5, 2010)

On February 5, 2010 I interviewed with Microsoft (Bing specifically) for a SDET position. I wanted to share my interview experience with those who have asked me to let them know how the interview went and with all those who come across my blog (perhaps, in preparation for an interview with Microsoft as well :) ).

After having a technical phone interview (technical screening) with a SDET in Bing, I was notified that Microsoft would like to interview me in person in Seattle (all expenses paid, of course). The airfare, hotel, and a rental car were all arranged by Microsoft. There was a bit of confusion about the fact that I was not a local candidate -- somehow the system did not indicate that I lived outside of the Seattle area, so I had to follow up about the travel arrangements :). Otherwise, the preliminaries were straightforward.

I arrived in Seattle on February 4th, picked up the rental car and checked into the hotel. Outside of lunch, dinner, and a quick stop by the grocery store to buy some water for the stay, I did not plan anything else. I was able to get about 7.5-8 hours of sleep that night.

My interview started at 10:30am on Friday. I arrived at about 10:20am and parked across the street from Bellevue City Center (that's the 25-story Microsoft building in downtown Bellevue). I let the receptionist know that I have arrived and she informed me that the recruiter would see me shortly. The recruiter came a few minutes later and took me to a conference room. She did an excellent job of explaining the interview process to me and did all she could to make me comfortable. She asked me some questions about my current job, my responsibilities, etc. The question of salary expectations also came up. She then gave me a sheet that included the interview schedule and explained to me that if the team feels good about me as a candidate, more interviews might be added after the initial three. The first interview was with an experienced SDET, the second and third were with lead SDETs.

The first interview was interesting. After a few quick questions, I was tasked with testing a function that returned a random number. This was quite interesting: input, range, distribution testing, etc. I also mentioned other types of testing that should be done: concurrency, performance, etc. That probably took about 20-25 minutes. Afterwards, I was asked to write code to traverse a matrix in a zig-zagged manner as shown in the image below.


It took me a few minutes to figure out the algorithm by thinking out loud and asking questions of the interviewer. The algorithm turned out be very straighforward, so I started coding. Overall, this went well although there were several times I had to make changes based on the interviewer's hints and observations.

My next interview was over lunch. We went to El Gaucho, which is an upscale restaurant on the first floor of Bellevue City Center. After some casual talk and placing the order, we got down to business. I was asked how I would go about testing a card-reading system (such as one used by Microsoft employees to get into buildings). This was quite interesting. We covered a lot of testing scenarios (invalid input, valid input, power failure, interference, distance, velocity, direction, external conditions, scalability, performance, concurrency, etc.) and I'm sure there are lots more cases that we did not cover. This really probed my testing mindset and it revealed instances were I was not approaching testing methodically. Overall, this was a great learning experience.

The lunch interview actually went thirty minutes longer than planned so there was a little bit of schedule readjustment. The next (third) interview was changed to last 30 minutes and, at that point I was informed that I would have an interview afterwards as well with the manager. The third interview was the least enjoyable. The interviewer came across as somewhat condescending and impatient -- I have to presume that this was intentional to see how I would do under those conditions. The interviewer asked me about my experience and noted that I had some senior experience (including an architect position with my previous employer). Some of the comments almost seemed to indicate that the interviewer did not believe that the experience was credible... Afterwards, I was asked what data/metadata would be useful in making multimedia search results more relevant/useful to the users of Bing. This was interesting although it also revealed how little I knew about this area of Bing (in fact, I was not familiar with Bing's multimedia search feature at all). After this, the interviewer asked me to traverse a binary tree in a breadth-first fashion. I got stumped on this one. I started talking about the drawbacks of the breadth-first traversal and that depth-first is better in terms of memory utilization. I had a mental block actually figuring out the algorithm for breadth-first traversal -- not that the algorithm was hard (hint: using queue for breadth-first as opposed to a stack for depth-first traversal) but it was one of those moments that I just wasn't making the connection :(. Anyway, I didn't do well on this interview...

My final interview was with the manager. I was not asked any technical questions although there were a lot of questions about the SDLC, estimating, my strengths, weaknesses, what I like to do, etc. By this time, I had been interviewing for at least 5 hours and was getting quite tired. Of course, this is the point where I had to be at my best since the manager is the primary decision maker in whether to offer me the job or not. In retrospect, I wish I had thought through some of these questions better instead of having to come up with answers on the spot after my brain had been grilled for several hours... I would say this interview went so-so. It was close to 4pm by the time I was finished and headed back to the hotel. My final thoughts as I was headed toward the car were: "Is this job worth the exhaustion I'm experiencing now?". In retrospect, I believe it was a great experience and definitely worth the exhaustion... I'm actually still waiting to hear back from the recruiter whether Microsoft would offer me the job or not.

Monday, October 26, 2009

Interview story from salary.com

This is hilarious!

An applicant forgot he was chewing gum about halfway through the interview. He took the gum out of his mouth and attempted to hand it to me or the other manager while apologizing for forgetting and asking us if we wanted to take the gum from him until the end.


Wednesday, September 9, 2009

I got a great job offer...

I received this email today. Enjoy :)



Subject: Associate Manager USA

Hello competitor,

We are glad to report you that in our stable company, the vacancy of transaction manager is opened. The world is smashed by a crisis, people lose their workplaces, and many companies are being closed. Our company offers a product in the field of services; therefore the demand on our suggestions remains even in so difficult period for the world economy.

The followings factors are required from you:

- industriousness;

- efficiency;

- to be the habitant of the USA;

- command aspiring to success;

- to have sure vital position;

- to have initial PC skills

- you must be more senior than 21.


NO INVESTMENTS FROM YOU ARE REQUIRED, you will be fully acquainted and trained for discharging of your duties. We need valuable staff. We will teach even a janitor to be a businessman!

Do not lose the chance of fully legal earnings with a dynamically developing company. We will help you to build a career which you always dreamed about. Your chance is waiting for you.


We wait for your resumes to the address [obscured]@gmail.com of our department of personnel.



With kind regards,

-----------------------------------------


I have to say it's quite hilarious with perhaps "We will teach even a janitor to be a businessman" sentence being the only reasonably worded one. I especially like "The world is smashed by a crisis, people lose their workplaces, and many companies are being closed..."

Automated translation still has a long way to go :)

Tuesday, September 1, 2009

WCF Performance (continued)



This evening I was trying to determine if compression options in IIS had any significant effect on WCF performance. In my four tests, there were two variables: message size and compression on/off setting. For message size, I used 1 byte and 4KB settings. The binding configuration for all endpoints consisted of unsecured communication (security mode="None" and encryption and signing turned off). The response consisted of randomly generated bytes. Compression was detrimental to performance for larger messages (I attribute this to the randomness aspect) and seems to not have any adverse effect on small messages (I was a bit surpised about the latter). Perhaps, for a more realistic test, tomorrow I will try a sample XML message instead of random bytes.

Monday, August 31, 2009

WCF TCP, HTTP, and Named Pipes Performance Comparison


I wanted to see for myself performance of wsHttp, netTcp, and netNamedPipes end point configurations. I put together a quick test application. The test consisted of a warm-up (10 calls to each end point), followed by 5000 calls (with channel being opened and closed on each call). The first test used default binding configuration for each end point while the second test consisted of unsecured calls (security mode set to "None" and encryption and signing disabled). The results are not phenomenal -- although I was a bit surprised that wsHttp binding performed almost as well as netTcp and netNamedPipes when the security stack was removed from the communication channel. Also, in unsecured mode, named pipes communication was noticeably faster than tcp.

Sunday, August 17, 2008

Microsoft Technical Phone Interview 8/14/2008

1/12/2009 Update: Theron Welch (Software Mentor at Microsoft) offered his thoughts regarding this post here.

On 08/14/2008 I had a technical phone interview with Microsoft Dynamics. It was perhaps my worst interview experience :(... To facilitate the interview process, a LiveMeeting meeting was set up as well.

The interview was scheduled to begin at 6pm CST and last an hour. At about 5:15pm, I powered my notebook to make sure that I wouldn't have any Windows updates asking me to restart the computer during the interview (after all, I had not checked for updates the day prior and it was the week of Patch Tuesday). Sure enough, as soon as Windows started, updates were automatically installing and 15 minutes later I was rebooting. By 5:35pm, I launched LiveMeeting and shortly thereafter I was online and ready.

I received the phone call just a minute or two after the scheduled start time. I'm not sure whether the proper etiquette allows me to reveal the name of my interviewer or not, so I will withhold the name. The interviewer had a pleasant demeanor although I had difficulty understanding him because of a somewhat strong Asian accent (I would guess Indian). [This is probably a good thing because that would prepare one for working at such diverse workplace as Microsoft :) ]. This was further aggravated by phone interference that was mostly resolved after the interviewer called me back. Initially, I had a bluetooth headset so that both of my hands would be uninhibited but with poor quality of phone reception I switched to my handset to remedy that. So, I ended up spending most of the interview holding my handset using my right shoulder as I needed both of my hands to type.

After exchanging greetings, the interviewer asked me some questions about what I had been working on lately and the types of applications that I was working with. After that, he asked me to write some code. I opened Notepad and shared it via LiveMeeting. I was asked which programming language I preferred, to which I emphatically replied, "C#". The interviewer asked me if I could write C++, which I declined since I had not written any C++ code in more than 7 years (since college). I was then asked to write a function to reverse a singly-linked list.

By this point, I was already somewhat unsettled as I was not mentally prepared to write code using Notepad while someone else was watching and potentially scrutinizing my every key stroke. I started writing the function by assuming that there is a LinkedList and a LinkedListNode definition. I verbalized my assumption and was asked to write the class definition. I created the two definitions and then said that I probably did not need a definition for LinkedList since having a reference to the first node was sufficient to work with a linked list. The interviewer asked why I would want a LinkedList defined, to which I replied that LinkedList would contain helper methods (I also alluded to the fact that the generic linked list implementation in .NET 2.0 had a class definition for LinkedList). What I didn't say was that the "Reverse" function should probably be encapsulated within the LinkedList class.

Then, I moved on to implementing the function. By this point, I was quite unsettled... I have never written code to reverse a linked list but I didn't think it would be challenging. As I got to my implementing my loop, I began to panic... Questions like "Is it as easy as I think it is or is there a catch?", "Do I need an inner loop?" and "Do I need only two variables or three?" went through my mind. I was verbalizing some of my thoughts processes, which made me even more unsettled because I knew that everything I said could count against me. I spent more than 30 minutes (I didn't time it but I think it might have been close to 45-50) working on the function. By 6:50pm, I knew I wouldn't finish because I still had to step through my code to make sure that it was working correctly (and that takes longer than using VS debugger!). Roughly at 7:10, the interview ended. The interviewer said the recruiter would follow up with me.

I was distraught... I couldn't solve a fairly straightforward problem! I wouldn't be surprised if I end up on Microsoft's "cannot-solve-a-simple-problem" list :).

I had dinner while still working on the problem mentally. After relaxing a little bit, I went back to the problem. I decided to implement the same algorithm as I was working on during the interview. I spent about 5-10 minutes drawing the solution on paper before writing any code (which I should have done during the interview but I felt really awkward doing it since the interviewer couldn't see me drawing -- I felt compelled to type something to let the interviewer know that I haven't given up). I also opened Visual Studio so that I could actually run and step through the code. In about 20-30 minutes I had the program finished and tested using a simple console application.

I thought I'd post my code here (please feel free to comment on it):

class Program
{
static void Main(string[] args)
{
// create a test list
LinkedList list = new LinkedList();
for (int i = 1; i <= 10; i++)
{
LinkedListNode node = new LinkedListNode();
node.Value = i;
list.AppendLast(node);
}
// print list before reversal
LinkedListNode currentNode;
Console.WriteLine("List before reversal:");
currentNode = list.First;

while (currentNode != null)
{
Console.WriteLine(currentNode.Value);
currentNode = currentNode.Next;
}

Console.WriteLine();
list.Reverse();

// print list after reversal
Console.WriteLine("List after reversal:");
currentNode = list.First;

while (currentNode != null)
{
Console.WriteLine(currentNode.Value);
currentNode = currentNode.Next;
}

Console.WriteLine("Press ENTER to end program");
Console.ReadLine();
}

public class LinkedList
{
public LinkedList()
{
}

private LinkedListNode _firstNode;

/// <summary>
/// Gets the first node in the list.
/// </summary>
public LinkedListNode First
{
get
{
return _firstNode;
}
}

/// <summary>
/// Appends the node at the beginning of the list.
/// </summary>
/// <param name="node">The node to append.</param>
public void AppendFirst(LinkedListNode node)
{
if (_firstNode == null)
_firstNode = node;
else
{
node.Next = _firstNode;
_firstNode = node;
}
}

/// <summary>
/// Appends the node at the end of the list.
/// </summary>
/// <param name="node">The node to append.</param>
public void AppendLast(LinkedListNode node)
{
// if the list is empty, set the first node
// and do nothing
if (_firstNode == null)
_firstNode = node;
else
{
LinkedListNode currentNode = _firstNode;

// get to the last node
while (currentNode.Next != null)
currentNode = currentNode.Next;

// currentNode is now referencing the last node
currentNode.Next = node;
}
}

/// <summary>
/// Reverses the list so that the last node becomes the first
/// node in the list.
/// </summary>
public void Reverse()
{
LinkedListNode currentNode = _firstNode, tempNode = null, firstNode = null;

// traverse and reverse
while (currentNode != null)
{
tempNode = currentNode.Next;
currentNode.Next = firstNode;
firstNode = currentNode;
currentNode = tempNode;
}

// set the first node
_firstNode = firstNode;
}
}

public class LinkedListNode
{
public LinkedListNode()
{
}

private int _value;
private LinkedListNode _next;


public int Value
{
get
{
return _value;
}
set
{
_value = value;
}
}

public LinkedListNode Next
{
get
{
return _next;
}
set
{
_next = value;
}
}
}
}