Microsoft Interview Question for SDE-2s


Team: Windows Azure Mobile
Country: United States
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
3
of 3 vote

Great question :-

In My opinion I would like to Put this as :-

1> It should basically work as an Independent module which can be integrated as the plugging for various application.
2> For that, I would like to expose an interface say DownloadURL(String URL).
3> I would also expose another API for File Storage Like SaveFile(String filepath).
4> Internally , I would implement these API by breaking into Modules like. File support and fault tolerance .
5> For File fault tolerance, I would basically implement a counter for bytes downloaded to the bytes to be download. I would Cache these bytes till A > User Cleans it , B > Files it 100% downloaded and 3 > System Cache Overflows .
6> Actually it a Huge Application so we can go a long while ..

Now Second Part Follow ups

1> Feature like stop and resume download is mandatory .
2> Another One could be data rate control. Like User should Be able to allocate the bandwidth for each of the specific download during parallel downloads etc.

- hprem991 February 24, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
5
of 5 votes

Thanks for the detailed answer.

Here are some differences in how I answered it -

1. First, I outlined all requirements for the DM that came to mind. Starting from the most basic "Should be able to download a file" to others like -
- Should provide admin functionality to blacklist websites so other users can't download from those sites
- Built in virus scanner
- Ability to calculate expected time based on bandwidth and let the user know how long it would take.

and other basic requirements

2. Special features
- I should be able to provide multiple locations - multiple trusted devices and even online storage location like Skydrive, etc and downloading the file should save to each of these simultaneously if I've selected that option.
- Automated download/subscription. Say, my friend uploads pictures to his Instagram occasionally, I can subscribe to it and have the DM auto download whenever pics are available.

For fault tolerance -
Keep appending the bytes of the file to a temp file. Maintain a sourceFile->localTempFileName mapping in a DB. When machine restarts after crash, then check the size of the temp file and start from the byte number after the size. For instance, if the size was 546 bytes, start downloading the source from the 547th byte.

He was very happy with my ideas but unfortunately my component design was actually rough. They had many candidates applying for the position. I was told that my skills didn't match their requirements.

- pretentious.bastard February 25, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

adding few things
1. It must be lightweight in itself
2. Must be able to get added in browser as a plugin so that it is picked whenever a download starts.
3. Must be world ready so that a user in Japan can also use it without a hastle

- Sugarcane_farmer May 11, 2014 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More