(If the thought of reading more than 4,500 words makes you hyperventilate, please go instead to my summary)

Please also read my Clarification on Why Study for an Interview

Like this? Please check out my latest book, Writing High-Performance .NET Code.

My Microsoft Background

Before I go into the specifics of the interview experience, I want to explain my background with Microsoft.

When I was just starting college, I got into an online community called DevHood. It was a student-focused .Net community where you could share tutorials, tips, code, and ask questions. Loosely associated with this were monthly .Net user group meetings on campus. My friend Ammon was the Microsoft student ambassador leading these meetings. By the time I’d graduated I was one of the leaders on DevHood (I’ve since dropped a few places–the site is now mostly inactive), and a strong desire to some day work for Microsoft was born. That desire has been occasionally reinforced by various MS events that I’ve been to, people I’ve spoken to, and blogs I’ve read.

Around the time I graduated I made it into an “interview” situation with Microsoft in the career center. I failed miserably. It was the first-ever interview I’d ever done with anybody, I didn’t prepare (at all), I was nervous (to the point of becoming very hot and sweating), and for some reason I thought I wanted to be a PM. Yeah….they never called me back. But it was a learning experience.

My freshman year in college is also the year I moved from using Borland C++ to using Visual C++ 6. I was also an early adopter of .Net and have generally been a fan of Microsoft. (You could maybe call me a fanboy, but I don’t think I’m completely one-sided. I consider myself pragmatic. Apple is just as good in many things as Microsoft, but I am really annoyed at the press it gets and the Apple fanboys. I think the biggest differences in OS X and Windows for most non-technical end-users are aesthetic.-Ed: please see clarifying comments below)

The effect of Google

I interviewed with Google last year, a process which I documented. Thank goodness–that experience really prepared me for this, though there were some big differences. For one, I don’t think I wanted the Google job. It was fun, nice to do, gave me a good experience, but in he end I wasn’t that disappointed. Microsoft was different. I wanted it and I prepared accordingly.

A month of e-mails and phone calls

It’s been a few months since this process started, so some of the details of timing or exact discussions may be off, but the overall story is correct.

A few months ago, I was contacted by a staffing firm that works directly with Microsoft to fill positions in various teams. I quickly responded, expressing my interest. The staffing agent who initially contacted me referred me to her boss, who was an extremely nice lady who works out of her home. She did initial questions like what kinds of things I’m interested in, can I relocate, etc. Mostly, she told me about the team that she is looking for: Live Search. She also acted as the buffer between me and Microsoft. She referred me to a Microsoft staffing person who also worked specifically with the Live Search group.

The Microsoft staffer talked to me first on the phone, about my projects, goals, Microsoft, the Live Search team, and how interested I was. He then setup a phone screen with the development lead of the team I was interviewing for, which was to take place about a week later. This phone call was postponed because of a meeting at Microsoft, and I actually did it a few days later than planned. No big deal for me, though it was a little hectic because family was visiting and I didn’t want to discuss my interviewing with them at this point.

Phone Screen

I prepared for the phone screen by writing questions for the interviewer, preparing standard HR-type questions and answers, and figuring out what I wanted to say about myself (overall), my interests, projects, current job, why I want to leave, why I want to work for Microsoft, and anything else I could think of. I also researched the team a little (I didn’t know which specific team it would be at this point, so this was mostly learning the major components of the Live Search group). I did not practice writing much code at this point.

The actual phone screen was easier than I thought, up to the end. We started with a little chit-chat, then he asked me about my current projects at GeoEye. He did go into technical details, but not too much. He asked me about my opinion on testing and other software engineering practices. I discussed unit testing and the efforts I had made to impose best practices in my current team. I was pretty emphatic in my description of software engineering practices, since I had seen such dramatic benefits in my work. We had a pretty good discussion about this sort of stuff and I felt like I was being taken seriously because of my experience. We also talked about working in teams.

