Fog Creek Software
Discussion Board




Microsoft College Interview

So, the interview is over. A big disappointment :-(

Microsoft came to my college.

I was asked two questions

1 Question) Design a database table which implements a tree structure. Meaning one parent has many children. Each of those children can have several children below it and so on.

Anyone who worked with Oracle knows, its pretty simple. You have a foreign key which links to the Primary key in the same table.

For example, in the demo database Oracle provides has Manager Column linked Employee column in the same database .Oracle provides some pretty neat functionality such as CONNECT BY Clauses to handle this. With Oracle 9i, it has gotten more powerful.

I told him that this was the fastest method i knew (For the tree structure he wrote). Also i told him there is a more cumbersome method in which you assign a unique string to each node which is not very effecient. 

2 Question) What is the probability that if you toss 4 coins you get 3 heads in a row .

This was childs play. The event set consists of 2 events. The 3 heads can occur either the first ,second and third time or the second, third and fourth time. I computed the probability and told him. For some strange reason he kept on asking . Are you sure the event set is only 2, are you sure, are you sure?. Pretty sure,  I replied.
In the end he told me that i should have considered one more event. 3 heads can occur even if all the 4 coins turn out to be heads. He was certainly incorrect.  If you know probability, you will understand that if you say "3 heads in a row". It means 3 heads in a row.  What he was asking was the probability of 3 or more heads occuring.
I mentioned this to him and he seemed satisfied and told me it was a mistake in phrasing the question.

In the end, i am not sure why i got rejected. Probably the way i spoke and put it across. It is always important on how you communicate, not just what you have in your head.

Well, what disappointed me was i spent 10 months  preparing to be interviewed by microsoft (Yeh 10  f***ing months) . I wrote  technical papers which were of good quality and got it published. In the end it turned out to be one f***ing waste of time.  He did not ask me about them.

I burnt a hell lot of midnight oil in writing them. Used to stay up till 4-5 am reading obscure books.  I was sure that if someone competent at MS reviewed my papers, i would be called for the second interview round at seattle.

Life goes on.

Anon
Wednesday, December 04, 2002

I would have asked what the database was for and depending on the answer, likely may have said to use a B tree to the first one and discussed why that was so and what the tricky parts were and how big I might want to make the nodes.

For the second part I'd have said 3/16 without a moment's pause. You definitely blew that one. Sorry. Better luck next time.

Sarain H.
Wednesday, December 04, 2002

Sarain ,

<<
I would have asked what the database was for and depending on the answer, likely may have said to use a B tree to the first one and discussed why that was so and what the tricky parts were and how big I might want to make the nodes.
>>

What does the question have to do with a B Tree?.  You can have a tree structure for a table with 10 rows. No one will have  a B Tree for a table with so less rows.  There is no "tricky" part. For an indepth discussion, refer Joe CElkos SQL Book

<<
For the second part I'd have said 3/16 without a moment's pause. You definitely blew that one. Sorry. Better luck next time.
>>

Pause for somemore time and you will know its wrong ;-)




Sarain H.

anon
Thursday, December 05, 2002

"Oracle provides some pretty neat functionality such as CONNECT BY Clauses to handle this. With Oracle 9i, it has gotten more powerful."

i hate to point out the obvious, but after all - you are at an interview for microsoft.

wish you well
Thursday, December 05, 2002

As I'm sure you must have learned during your 10 months (wow!) of research for the interview, for a college hire Microsoft doesn't really care about what you've done. It'll get you the interview, but once you're in the door your resume is pretty much ignored.

Once you are in the interview room the main question on the interviewer's mind is, "Can this person show me right here, right  now that they can think?" Your interview didn't answer that question for two reasons:

1) Your interviewer sounds like a newbie, and didn't imho manage the interview well. Had it been me, I would have canned question #2 after realizing you weren't getting it for some reason, and moved onto something else that would elicit useful information. In your interview it sounds like a lot of time was wasted on that question, which in the end revealed nothing.

2) You didn't give the interviewer much to work with. While you were technically accurate in your answers, they weren't helpful to the interviewer. Sarain's answers, for example, would have led somewhere that showed more of your brainpower. In an ideal situation you wouldn't have to manage the interview, but hey, this is the real world.

