24 ms·
I think the best part of this is how many people are getting it wrong in the comments here or not fully thinking it through. Perhaps it's not as easy a question
by weaksauce 9y ago
I think the best part of this is how many people are getting it wrong in the comments here or not fully thinking it through. Perhaps it's not as easy a question as you think it is in the heat of the moment during a stressful interview?
- nwjtkjn 9y agoSounds like an effective filter to me. Where I work, this would be the first part of one of the interviews, with the second part being something more like "Given a list of calendar appointments, what is the maximum number which can be attended without conflicts?"
- bryanrasmussen 9y agodon't you need a little bit more info about that list of calendar appointments? like at least an assumed time length? (assuming the list happens on the same day)?
- nwjtkjn 9y agoYeah I was thinking each appointment had a start time and end time.
- et-al 9y ago> not fully thinking it through What I like about pklausler's example is that it allows for people to find edge cases without too much technical knowledge. If I have a candidate who doesn't ask about the inputs (e.g. "are the appointment sorted?"), I'd be wary. Engineers are often given vague specifications they need to clarify or account for.
- weaksauce 9y agoI don't think it's a bad question to ask... just not the filter that the op thinks it is. all these people who are sitting in the comfort of not being in an interview and they are still getting it wrong. this filter should be easy enough to get the question right if you know any programming at all. something like the fizzbuzz question.
- baddox 9y agoI highly doubt I would ask if the inputs are sorted. I wouldn't expect them to be (why would they be, after all?), and I'd probably just give a solution that works regardless.
- FilterSweep 9y agoI think you just received some good interview advice, unintentionally.
- baddox 9y agoNot for interviewing for a company with reasonable interview practices.
- btschaegg 9y agoI agree. Also, since we're talking about two entries here, there really isn't much work to do... One could even argue that relying on the order of the items in this case is going to result in a worse design overall (it's one additional thing the caller can get wrong).
- Jach 9y agoIf you want to test for the ability to gather requirements and clarifications from vague requests, then test for it directly, don't bake it in as a hidden test you expect people to account for when the overt problem is just implementing a comparatively crystal clear toy question even if you say things like "number" instead of "positive integer". Assuming they can implement anything that seems to work at all (which is your main goal, right? or why ask it?) you could turn your prior vagueness into an opportunity to see if they can formulate test cases and refactor their approach to account for different inputs, if needed, or if you see them accounting for them as they go you can ask e.g. "why are you taking the absolute value?" and see if they're thinking about the input order or if they're just doing it because that's what they saw somewhere.
- Terr_ 9y agoYeah, I think the important thing is that the candidate should not have to "read the interviewer's mind" when it comes to what style of question is being asked. Unfortunately, this can also occur because the interviewer isn't clear on their own goals in the first place. They asked the question before really knowing what data points they want to come away with.
- kafkaesq 9y agoPerhaps it's not as easy a question as you think it is in the heat of the moment during a stressful interview? This point cannot be underemphasized. "Thinking aloud", not just in front of another person but under a very stressful situation (for most people) that also basically almost never occurs otherwise in daily life -- is a specific metacognitive skill that for many people can only be (even adequately) learned by either (1) careful training or (2) surviving many repeated failures, and finally getting at least partially acclimated to these kinds of confrontations. Yeah sure, perhaps some of the people who "bombed" that calendar test really were the walking fraudsters the interviewer (who knows they'll get to stay in their well-paying job regardless of the outcome of said interview) makes them out to be. But most are probably simply nervous, and due to a variety of psychological factors (imposter syndrome, among others) are simply momentarily blanking out, and having suffering from a very common form of mild anxiety attack which makes the problem seem much more complex to them (at that moment) than it otherwise would, under more natural circumstances.
- lopatin 9y agoBeing a professional programmer is not an entirely stress-free job. Often, time matters and you have to think on your feet. That's why I think rejecting a programmer for losing their core competencies like problem solving, i.e. freezing, under a medium amount of pressure is valid.
- zimzam 9y agoI've been a developer for years and worked for multiple companies: the most stressful professional situations I've ever have been in have been maybe a 4 out of 10 stress-wise, whereas interviews range from 7 to 9 out of 10. Interviews aren't ordinary job situations: they are contrived situations where people are making life-changing decisions based on a very short interaction.
- cnp 9y agoSame here, and have worked on some extremely high-profile, complex things. Never _ever_ have I been as stressed as when asked to perform interview whiteboard questions. It simply doesn't compare.
- lkrubner 9y agoSee "Embarrassing code I wrote under stress at a job interview" which was discussed on Hacker News here: https://news.ycombinator.com/item?id=9478906 https://news.ycombinator.com/item?id=9478906