After 30 minutes or so, he asked, almost apologetically, if I had time to do a coding exercise. Of course, I said yes. Oops. I didn’t do so well. With him on the phone, I e-mailed him my code at regular intervals. I took about an hour to hack out a recursive solution to a problem which I had actually never solved before. I think I panicked and not having immediate feedback I went down the wrong path for a while. I also should have thought of the design of the problem in terms of data structures, rather than just think of a vague code solution and go for it. I learned a lot from this exercise.

Even with that, he said, “I’m going to recommend you come in for an in-person interview. The coding was a little weak, to be honest, but I think you have great potential.”

He also specifically recommended reading Programming Pearls by Jon Bentley. This book was on my to-read list, so I gave it priority and ordered it, along with Programming Interviews Exposed: Secrets to Landing Your Next Job .

Preparation

My preparation for this interview was intense. I went through as many problems as I could think of. With Programming Interviews Exposed, I read 2-3 chapters at a time, making sure I understood each problem and the answers thoroughly. Then I went back and solved each problem on paper, without cheating and looking at the answers. Most problems I could have done without reading the chapter beforehand, but a few were new to me so the book helped a lot. It also helped show how many problems can be solved with creative application of basic CS principles. It also has good advice for handling salary negotiation and other non-technical aspects of the process.

Programming Pearls was even more helpful for formulating a mental framework for solving problems. I cannot recommend it enough. The material is much more deep than Programming Interviews Exposed and it will force you to think a lot more. I read the entire book and did as many problems in each chapter as I could. Most of them are thinking questions and not necessarily coding questions.

I also found and downloaded every list of programming questions I could find:

I did problems almost every night until I started to feel burned out. I solved every problem on those lists, other than some of the database/hardware/irrelevant questions. Whatever you do, don’t give in to temptation to look at the answers until you’re hurting with the effort of solving them. Memorizing the answers isn’t enough–you really do need to understand them, whether you figure it out yourself or look them up.

On the plane trip out, I reread Programming Pearls and did the problems again, making sure I understood nuances that I hadn’t noticed the first time around.

The Trip

About a week after my phone screen, I was contacted by a travel specialist who organized my trip. I was asked to provide some basic information, such as 5 dates when I could interview. I was nervous about this since I didn’t really want to ask for more days off from work, but I just went ahead and hoped it worked out. Once the date was established (nearly 3 weeks in the future), I was sent some documents on Microsoft’s online careers site. Logging in with my Live ID account, I filled out forms specifying my travel preferences, chose travel dates and times (I picked early the morning before, a Sunday, and to leave the morning after the interview). I also chose a rental car since I didn’t want to rely on a taxi. Microsoft makes all of the arrangements for you once you fill out this form.

On July 27, my wife took me to the airport for the direct flight to Seattle. It was a 5-hour trip, during which I re-read the entire Programming Pearls book. I had an aisle seat. At Seattle, I picked up the rental car from Avis–an SUVish Ford. Redmond is about a 30 minute trip up the highway and thankfully it was easy to get there. I had printed directions before I left home. I did drive right by the hotel without realizing it, and had to circle around–they’re a little back from the road, and the single sign was facing the opposite direction.

After I checked in, I went out almost immediately to find Microsoft. It was right across the street. I needed to find building 19, which is about a 5 minute trip. I then went to Azteca, a Mexican restaurant near the hotel. It was good food–too much, but very good. Microsoft pays for your food–keep your receipts. When I checked into the hotel, they told me that I could get any food from the little shop or order in and Microsoft will pay for it. I didn’t make as much use of it as I could have. I didn’t want to binge on junk on the theory that a healthy body is a healthy mind.

After eating lunch, I went back to the hotel to study for the rest of the afternoon. I went through the rest of the list of problems I had printed out. I was so exhausted by the evening, being 3 hours behind my home time zone. I had some chips and juice for dinner, and went to bed at 8. I knew it was early, but I thought I could sleep for 12 hours. Nope. I woke up at 3:30 am the next morning. Oops.

