Justin Giboney wrote: > I went to a job interview last Thursday in which I felt I did well except > for one question that he asked me. He asked me to create a PHP function that > takes an input and outputs even if a number is even and odd if a number is > odd.* Below are the function that I wrote in the interview, and the function > that I would have liked to have written in the interview. Now here are some > questions for you: > 1) is there a big difference in the two functions? > 2) if you could grade these on completeness, how would you score them? > 3) what would be your perfect answer?
1. there are some checks in the second example that are good. 2. if you wrote the second vs. the first then it would be graded hire 3. i have had many of these questions. one thing that i will point out that sometimes we focus too much on the code part and not the completeness of the question. Meaning the overall function and does it have everything. I do not see any comments or any additional items like that. function comments or code comments. just me -- thebigdog _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
