|
||
Title: Test the functionality of this stapler Post by MessesUpGuy on May 16th, 2003, 7:42am My friend interviewed with MS 2 months back and the following were asked and I thought it might be helpful to stir some of yor thought process. Test the following: a) the functionality of this stapler b) a function that compares 2 dates c) a program that turns the monitor an unexpected color when you press a certain key on the keyboard. d) a given user input/output box. -cheers |
||
Title: Re: Test the functionality of this stapler Post by MattyDK23 on May 25th, 2003, 2:46pm on 05/16/03 at 07:42:21, MessesUpGuy wrote:
I had an interview with an IT company two weeks ago, and they said to assume they had a database that recorded dates using "format x" -- similar to a Unix timestamp in that it recorded dates using only a number. The only function I was allowed to use was convert("MM-DD-YYYY") to see what a date was in "format x". He asked me to determine a function to convert these numbers into dates. I was stumped. First question: Can I assume "format x" is linear in it's growth? Nope...so it might be linear (which would make it a lot easier), but it might not be. And where is the 'zero' date, ie: Jan 1 1970 is the Unix epoch. Second question: Can assume convert("MM-DD-YYYY") increases as the date increases / ages? Sure...helps a bit... Yeah...I just said to insert() dates and try and find a curve with the results...it was pathetic, I didn't get the job. |
||
Title: Re: Test the functionality of this stapler Post by towr on May 25th, 2003, 3:16pm you could have tried binary search.. Aside from a unix-like time stamp, you could also have something like YYYYMMDD(hhmmss), simply concattenating year, month and date (and time), it's increasing with time, but non-linear. |
||
Title: Re: Test the functionality of this stapler Post by James Fingas on Jun 10th, 2003, 10:13am Hey, now that computers are fast, just try every possible date until you find the right one... I think binary search is probably what they were looking for. You only have to assume that the number increases as the date increases. |
||
Title: Re: Test the functionality of this stapler Post by Phuoc on Jul 10th, 2003, 12:42pm on 05/16/03 at 07:42:21, MessesUpGuy wrote:
Here's the answer to a): Function DoesStaplerWork() Interviewer.Hand.PlaceOnTable Interviewer.Hand.StapleToTable If Interviewer.Scream Then DoesStaplerWork = True ElseIf NOT Interviewer.Scream Then DoesStaplerWork = False End If End Function :P Cheers, Phuoc http://www.phuoc.com |
||
Title: Re: Test the functionality of this stapler Post by Chewdogscp on Jul 10th, 2003, 9:00pm The interviewer probably just want to know how many ways you can test to see how efficent the stapler is. Here goes: 1. The length of the staples inside.... if long then they can staple large stacks of documents making it more efficient ;) 2. the lenth from the hinge to the head of the stapler... If it's long then u can staple the center part of a document such as a pamphlet. 3. How many staples can it hold at once... more is always better 4. Is it electronic? there for you do not have to push down on it 5. can u use it to staple things to walls? 6. Does it staple everytime, or does it sometimes mess up? 7. Does it have any other uses? more points if more uses 8. Does it have a warantee? 9. Wat's the color? Based on the answers to the last nine evaluations u should be able to test the functionality very well ;) |
||
Powered by YaBB 1 Gold - SP 1.4! Forum software copyright © 2000-2004 Yet another Bulletin Board |