I got up, read a bit, exercised until I was bored, took a long, long shower, ate a big breakfast, and reviewed a few other coding questions. At 9:15 I gave up and left the room. My appointment was with the staffing representative at 10:00. I was there at 9:20. One thing I noticed–lots and lots of diversity. People from all over the world walking around. I reviewed a few things some more and went into building 19 at 9:40.

I got my name badge at reception and then sat down, eventually moving over to the Microsoft Surface that they had set up. The Surface is an awesome piece of machinery. There are a number of demo apps which are a ton of fun to play with. There were games, a piano, and some graphical visualizations that all interacted with multiple fingers at a time. They also have a number of PCs and an X-Box 360, which had a couple of people playing Rock Band on it.

A little after 10, my representative came out to meet me. He said he only had 30 minutes to talk, but I think we talked for almost an hour. We discussed fairly typical HR-type things. He went over some numbers related to Microsoft, then leadership of the teams from Live Search on down to the team I would be interviewing for. He discussed benefits, and then explained the day’s events. He gave me a piece of paper with an interview schedule that went through the 2-3pm slot. He said, “I can’t tell you who comes after this. If you do well, the last interviewer will take you to the next person. If you don’t do so well, they’ll take you back here and we’ll talk about it.” Yikes.

When we were done, he escorted me outside to a waiting Prius, part of their shuttle fleet that anyone can use to go among the various parts of the campus. I was headed to building 88.

The Day of Interviews

This is the part where I’m sure I’m going to disappoint some people because I’m not going to tell you the specific problems they asked me. I don’t think that’s fair, and there wouldn’t be much point anyway. I may tell you a rough description just to give you an idea.

Each interview followed a similar pattern: discuss your work, tell me about [software engineering topic] and your experience with it, now let’s do a coding problem. Sometimes I did a problem quickly and they made the problem more complicated, or gave me a completely separate one. I was not asked riddle-type questions. I was not asked dumb, typical HR-type questions (“What’s your biggest weakness?”).

Between every interview they will talk to each other and they will send e-mails to the other people in the interview loop. Yes, they’re talking about you behind your back. And yes, they will tailor future questions to cover areas missed by previous interviewers, or to follow up on a weakness. Also, not every interviewer is on the team you’re interviewing for. I liked this because it gave me an opportunity to learn more about other groups.

In the first interview, the coding problem was to generate a well-known data set. I first considered how to generate the nth iteration of the dataset, but she quickly steered me to solving iterations 1-n (which is much easier). I went over the algorithm in my head and out loud, before writing any code. Then I wrote the simplest, naive code that I could think of. I immediately saw some inefficiencies and worked to address them. She prodded me slightly to the answer she was looking for (I would have gotten there).

The first interviewer was also my lunch escort. We went to a cafeteria in a nearby building. I got a salad–not trusting my stomach for too much more. The food is not free, but it seems pretty cheap (coming from DC). The drinks are free. I got water. During lunch, I spent most of the time asking her questions about what she does, working at Microsoft, and the Redmond area.

After lunch, she took me back to the lobby to wait for the next interview. I took the opportunity to use the restroom and look at the art (there is original art everywhere). I liked the boat made from junk.

The interview after lunch was with the same person who gave me the phone screen–the dev lead for the team. He asked me if I had looked at the project they work on, and as soon as I said I had, he asked me what I thought they could do better, or features to implement. I was prepared with some intelligent things I noticed (which luckily coincided with some of the things he had first noticed when he joined the team). We talked for a bit about software engineering, testing, and task “chunk” size–i.e., how big of a task am I comfortable accepting at a time. This was an interesting topic which I hadn’t really considered before, but after a little time understanding the question I used my experience to give an honest answer.

He gave me two coding problems. Actually, before that he had asked me if I had ever done a certain problem and I answered that I had. So he gave me another one–a geometry/graphics-related question (not too deep). I had seen the problem before when taking computer graphics in college, and I knew the form of the answer. I just had to write specific code. Then I had to explain as many test cases as I could for the function. That problem didn’t take too long so he gave me another–a function to score a round in a certain game (one that I hadn’t played for a long, long time). He explained the rules, I explained them back as I understood them, and then I verbally sketched an algorithm to solve it. I wrote the naive code, fixed some algorithm mistakes and inefficiencies and I was done. I think I did well on this.

