Search This Blog

Saturday, January 26, 2008

Microsoft : Double Thanks !!!

Peace be upon you

How are you guys? today and as unusual I will put some code, why??? Because I want someone to judge what I have done.

Let us take it from the beginning, I wrote this because I sent to Microsoft (I like to work there), I will sort it as I remember, Firs the Phone interviews, I will put only the question that I didn't answer
  • what is the difference between class and struct in C#?

  • - the difference is the struct is unmanaged object and class is managed object, what I mean , if you try to use sizeof which is located in (System.Runtime.InteropServices) you will see that it takes the unmanaged class or struct which means that the sturct is a some sort of unmanaged object,I found some similarity while I am trying, I found that the struct can inherit from interface, that's what I have tried I didn't try to inherit from class, but I think as long as it works with the interface it will work with class

  • P.S: I used VS.NET 2005 which has C# 2

  • what is the maximum number of functions in the dll?

  • - I don't remember exactly the question, so what I have tried is ,export some function using the ordinal, and I found it is Ok until it reaches to 65535, after that it give me linking error number 1119, how do I get it I will tell you.I though that when I read dll and when I use GetProcAddress using ordinal, I do some sort of casting to let it go, I imagined it like if it exceed that limition it will cause a problem to the GetProcAddress, why, simply because the function will not be able to know what is coming to it, is it string or ordinal, I have though also this limit is for the Unicode version of the GetProcAddress, there is 2 functions for GetProcAddress and here is sorting for this functions

  • GetProcAddressW : I think it's limit will be 65535

  • GetProcAddressA : this is the ASCII version and I think it's limit will be 255,

  • How does the Garbage collector works?

  • - as I told you before it manages the allocation and de-allocation of the memory, also the garbage collector works fine with objects that implement the IDisposable interface, this interface is like the destructor in C++, there is one thing about it the Garbage collector don't work efficiently when the developer uses "unsafe", the user have to manage the his/her pointer as he/she likes, I also read that the Garbage collector work with object in heap with it's status, what I mean is ,when the developer allocate object, the object is in LIVE mode, when the user change the object by allocating new object or any way, the old object get status DEAD, after that when the garbage collector pass over allocated object and it's status it de-allocate all object with status DEAD, logically, the garbage collector will call the "Dispose" if the object has the implementation of IDisposable.

Here is the answers for the form interview, it has the code that I told you about



As you look ahead to potential career opportunities, what are the “must have” criteria that you will be using to determine which opportunity is the right one for you?
1. The place where I can unleash my creativity power.
2. Place where I can be one of the technology leaders
3. Place that I have passion to be in like Microsoft (since I used DOS at 1998 I started dreaming to work there)



What is your strongest programming language (C, C++, C#, VB, Java, ASP, HTML, etc…)?
C# and C++

When was the last time you wrote C/C++ code?
Today

What percentage of your time do you spend writing code?
60%

Do you have experience with multi-threaded programming? If so please explain.
Yes, I will explain with sample of what I have done before over windows mobile.
Once there was tasked assigned to me and it was to allow user to draw in freehand style and after the user release the styles the application should calculate the size of the image with (Jpg) format.
I did a thread that works with low priority, I have added 2 flags:
· IsExit (used to de-allocate all memory and exit form the thread)
· IsReleased (Used to create the Jpg file and get its size), while it is happening the size label has the word "Loading…"
In this case I used the threading for avoiding the Interface freezing, there is other cases used to enhance the application performance and to make use of the hardware, for example to make use of the Hyper Threading processors the application must be well threaded, also it is applied on the processors with the multi core

How much experience do you have performing code and design reviews?
6 months
What percentage of code have you written was kernel mode and what percentage was user mode?
10% Kernel mode, 90% user mode

Please comment on your experience level and discuss projects worked on in the following areas as it relates to Test (if applicable):

Performance
Performance is the way of handling resources wisely, it is very important to do testing over the application performance for many reason, for example if the application is performance loose on mobile devices it will case a battery consumption.
Scalability
The application must be able to grow up and expand with the as user expects it, I don't have something in my mind related to testing right now
Stress Testing
It's away to test the application robustness on the huge load from users.
Microsoft provides tools for web stress test.
I have wrote application to test "Transaction server"
End to End testing
As I think this type of testing is to ensure that the business logic is correctly supported and working properly.
Simulation
I don't know much about it, but I wrote application that simulate the behavior of "POS client" to do stress test over the Transaction Server
Tuning
It's away to replace some working parts of the system with enhanced parts, like removing some code that takes long time to execute with code that is work better in the perspective of performance and correctly reach to the target
System Integration
This when new system is installed to older working system, in this type of testing the both systems should work correctly properly with effecting on each of the work negatively and also it should give the expected result form integration

Please respond to the below as it relates to your current project/product:

What percentage of your current project did you own?
30%
What percentage was of your design? How much was new code and how much was enhancements?
I don't understand the first part, 70% was new code and 30% was enhancement
What layer are you working on? (kernel, middleware, UI)

Kernel, Middleware
What percent of coding was yours on the project?
60%
How would you characterize your philosophy toward testing?
I don't know what does the question means but I will answer based on what I have understand,
For me testing is the core of perfection of the project, based one the feed back that testing gave me (what ever it was (unit test or release test)) it help me to enhance the product and reach with it to the optimum user satisfaction

How do you test your code? Someone else's?
I write some code to test it spending some time with debugging


Please complete each question and indicate how long each question took you to complete.

Write a function that would: return the 5th element from the end in a singly linked list of integers, in one pass, and then provide a set of test cases against that function.


Write me a function that receives three integer inputs for the lengths of the sides of a triangle and returns one of four values to determine the triangle type (1=scalene, 2=isosceles, 3=equilateral, 4=error). Generate test cases for the function assuming another developer coded the function



Write a function to reverse the words in a string (“cat and dog” becomes “tac dna god”).



Thanks for your time
BR
Ahmed Essam

2 comments:

smoke said...

Rabena ma3ak mr neo

Nitin said...

Thanks for the post, friend!

There was an error in this gadget