跟鼎。 your quiz is not clear, you want to test the method, or the service? :D
-coolmao(酷猫*Zensunni);
2010-6-2(#6103080@0)
It is clear. This is a real interview question. The candidate failed the question but still got an offer.
-wincity(toad 会英文的红卫兵);
2010-6-2(#6103181@0)
那估计我也要fail了。 我很可能会test method without service. :( 早知道你会Struts就问你了。害我看了几天tutorial。
-coolmao(酷猫*Zensunni);
2010-6-2(#6103246@0)
How do you test without service? 这不是 trick 题。只要你平常重视写 test,你肯定遇到过类似情况,the interviewer 不过是 test 你的经验。我最看不起 trick 题。我觉得平平常常,思路清晰的人,比能做 Amazon 的 trick 题的人,会是更好的programmer。
-wincity(toad 会英文的红卫兵);
2010-6-2(#6103308@0)
Use "mocked" services -- i.e. replace service calls with simulated output? BTW, I wouldn't consider the Amazon horse racing problem (if that's what you refered to) a "trick" -- as all it requires is"思路清晰".
-cca(不归的如来佛);
2010-6-2(#6103415@0)
In comparison, I would consider "how do you test the method" trickier, as it's such an ambigious question -- with no well-defined intent.
-cca(不归的如来佛);
2010-6-2(#6103427@0)
Your answer is right. I don't think the question is ambiguous. I got the answer right away when she asked me. I didn't have any doubt. That's probably because I'm a simple minded person myself.
-wincity(toad 会英文的红卫兵);
2010-6-2(#6103484@0)
Was the answer verified? Maybe you and I missed it -- and yet are enjoying ourselves without knowing the truth. :-)
-cca(不归的如来佛);
2010-6-2(#6103517@0)
Unverified. It'd be funny if I call up the guy and ask him.
-wincity(toad 会英文的红卫兵);
2010-6-2(#6103571@0)
Plus, why do you think those "能做 Amazon 的 trick 题的人" couldn't be "平平常常,思路清晰", and had to be worse programmers?
-cca(不归的如来佛);
2010-6-2(#6103440@0)
Because people who're fond of trick or "horse racing" type of questions tend to favor complexity over simplicity. I have worked with this type of person before.
-wincity(toad 会英文的红卫兵);
2010-6-2(#6103478@0)
But the key of the question was precisely simplicity with clear mind. Remember whoever trying to leverage "heap sort", "天平秤12球问题", or unnecessarily associate it with "coding", "algorithm" didn't really get it.
-cca(不归的如来佛);
2010-6-2(#6103494@0)
You do have a point. Nonetheless, "*能做* Amazon 的 trick 题的人" is not necessarily equivalent to "*热衷于*智力测验的人" though.
-cca(不归的如来佛);
2010-6-3(#6103827@0)
You could be right. I'm not extreme.
-wincity(toad 会英文的红卫兵);
2010-6-3(#6103851@0)
I think people who are fond of buzz words (such as design patterns by their names instead of spirit) tend to favor unnecessary complexity.
-cca(不归的如来佛);
2010-6-2(#6103536@0)
You do have a point. I have seen such cases.
-wincity(toad 会英文的红卫兵);
2010-6-2(#6103573@0)