Then he took me to my next interview, which was the dreaded 2-3pm one. The same pattern ensued. This was a maze problem, and though I struggled a little solving it, I had immediately known that depth-first search was the way to tackle it, which was what he was looking for.

And…what happened next? Was I done? Do I get to continue until 5pm or am I done?

He took me to the next interview. 🙂

The next one might possibly have been my favorite. The guy I talked to had a lot of patent cubes, so I asked him about those and what his previous projects were. He then asked me a very interesting conceptual/coding problem about how to design a filter for the Live Search engine. We talked through it, and I came to a decent solution, which I then had to code. Definitely the most interesting problem of the day.

Then on to the next…it’s 5pm now. They’re offering me food, but I’m politely declining because I just don’t eat in high stress situations like this. That might be bad, but it worked for me.

A little bit of talk about software engineering practices, working in a team, etc. Then he gave me an array-summation problem. I was very familiar with this problem and explained that I knew a naive way, but that it wouldn’t work in all cases (i.e., bad input). He asked me to explain the problems, which I did. It was more like a discussion. He then gave me a tree-related problem, which I solved very quickly because I had practiced the exact problem before. Then he made it harder. He gave me a hint which at first confused me, but once I understood what he meant, I grasped the solution.

It’s now 6pm. I was sure I’d be done. There are fewer people in the halls now. The day is over.

He takes me to the next interview.

This is with the boss. The dev lead’s boss. I’m unsure of his exact title, but he was in charge of the team I was interviewing for and one other.

We talked for 45 minutes without a hint of coding. This was a wide-ranging discussion about everything from MS benefits to housing to traffic to the future of the team, the impact of Yahoo, comparison to Google, and culture at Microsoft. I gained a lot of insight and appreciation for what they’re doing. At one point he started talking salaries and benefits, and I got extremely excited and I had to fight to keep a smile off my face (hey, I don’t want to look like a dork too early). I was thinking that they were definitely going to make me an offer. Then he said other things which made me come back to reality. Finally, jokingly, almost reluctantly, he said he may be obligated to give me a coding problem, so let’s do a quick one.

Looking back, this should have been the easiest problem of the day, but I just got off track and missed the (now, painfully-) obvious solution. It was a problem about finding the nearest object in a geographic region. I cringed when he suggested the golden hint to me, and my thought was DUH. Maybe it was too late and I was tired.

Finally, at about 7:30pm I was done. He called the shuttle dispatch and walked me out, where we chatted for a few minutes before I insisted he didn’t have to wait with me.

Aftermath

I drove to the hotel and called my wife. I was elated. I knew I hadn’t been perfect, but I had just gone through a 9.5 hr interview. That couldn’t be bad. I thought for sure I was going to get an offer.

I ordered some Thai food from a delivery service, which I ate starting at 9pm. I watched a little TV, then went to sleep. I woke up at 4am the next morning to head to the airport for an early flight home. It had been a very long day.

The next day I talked to the staffing guy (the one who had started my interview day) about the experience. He was very…confusing? not sure how to describe my interaction with him. He told me that they were very happy with me and I did very well, and yet some of the feedback indicated slightly weaker coding than someone else they were interviewing. He needed to hear back from the team about the other person before a final decision was made.

Needless to say, this was not what I wanted to hear. I was pretty upset about it so my wife and I indulged in a little night out dinner to assuage the disappointment. I was sure I was not going to get the offer.