Good luck.

Malcolm
Thursday, December 05, 2002

Bad luck. Don't be hard on yourself, that's a crappy interview.

More to do with the interviewers personality than your ability.

There's only one lesson here, you put too much energy and thought into one single entity called 'microsoft', forget them.

The answer is clearly 3/16. As there are 16 possible outcomes of which three satisfy the requirement of three in a row.  Your answer of 1/8 is totally valid and merely represents interpretation, bad luck again.

Personally I wouldn't want to work with microsoft anyhow, and they certainly wouldn't want me working for them, so we both win.

Tony
Thursday, December 05, 2002

My friend had an interview at Microsoft in Seattle couple of weeks back. He went through 4 rounds of it. 3 out of the 4 people he interviewed with were extremely rude and arrogant. The last guy who interviewed him was not sure of most of the questions he asked.

Crappy interview just like you. Do not be too hard on yourself. Look at all the stuff you have learned through this.

Curious to know, what is the technical paper you published? Is there a link to this paper?


I am  looking at Microsoft as my first choice. I came up with a few features for Microsoft Outlook, Microsoft Word, MSN Messenger, Internet Explorer, Hotmail, My MSN, Microsoft Reader and Microsoft Windows and mailed it to a few people working there.

They set me up with a recruiter who mailed a standard list of questions that I answered and sent. No response yet from them.

All the luck!

Prakash S
Thursday, December 05, 2002

Hmm... Your answers seem to be wrong to me, sorry.

First one is not politically correct. Talking to Microsoftee, you shouldn't imply that Oracle has better database or an absolutely best solution for some task. I could mention Oracle-specific solution, but only as an addition to the generic or MS SQL-specific one.

The second question answer is, obviously, 3/16. However, this is kind of tricky question. Like this one:

"How many months have 28 days?" (the answer: 12).

But don't worry. I'm sure that your 10 month are not wasted. Microsoft is not the only good company out there. Good luck to you in future!

bodhran
Thursday, December 05, 2002

"How many months have 28 days?" (the answer: 12).

Wrong, unless you rephrase the question. The better answer would be to ask "how many months out of what, a year?".
And regular people do not consider a month with 31 days to have 28 days. The normal formulation for that statement to be true would be how many months of the year have 28 days or more.
Unless you think that people who are 1m83 tall are also 1m50 tall. If that is your kind of logic, there is no way to argue with you. And no, that is not smart, it is silly, useless and false.

notInterested
Thursday, December 05, 2002

What I don't completely understand is what is so 'Oracle specific' about the solution to the build a tree with a database table.  Since the interviewer said 'table' (singular), we know he's talking relational databases, and the self-referential solution you described is *the* single table solution for *any* relational db I can think of.  As long as the db supports a modern SQL dialect, you should be able to join the table to itself to traverse the tree...

select child.* from mytable as parent, mytable as children where parent.id = :parent_id and parent.id = child.parent_id;

Throwing in 'connect by' to the mix just clouded the issue.

somebody
Thursday, December 05, 2002

"And regular people do not consider a month with 31 days to have 28 days."

What is this -- the new math? Of course a month with 31 days has 28 days in it as well. It's not like you are finding the greatest common factor or something like that.

Sheesh.

I can see why that other thread is saying it's hard to find good developers. Some of you guys need to stop thinking you're all that and go back to elementary school.

Sarain H.
Thursday, December 05, 2002

"What is this -- the new math? Of course a month with 31 days has 28 days in it as well. It's not like you are finding the greatest common factor or something like that."

It is called language. Regular people mean that a month has 28 days when they say it has 28 days. Not 31, not 25, but 28.
If they meant that it has 28 days or more, they would have said so.

If you're not convinced, it only proves that developers don't think like regular people, which is certainly not a bad thing during development, but is pointless when taken out of context.

For instance, if I look information on sailing and swimming, I except anything that has information on either or both. That is the natural meaning of that sentence, that's how other people would interpret the meaning. Except for some smartasses, who would be quick to point out that only a topic that includes both swimming and sailing satisfies the boolean meaning of and.

