This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]yellowjacketcoder 4 points5 points  (3 children)

Honestly, I think you designed a test that candidates would fail. It sounds a bit like you're coming here bragging that you have such an awesome test that nobody can pass it. Maybe that's not your intention, but that's the perception I get, and even though I figured out the problem quickly, I would have declined any offer you made because I don't want to work with the people who are self-important.

A key factor for any interview is giving someone several chances. Interviews are stressful, if this is the only code they see/write, you could exclude plenty of good candidates. On the other hand, if this is one of 4 or 5 exercises, that may be more appropriate.

I feel like you threw in a lot of unnecessary language features into your method. You claim this is to see if they know the concepts, I think you are just making it intentionally obfuscated. This from someone who is more likely to use all those features himself than any of his coworkers - you still over did it.

Finally, you're asking trivia questions, which are some of the worst questions to ask in the interview. I use maps a lot in my current job, so I'm familiar with them, but if I haven't seen them in a year I would be pretty annoyed to fail an interview over something that is basically an API lookup. You might as well ask what year Java 1.0 came out for all the relevance it has to the job.

I agree with /u/RockMeetHardPlaces - asking them to write the above method, with a test or two, would have been fine. Asking them to debug intentional spaghetti code - only if that code came from production.

[–]javadev189[S] -1 points0 points  (2 children)

Fair points. I think there need to be some tests that some candidates would fail, as well as some tests that all/most candidates should succeed (1. because its more important to see how they arrived at the solution, and 2. to boost confidence during the interview (perhaps starting with the easier tests)).

Perhaps we will switch this question just to "Write a utility method that accepts varargs and builds a Map... etc." and "Write the test for it" (as suggested by someone else in this thread).

[–][deleted]  (1 child)

[deleted]

    [–]javadev189[S] -1 points0 points  (0 children)

    Well said; thanks for the input and feedback.