May 30, 2006

My Second Interview

See Also: First Interview

He started with introducing himself, "Hello Hany, My name is Ahmed I'm a testing manager at Microsoft. One of the projects I worked on is testing TCP/IP over windows" or something like that. He started with asking me about my work and what I do, I told him that I developed the ticketing engine for the soccer African cup of nations 2006 that was used to book tickets online for the matches, and the previous week I just finished the development of the Syrian e-government website.
- "very cool, sounds nice... Ok Hany, lets c, Why do you want to join Microsoft?".


"I Love Microsoft, I love the way that Microsoft actually delivers the easiest OS and applications for grandma, grandpa, children and just normal end users. So, it actually delivers and support their needs even accessibility options and still secure".
That’s when he wondered "secured!!.. Don't u hear every now and then about windows trojans and hacks". My answer was "Well, how many windows OS in the world compared to other OSs, ok, what’s the number of end users that uses windows?.. Many of the windows users are actually children, old grandpas and grandmas, or just a normal end user that knows so little about computers. I believe these users are considered a good material for hacking. On the other hand, how many Linux is used on the world?, and who uses it?... most of the Linux users are actually professional IT or developers, give these guys a windows, and it 'll be secured to them just like a Linux and maybe more with up to date service packs and hot fixes. And don't forget that not using Linux so widely at homes like windows, makes it even harder for hackers to learn how to hack it, while the wide spread of windows, gives hackers an opportunity to try and learn on many users, but still, the wide spread of windows and the very good support, hot fixes, and service packs delivered by Microsoft after the windows release, makes it more reliable."
- "Fair enough, What if you couldn't join MS? What will u do?"
- "Its not gonna be the end of world, I’ll climb my career path as I should be, but still, Its like my dream to join MS, I love MS and I want to be part of its team, its just like u r a professional player, u play for many teams, I can join Google, Oracle or whatever, but I love MS as if it was my team and I'll love to join it in the end."
- "What you could probably give to Microsoft?. Do u know how many people work for Microsoft?.
- "A million"
- ":-) no no, not that much, 50,000. What’ll u give in the middle of all that?"
- "I’ll be part of the team, No one stands alone, I'm part of my team".
- "Fair enough, fair enough... Ok Hany, what’s your most 3 preferred computer fields that you like?".
- "Well, AI, I love AI... Cryptography... And" (I don't remember what my 3rd computer field that I said was).
- "Cool"

He read my CV a little bit, then asked me about cryptography, "If some1 wants to send secure information, encrypted information to another pc, how he could possibly do it?". We talked a little about private and public keys, in the end I was saying that PC1 that receives the data have a key which decrypts the message sent, and the other PC2 that sends the message have another key that encrypts the data.. That’s when he asked me
- "Ok, so how PC1 sends the key to PC2?!"
- "On a secure channel" I replied.
- "What is a secure channel!, there nothing called secure channel!" he said while drawing it on paper a channel between 2 PCs, and then drawing a line cutting the channel he drew saying "I'm here now, I interrupted this channel and I can know what’s the key".
I started to think... We just can’t encrypt the key coz that’ll need other keys so that’s an infinite loop. It took me about 10 sec when I said "So what! It doesn’t matter if any one sees the key; actually we don’t even need a secure channel or anything. It’s a public key. Anyone can encrypt a message and send it to me; its just no one can decrypt it; because only me have the private decryption key".

He then started to ask me if I know assembly, my answer was "Yes, we studied assembly during my 3rd year and I love it, but I don't remember it very well". He asked me about interrupts, is there functions in assembly and how we pass parameters between functions...etc.

He then gave me what's considered my first problem during my 2nd interview "We want to implement a function, that takes as a parameter 2 numbers and an operator ('+' or '-') and returns the result of the first number plus or minus the second number depending on the operator. I want u to write the design of this function for me, no code, I don't want u to write the code for me, or the pseudo-code, I want a design, describe the function in text. Ur design, or what u 'll write now, 'll be given to a developer to implement it, so u have to write it so clearly that he can develop it without getting back 2 u or asking u about anything. U should consider in ur design 2 important things, first is object oriented, second is maintenance of the design, which means for example that we can increase the number of operators in the future."

I started to write the design as he said, just after I started he again told me to remember that he doesn't want code or pseudo-code. I took about 7 min or something and then he told me "Ok, that's enough, what we have here?” My design was fine, I considered object orientation and maintenance, for example I thought of having a function that takes an array of numbers and an array of operators, which then calls another function, so that we can increase the number of operations if we want, I also assumed that operators are kept in a table with a pointer to the function that implements this operator so that we can easily add more operators after implementing the function that does the operator and add it to the table, where each function of these takes 2 numbers and an operator and return it to the main function to continue with other operations if there is any more.

He read the design so fast with me, that's when he told me "Ok, I'll take this design now, I'll implement it, I'll code it on my notebook, While doing so, I want you to write the test cases for this function just on the back of your design."
I asked "How should I write the test cases? Like just the input and expected output?" "Yeah, just a table with inputs and expected output for each input"

I started to write my test cases. N.B.: Remember that the most important feature of any application or even a function, is to do what it was designed for. Always start with basic scenarios that 'll usually happen, and then u can begin to test the limits of ur function, maybe whats the max data it can hold as input, max data in output, what about min data, empty.. etc.

So, my first couple of test cases where just Normal test cases, 2+5=7, 8+2=10, 5-2=3, -4-3=-7.... 3.6 + 2.7 =! That's when I asked him "Are we allowed to add float numbers!” "That's actually a very good case, lets see, are we?, lets take a look at the design" he said. In my design I didn't mention whether numbers are integers, double or float, he told me numbers, and I wrote it in my design just like he said, and that's was just the beginning. I then told him that I’ll add in my design that the function allows float, but he told me "No, no, no the design has already been delivered we can’t change the design, just lets see other test cases". Int.Max+1 =!!! Again, I looked at him, "what then? What’s our limit?" I wondered. He answered with a big O, "That’s a very nice case, what's the output of your design on this case", Of course I answered the result’ll be Int.Min that's when he told me "Is that a reasonable answer!!, a guy give a very large number + 1 and the result is in negative!", I said "Nope, I should return an error or something". And ofcourse the same was with int.Min -1. He considered that’s enough trying to point out that my design wasn't actually the best as my test cases tell. That was probably everything about this problem, and we moved to this very hard question.

- "What is the most computer science field that u r good at, and I’ll ask u in it".
- "Thats the most hard question ever could asked" I said laughing.
- "Yes, in the matter of fact It is" He said.
- "Ok, well, AI, Artificial intelligence"
He then gave this puzzle "Four people must cross a bridge at night; the bridge can hold only two. The travelers must use a flashlight to guide their steps and there is only one flashlight. There is one of them that travels the bridge in 1 min, the second in 2 min, the third in 5 and the 4th in 10 min." and that's it.
I didn't get it, "Where is the problem then!!" I stared at him wondering, I couldn’t know so what! they just can pass.
That’s when the HR who were sitting with us spoke up, "So, u want him to get the optimum time to pass the bridge, don’t u?" she was asking Ahmed. He just said that he needed to get any solution, and then we’ll need to optimize it. "Well, I can’t think now but with the optimum path" I said. He answered "Be my guest".
I started to think and talking to myself, he tried to help me at a point, but I told him to wait, I can do it, I jumped to conclusions like that the 10 min guy must pass with the 5 min guy to minimize time, and neither of them can pass twice on the bridge, so whenever they pass together, some1 on the other side from the fast other guys (who are considered fast) must take the flashlight from them to turn it back, then that was it, I got all the hints, put them together and found the solution and told him about it. I believed at this point that the worst thing went on my interview was the design question.

"Time is up" HR said. “Ok Hany, IT was really nice to meet u" said Ahmed standing up and shaking my hand. While we were going out the door, still talking a little about ACM, I mentioned that I used to test the implementation of my friends in the contest because I used to give very good test cases that could define if there were any leaks in there implementation. That's when he pointed to the design paper telling me "Well, u seem u couldn't prove urself that much" he said with a very little smile on his face. To be honest that brought me down a bit as I was heading to the middle room (where we sit between interviews). I was the last one went out from the interview as all the interviewees already were waiting in the room. I sat there, opened a coke, kept on sipping small sips waiting for my 3rd interview.

5 comments:

Rain said...

Pretty interesting :)))
Can't wait to read part 3.

Anonymous said...

[url=http://tinyurl.com/y9qxher][img]http://i069.radikal.ru/1001/35/75e72b218708.jpg[/img][/url]



Related keywords:
medlineplus drug information Tramadol and
generic Tramadol
Tramadol acetomimophen
Tramadol dosing instructions
Tramadol hcl chemical supplier white
Tramadol without presciption
buy cheap discount Tramadol
Tramadol cod 180ct
[url=http://www.zazzle.com/AlexanderBlack]Tramadol for feline [/url]
[url=http://seobraincenter.ru]http://seobraincenter.ru[/url]
picture of Tramadol pill
cheap order prescription Tramadol
Tramadol overnight delivery no prescription
buy cheap overnight Tramadol
prescription Tramadol
side effects for Tramadol
Tramadol to purchase

Unknown said...
This comment has been removed by the author.
Unknown said...

Hi,

I was wondering if the microsoft interviews go beyond algorithms, data-structures and puzzles. By that, I mean how deep do they go exploring Operating Systems, Computer Organization stuff like caches, branches and Networks. A pointer to things, that I need to look at will be really great.

Mohamed Othman said...

how can i get an interview in microsoft

can any one give me link to send my cv to?

i sent it to
www.careersmicrosoft.com

is there other address can i send to