Now back to natural language. A month with 28 days has exactly 28 days, unless you explicitly specify that you are speaking of the boolean truthfulness of that sentence. Otherwise, the majority of people, who do not understand boolean logic, or mathematical sets, or whatever artificact you may be thinking of, are not going to understand, or care about your odd interpretation of such an obviously false statement.

Now before you consider this direspectful of those other interpretations, that is not my intent. I am merely trying to explain to you that human psychology deals with what is probable, not simply what is possible. That's how our minds deal with all the other ambiguities in the world around us.

notInterested
Thursday, December 05, 2002

"I except"

Which was meant to be "I accept" of course.

notInterested
Thursday, December 05, 2002

Well said notInterested

Ben
Thursday, December 05, 2002

My feeling is that the question about 28 days is tricky and inappropriate for an interview. However, the original question about coins is very good. It assumes the interviewee will ask some questions to clarify the ambiguity.

There is a huge difference between precisely formulated "textbook" problems and fuzzy real-world problems. It is often a software engineer's duty to translate badly expressed customer's desire into the unambiguous specs. So, the question like "is HHHH valid combination?" - this is what interviewer was expecting.

Igor K.
Thursday, December 05, 2002

You're taking Sarain's comment out of context. He was giving a clue as to why the original poster got the wrong answer.

There are three possibilities out of sixteen:

THHH
HHHT
HHHH

What the original poster had done wrong was to miss out the last possibilty.

Language is shorthand and we make exclusive choices according to context. Computers of course don't do that, which is why it is so difficult to write softare for them.

Over thirty years ago at school we had an economics teacher who was an early convert to computers. He persuaded the headmaster  to let him do the schedule as a project on Manchester University's mainframe computer. It was a total sucess except the program forgot to tell the computer that when it scheduled five Math classes for example, they each had to be on a separate day. Computer time was hard to get then and the deputy head ended up spending all his summer holiday doing the schedule the old way on a long roll of paper spread out on the floor of the office.

Stephen Jones
Thursday, December 05, 2002

The whole point about the "3 heads in a row" question is that it's ambiguous and open to interpretation. It's an extremely good question precisely because of its ambiguity.

The idea is that the interviewer wants to know how you think, not whether you get the right answer. In this case, failing to spot and clarify the ambiguity means that your thinking didn't show the qualities that the interviewer wanted.

Most real-life problems are ambiguous, while most developers think in black-and-white.

Mark Pearce
Thursday, December 05, 2002

Well said Mark. Exactly my thoughts.

Developing software and translating customer requirements into a product is all about finding the tricky spots and imagining what can go wrong. Developer interviews should be filled with tricky questions and questions that are plain incorrect.

I'm sure that the thing that the interviewer wanted to hear is you asking if four in a row counts too. Not asking that question was very likely a factor why you were rejected.

Jan Derk
Thursday, December 05, 2002

"How many months have 28 days? (the answer: 12)."

"count month where month.days == 28". (the answer? this year, 1, the year 2004, 0)

Silly, silly question. If we used ">=" instead of "==" we would have obtained 12.

Leonardo Herrera
Thursday, December 05, 2002

'How many months have 28 days in them?'

It doesn't stipulate that the answer must use the Gregorian calendar. Is the answer different with the Hebrew, Muslim, Chinese, or Mayan calendars? I don't know, but any answer can be valid if you get to stipulate the calendar...

Devil's Advocate
Thursday, December 05, 2002

As a general rule, if an interviewer asks "are you sure?" more than once then "yes" is the wrong answer.

At the very least, you've got to explain why you're sure and you've got to make an attempt to understand why the other person isn't satisfied. If you don't do that, it doesn't matter how good your logic is because you're not communicating enough of it.

