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.
May 30, 2006
May 2, 2006
First Interview
Previously: Before Microsoft Interview (Getting Ready)
- "So, you won the 2nd place in the ACM contest?" he said reading my CV..
- "Yeah" I answered.
- "so what did u do in ACM?".
I started talking about the ACM rules and how the contest goes, Then I told him that I was responsible for dynamic programming, recursion, and pattern problems in my team.
- "Dynamic Programming!, So you are good in dynamic programming?" He asked.
- "Actually not that good, Its like I'm a beginner, Its like I know basics and concepts, but still I can solve some dynamic programming problems." I replied.
- "Okay, I have this dynamic programming problem that I need you to answer me, just to know how much u know about dynamic programming, if you don't understand anything please ask me to tell u the question again".
At this point I was kinda afraid from dynamic programming problems ofcourse, and I wasn't that sure I can solve it, yet I was doing my best to be cool and calm.
Then he asked me this: "You have three big jars, each contains a different type of liquid, and you have many customers come to you, each one requests either a type of liquid from a jar, or asks for a mix between liquids in more than one jar".
I did nothing.. In my mind I thought "What!!".. I didn't even knew why this is a dynamic programming problem!!.. I asked him to explain some more, I even asked where is the problem?. "So, you want me to develop a solution that handles this scenario?" I asked. My idea was to keep customers in a queue with FIFO and just give them whatever they need unless they asked for something that is no longer available then they 'll be tomorrow's queue. I was just giving hints and talking with him, I didn't really give him an exact answer, but we just talked about this one.
He then drew a line on the paper saying "Well, forget this problem, now our interview is going to start".
- "You have people standing in a circle" he said drawing nodes on the paper circularly. "After n someone, this n someone is removed from the circle, and then u start counting another n someone from the last u just remove" explaining what he was saying on paper. "Who wil last till then end?" he asked.
I said "that's Josephus' Problem". He answered "Yes, that's good, you know Josephus' Problem?", "Yes" I replied. He asked me about the idea, and to implement the algorithm, that's when I said "I 'll assume that the linked list data structure is already made", So I wont write the implementation code of the linked list. But he said "No, Implement the code of the linked list, I want the whole problem solved from scratch".
I implemented both the linked list and Josephus' algorithm, then he started to take a look at the code with me, he didn't comment on the linked list implementation, but when we got to the main problem's algorithm he asked me "How could you make this code work better?". My answer was mainly about just simple code optimizations that makes the code more easily readable and just saves one or two checks and code lines.
- "Ok, how can you test your code?".
This was actually the key to most of my algorithm implementation failure, I started to tell him test cases, my first couple of test cases were normal test cases just to make sure that the algorithm is running ( and that's the only thing that passed my testing). What if the number n to remove from the list is zero?, what about the list is empty?, Okay, the worst is.. What if the number n to remove from the list is NEGATIVE.. And some others, my implementation was actually handling the basic cases of the algorithm the normal cases, and sometimes it passed some of my cases, but not all of them.
Anyway, he then started to read my CV, he noticed that my graduation project was robot motion planning, so he started asking me about it. I even explained to him the algorithms I used, what I was responsible for in this project?, how did I move the robot in both known and unknown environments, and how I divided my environment into small cells.
Then he asked me about the MCSE course, and how I became MCSA certified, he then asked me about TCP, UDP, DHCP, supernetting, DNS.
That was almost everything in the first interview, Thoughts in my mind were "My first interview went fine, but still I have a long way to go." .
The interview almost took 45 min, and then me and the other four interviees met in our room, where we hanged out, drink some coke and relax for 15 min, I didn't really talk about anything, I was trying to concentrate as much as possible.
My second interview was with a testing manager called Ahmed, when we went on the interviewing room together, the table was in the middle of the room where we sat facing each other, and again a laptop infront of him, some papers and a pencil. One of the HR ( the girl who called me in the phone interview) came to the room with us, telling me that she hopes it wont bother me staying with us, she sat with us for the whole 45 min of the interview taking notes.
To be continued.
- "So, you won the 2nd place in the ACM contest?" he said reading my CV..
- "Yeah" I answered.
- "so what did u do in ACM?".
I started talking about the ACM rules and how the contest goes, Then I told him that I was responsible for dynamic programming, recursion, and pattern problems in my team.
- "Dynamic Programming!, So you are good in dynamic programming?" He asked.
- "Actually not that good, Its like I'm a beginner, Its like I know basics and concepts, but still I can solve some dynamic programming problems." I replied.
- "Okay, I have this dynamic programming problem that I need you to answer me, just to know how much u know about dynamic programming, if you don't understand anything please ask me to tell u the question again".
At this point I was kinda afraid from dynamic programming problems ofcourse, and I wasn't that sure I can solve it, yet I was doing my best to be cool and calm.
Then he asked me this: "You have three big jars, each contains a different type of liquid, and you have many customers come to you, each one requests either a type of liquid from a jar, or asks for a mix between liquids in more than one jar".
I did nothing.. In my mind I thought "What!!".. I didn't even knew why this is a dynamic programming problem!!.. I asked him to explain some more, I even asked where is the problem?. "So, you want me to develop a solution that handles this scenario?" I asked. My idea was to keep customers in a queue with FIFO and just give them whatever they need unless they asked for something that is no longer available then they 'll be tomorrow's queue. I was just giving hints and talking with him, I didn't really give him an exact answer, but we just talked about this one.
He then drew a line on the paper saying "Well, forget this problem, now our interview is going to start".
- "You have people standing in a circle" he said drawing nodes on the paper circularly. "After n someone, this n someone is removed from the circle, and then u start counting another n someone from the last u just remove" explaining what he was saying on paper. "Who wil last till then end?" he asked.
I said "that's Josephus' Problem". He answered "Yes, that's good, you know Josephus' Problem?", "Yes" I replied. He asked me about the idea, and to implement the algorithm, that's when I said "I 'll assume that the linked list data structure is already made", So I wont write the implementation code of the linked list. But he said "No, Implement the code of the linked list, I want the whole problem solved from scratch".
I implemented both the linked list and Josephus' algorithm, then he started to take a look at the code with me, he didn't comment on the linked list implementation, but when we got to the main problem's algorithm he asked me "How could you make this code work better?". My answer was mainly about just simple code optimizations that makes the code more easily readable and just saves one or two checks and code lines.
- "Ok, how can you test your code?".
This was actually the key to most of my algorithm implementation failure, I started to tell him test cases, my first couple of test cases were normal test cases just to make sure that the algorithm is running ( and that's the only thing that passed my testing). What if the number n to remove from the list is zero?, what about the list is empty?, Okay, the worst is.. What if the number n to remove from the list is NEGATIVE.. And some others, my implementation was actually handling the basic cases of the algorithm the normal cases, and sometimes it passed some of my cases, but not all of them.
Anyway, he then started to read my CV, he noticed that my graduation project was robot motion planning, so he started asking me about it. I even explained to him the algorithms I used, what I was responsible for in this project?, how did I move the robot in both known and unknown environments, and how I divided my environment into small cells.
Then he asked me about the MCSE course, and how I became MCSA certified, he then asked me about TCP, UDP, DHCP, supernetting, DNS.
That was almost everything in the first interview, Thoughts in my mind were "My first interview went fine, but still I have a long way to go." .
The interview almost took 45 min, and then me and the other four interviees met in our room, where we hanged out, drink some coke and relax for 15 min, I didn't really talk about anything, I was trying to concentrate as much as possible.
My second interview was with a testing manager called Ahmed, when we went on the interviewing room together, the table was in the middle of the room where we sat facing each other, and again a laptop infront of him, some papers and a pencil. One of the HR ( the girl who called me in the phone interview) came to the room with us, telling me that she hopes it wont bother me staying with us, she sat with us for the whole 45 min of the interview taking notes.
To be continued.
Subscribe to:
Posts (Atom)