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.
Monday, October 26, 2009
Interview story from salary.com
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
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;
}
}
///
/// Reverses the list so that the last node becomes the first
/// node in the list.
///
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
{
// Constructor
public LinkedListNode()
{
}
private int _value;
private LinkedListNode _next;
///
/// Value of the node.
///
public int Value
{
get
{
return _value;
}
set
{
_value = value;
}
}
///
/// Pointer to the next node.
///
public LinkedListNode Next
{
get
{
return _next;
}
set
{
_next = value;
}
}
}
}