In a real work situation, you could easily get a requirement that says "3 in a row" and really means "3 or more in a row." The smart thing to do would be to double-check rather than making an assumption (or at least to explicitly document that you're making an assumption).

Beth
Thursday, December 05, 2002

I had an experience during a Microsoft phone interview back in 1994 when I was getting out of school.  The question that started the whole thing to go downhill was when the interviewer asked me to rank my C programming skills.  I told I thought of myself as a 8.5 but I still need some reference available to keep track of all the libraries and API's.  He then stated that his programmers did not need reference to program.  I thought it was a bit over-the-top so I asked him if all his people knew all function and parameter lists that they used.  That threw him and he then rudely ended the interview.  I received a nice letter from his office that they were going to pass.  I was not dissapointed since I still have to look a few things up in books.  I guess I still am not up to his standards.

I will say that I do not attach this story to Microsoft as a whole.  Just a funny story now I tell.

Chris Woodruff
Thursday, December 05, 2002

>>> Microsoft is not the only good company out there. <<<

I am finding these threads about MS quite interesting.  I do plan to apply.

They may not be the only good company out there, but they seem to be one of a very small number.  MS may be closer to a monopoly on good software development jobs than they are on software itself.

mackinac
Thursday, December 05, 2002

I think you gentlemen who think that average people don't think all months have 28 days are wrong.

I asked my girlfriend this morning. She's not average but she got it right.

It's not "How many months have 28 days EXACTLY no more - no less." It'sn "How many months have 28 days."

Lets say you have two dogs. And someone says "Do you have a dog?"

How do you respond? Do you say "No." and prove how incredible clever you are and then talk about strictly and exactly and greater than and less than and boolean operators? Or perhaps you are especially advanced. You then say, well 31 is a prime number and 28 is 7*2^2. So if we assign n-dimensional space to represent prime factors with each unit vector equal to a prime number to a 1st power and a linear mapiing between vector lengths and prime powers then we can clearly see that the dot product of the two vectors is zero, therefe I do not have a dog."

No, most average people would say "Yes I have a dog. In fact, I have two dogs."

By the way, I did an internship at MS one summer during school back in the days whenBill had the most dhorrible halitosis imaginable. I dreaded running in to him in the hall. I got an offer from them but I turned it down since I didn't want to bow to the man. Bow wow if you know what I mean.

So sure, interview for MS if you like. But you don't have to accept their fancy pants offer. It's much more fun to turn it down if you're into that whole sort of thing. It'll probably be one of the only times MS has to submit to you and do as you say. Enjoy it whele ya got it is all I gotta say.

Tally ho old chaps!

Sarain H.
Thursday, December 05, 2002

Interviewing for a candidate's ability to handle ambiguity is good, but in my opinion the coin question is a poor way to do it. With a short amout of time to analyze the candidate, asking a question that requires recognizing just one thing (e.g. that there could be 2 or 3 event sets) is asking for trouble.

A more useful interview question would allow for a broader range of answers. Even a simple question such as "Design a calculator program" gives a lot more room to explore the candidate's ability to clarify requirements.

Malcolm
Thursday, December 05, 2002

I think Beth has it right. What you were given in the coins question was an incomplete requirements spec. What you did
was to assume that your interpretation of it was right, without checking with the customer, despite being given several promptings that there might be a problem. You even insisted that your interpretation was right, even when the customer told you what they really wanted.

Unless you want to be the kind of programmer who is locked in a dark room and has requirements documents pushed under the door for her to code, people skills are as likely to decide your usefulness as your technical papers. Not many CS courses teach you this. It's something you learn in your first few jobs, so don't despair.

If you really want to work for MS, maybe try again in a few years.

P.S. Actually as an interviewer I like the question, because if someone gives the answer including the probability of all four being heads you can still say 'are you sure?' and see how they react.

David Clayworth
Thursday, December 05, 2002

"What you did  was to assume that your interpretation of it was right, without checking with the customer, despite being given several promptings that there might be a problem. You even insisted that your interpretation was right, even when the customer told you what they really wanted."

Rock on David!

Sarain H.
Thursday, December 05, 2002

Actually i am pretty sure i got the coin right ;-).
I majored in Industrial Statistics and Probability was one of the basics.

When we were asked questions in exams,  3 coins meant 3 coins.  When we re asked the probability of more than 3 coins, the question always read "Atleast 3 coins".

It may be open to interpretation by a layman, but not to someone who studied statistics for several years.

Some guys mentioned that i should not have mentioned Oracle. Well, i did not. I just wrote down the table structure.

anon
Thursday, December 05, 2002

The issue is not whether you got the question right or not from a statistical, or logical, or whatever standpoint.  The issue is that the interviewer asked you a question that could have meant one of a couple things, and you assumed one (the statistical viewpoint), then argued about how it was the right viewpoint.

When a customer comes to you and says "I need a program to download software to my computer" you don't just write a simple TCP/IP application.  You ask why they need that, what will they use it for, and more questions depending on how they answer.  Because only after asking them those questions to you find out that by "download" they mean "install" and they don't know that about how Windows handles installing programs.  Arguing with them about terminology gets you nothing but bad feelings from the client, and the lack of another project to work on.

Andrew Hurst
Thursday, December 05, 2002

>>>>>>>>>>
Actually i am pretty sure i got the coin right ;-).
I majored in Industrial Statistics and Probability was one of the basics.

When we were asked questions in exams,  3 coins meant 3 coins.  When we re asked the probability of more than 3 coins, the question always read "Atleast 3 coins".

It may be open to interpretation by a layman, but not to someone who studied statistics for several years.
>>>>>>>>>>

WOW!  No wonder why you didn't get the job.  I wouldn't hire you if you even if you could re-write the linux kernel in a day.

You are telling the "customer" that you were right and they were wrong.  Do you not understand this?

Do you not understand that you are the domain expert and the customers are not?  Obviously a customer (and this can be many people in the real world -- including some of your co-workers) might not use the language that you expect.  This is where your skill comes into play.  This is where you say, "To me, 3 coins means exactly 3 coins.  Did you mean to say 3 OR MORE coins?"

In the real world, customers have an idea of what they want ... but they usually aren't very good at explaining it.  Obviously they might not use some of the correct terminology sometimes.  A good engineer goes through the trouble of finding out exactly what they want (gee..a satisfied customer...what a novel idea) .

What a dunder-head.  Geesh.

You still don't get it
Thursday, December 05, 2002

Interviews can be hit or miss.
I thought I bungled my interview because kept trying to find an better answer than the obvious one.  At the end the interviewer (Tuna - nice interviewer) pointed out there was no better answer because xyzzy. 

When I got the call back, and later got hired, I tracked him down and asked what the deal was.  He said that right answers dont matter so much if you make it clear that you do know your stuff, explain why and what you do and can explain what else could be done. 

I try to follow this when I interview too. 

exSoftie
Thursday, December 05, 2002

Sarrain H. said,

--- It's not "How many months have 28 days EXACTLY no more - no less." It'sn "How many months have 28 days."

Lets say you have two dogs. And someone says "Do you have a dog?"
How do you respond?” ---

This isn’t exactly a perfect analogy.  Lets say I have two dogs.  And someone asks, “Do you have ONE dog?” I answer, “No, I have two dogs.”  Would I be wrong?

Natural language is subtle, often vague, and very dependent on context.  I think the questions “Do you have a dog?” and “Do you have one dog?” would be interpreted differently by many individuals.  Ok, yeah, I would say that 12 months out of the year have 28 days, and YES, I have two dogs actually. 

However, “notInterested” has a valid point.  “Do you have one dog?” would probably be interpreted as meaning “Do you have EXACTLY one dog?” by most.  And it doesn’t seem like an unreasonable interpretation to me.  Can we accept that natural languages are subtle, vague, and dependent on context while computer languages are not? 

That’s all beside the point though.  It’s not a good idea to make assumptions or subject questions to interpretation when interviewing with Microsoft.

Nick B.
Thursday, December 05, 2002

Ahhh, brings back memories of my Microsoft interviews. I have yet to have more enjoyable or intellectually challenging interviews than the ones with Microsoft.

Sometimes I wonder how different my life would have been had I not left after two months.

cheapo
Thursday, December 05, 2002

The trap the interviewee got into was thinking that the interview was just an exam and all s/he needed to do was provide the "right" answers to the questions.  It takes more than that to do a good job in the real world.

But crossing your arms and saying, "yes, I am right.  I do not need to think about my answer or discuss it", will only serve to end the interview on your second question.

Torment
Friday, December 06, 2002

Storm in a teacup. Silly question, silly answer, silly opinions,
silly company

Silly - all of you.

Alberto
Friday, December 06, 2002

There are no right answers in any interview.  In the end asking parlour game questions is pointless, it demeans the interviewer and interviewee.

Ask about real problems that have context, not context free linguistic mazes.

Simon Lucy
Friday, December 06, 2002


  I agree with Simon. 

Ricardo Antunes da Costa
Friday, December 06, 2002

Joe Celko on trees in SQL (you can google for more links):

www.intelligententerprise.com/001020/celko1_1.shtml
www.dbmsmag.com/9603d06.html
www.ibase.ru/devinfo/DBMSTrees/sqltrees.html

Ali
Friday, December 06, 2002

>>>>>>>>>>
Storm in a teacup. Silly question, silly answer, silly opinions,
silly company

Silly - all of you.
>>>>>>>>>>

Alberto, I've been reading this forum for a while now.  And damn if you don't have an ego the size of the grand canyon.

Please get off your high horse.  You aren't that special AND .... [see sig]

You aren't that good
Friday, December 06, 2002

Yes, Anon, you did get the coins question right. Your
probability professor would certainly agree with you.

However right is not the same as successful. It didn't pass
you the interview, and if the interviewer was your boss it wouldn't stop her making you rewrite the code.

The good news is that I know some Software Professionals who took years to learn this lesson, but you've found it out on your first interview. Trying to work out what the customer really wants from what they said they wanted is a vital skill.

David Clayworth
Friday, December 06, 2002

Ahhh..Alberto is only upset because he is still struggling with the first question. That's why it's silly to him.

As other's have said, the purpose isn't as much as getting the right answer but to demonstrate your problem solving and communication skills. Some may view the questions as "silly", but this is probably because they view the question as just a question that has a right or wrong answer.

Others, like 99% of the people on this forum, realize the questions serve a deeper purpose than merely to elicit correct or incorrect answer.

Mark Hoffman
Friday, December 06, 2002

If the interviewer used the word "probability" in the sentence then he should have conformed to the definition of 3 heads meaning no more and no less than 3 heads.

You should merely write this one off to experience, for when someone from MSFT speaks in terms of standards - you now know what they mean: somthing else.

Does this leave you feeling scorned in a make believe land?  You're not the first:

“When I use a word,” Humpty Dumpty said in rather a scornful tone, “it means just what I choose it to mean – no more, no less.”

“The question is,” said Alice, whether you can make words mean so many different things.”

“The question is,” said Humpty Dumpth, “which is to be the master – that is all.”

-- Lewis Carroll on embracing and extending

Nat Ersoz
Friday, December 06, 2002

Quite sometime back I was interviewed by MSFT dev centre in India.  I got past two 45mins telephonic interviews. The HR had scheduled me for another 5 rounds at the MSFT office in Hyderabad - all in a day. The first 3 before lunch -  I did really well - linked list insertion, deletion, sorting, string traversal, searching, some puzzles,  design problems, etc.

The fourth one was taken by a top guy (~12 years in MSFT) - he explained to as why MSFT was a great place to work and the roles they had and asked me what I was interested in.

After about 15 mins of general questions like  "why did you leave your 1st job", "why are you interested in MSFT", "how will you rate yourself in C", "why did you do a B.Tech. in Mech Engg if you wanted a s/w job".

He then proceeded to the white board and wrote out a problem. I was given an M x N matrix with characters. I had to navigate the matrix in all possible directions (8) and give a count of valid dictionary words. I could assume that I had a function isWord(const char *word) which would look up the dictionary.

I asked  a couple of  questions about  the matrix, thought for a while and explained to him as how I would proceed. He gestured to me to write the code. Which I did. But he wasn't happy - as my code was naive. He told me to make it "tight". I did. But then flunked. I asked him some questions on the way too. After about 10 mins (which seemed like eternity), he told me to stop and gave a solution which in my opion would have taken lots of thoughts over atleast a day to come up with. The HR called me and said that though I had done really well in the first few interviews barring the 4th one,  they were looking for more maturity in problem solving - well atleast I had the result on the spot! It was disappointing for a few days but then I had to get along with life :-)

FlunkedMSFT
Wednesday, December 11, 2002

*  Recent Topics

*  Fog Creek Home