Two days later, I was at work when I got an e-mail from him. They are going to make me an offer! I quickly left the room (I share it with a co-worker) and called my wife. She was ecstatic. I was ecstatic. I was not expecting it, after the previous conversation. Looking back (and considering other conversations), I wonder if he was trying to gauge my dedication and desire for the job. My other, more cynical, thought was that he was trying to prep me to take a lower salary or not negotiate as hard because I must have “just squeaked by.” Maybe it’s just to make victory all the more sweeter. Most likely he was on the level, but I do wonder… it just seemed odd.

That night when he called, I was feeling pretty miserable because I think I was food poisoned that day–I was feeling horrible–vision was literally shaking–very scary. But I kept it together and we talked benefits, salary, relocation, and the next steps. We did the “what-salary-do-you-want/what-is-your-offer” dance, which I lost of course. Does anyone get an offer without stating their expectations first? In any case, the formal offer was worked out over the next few days. I was on vacation in Utah when I got it (all electronic). It was acceptable and I am now going to be a Microsoft employee in September!

Random Thoughts

I’m going to go work on a team that is a direct competitor to Google, and they are a very significant challenge. Microsoft has a lot to do to catch up to Google, but there is something exhilarating about working for the underdog. Even once the technology is better than Google’s, there is significant mind share that needs to be won. We all have our work cut out for us.

This is completely subjective and I’m biased, but I thought the people I interacted with at Microsoft were nicer than at Google. Maybe it’s because I did better, maybe it was my attitude, or maybe I was lucky with the people I spoke to.

When I drove up to the Microsoft campus the first day, it felt right.

There’s a lot to do in the next month–prepare the move, finish up stuff at work, prepare to buy a house, gear myself up for a difficult, demanding, but rewarding job–it will be a lot of work, but hopefully fun at the same time.

Tips

My tips for the Google interview experience apply here. In addition:

Be enthusiastic. I got the distinct impression that they value this highly. Demonstrate it with your projects, your interests, your conversation, and even your tone of voice. That last is a hard one for me, especially over the phone. I’m enthusiastic, but I definitely have a hard time showing it verbally. Practice, practice, practice. Spend a lot of time practicing with pen and paper. Write out every search algorithm by heart. About half the problems they asked me are in the two books I recommended above. But beware that they’re going to expect you to go beyond those problems. Consider these problems as refreshers in basic computer science, not a primer to help you get the job. Know your computer science. If you don’t understand serious computer science, memorizing answers to lists of problems isn’t going to help you. Understand recursive and iterative solutions to common problems. Know data structures, big-O, and common algorithms. Know what methods and data structures can be used to solve which problems. You probably won’t be asked about advanced data structures or techniques–you just need to understand the basic ones really well. Know the team. Research as much as you can. In my case, I knew what the project was and I could actually use it and come up with suggestions. This may not always be possible. If not, learn about the larger organization that you can get information for. Have lots of intelligent questions. Many questions I asked to most people. Here is a sample: Favorite thing about working at Microsoft, Least favorite thing; My specific role. How big the team will be grown, impact of external events, comparison to competitors, strategy, where will the team be in the future, what’s your commute like, work-life balance, what do you work on (since not everybody you talk to is on the same project), what is your specific role, what other projects have you worked on at/outside of Microsoft, why did you move to this team, and lots more. The important thing is to be genuinely interested. If you are, then coming up with questions on the fly is easy, and you will have a natural discussion rather than reading a script. I moved from “script” to “natural” through the day as I became more comfortable. You must know what you’re talking about. This allows you to have nice conversations instead of feeling like you’re being quizzed. You’ll feel more like a peer, and hopefully so will they. You’ll already belong. Also, you can’t fake this so don’t try. The interviewers at Microsoft seemed much more willing to give me instant feedback than Google was. I could ask them what they thought of my code and they gave me honest feedback. I appreciated this. The book I read on the way home was The Neutronium Alchemist by Peter F. Hamilton. It’s the sequel to The Reality Dysfunction . Highly recommended for sci-fi fans.

Redmond, here I come.

Related links:

Check out my latest book, the essential, in-depth guide to performance for all .NET developers:

Writing High-Performance.NET Code, 2nd Edition by Ben Watson. Available for pre-order: