3 ms·
I'm not sure about you, but it took me until halfway into the reading to figure out that the interview was actually being honest. It may be just bad comprehens
by angersock 12y ago
I'm not sure about you, but it took me until halfway into the reading to figure out that the interview was actually being honest. It may be just bad comprehension on my part, but the phrasing of the circumstances of the interview, as well as the way the interviewer spoke ("ECMAScript 2015"?), made me assume it was going to be some sort of satirical article.
That, as well as the ball of code that was the boilerplate, made me assume that this was some kind of parody of actual interviews. It wasn't until I was reading through the tortoise-and-hare bit that I realized the author was actually being serious.
Honestly, I'm kind of surprised that that kind of question even comes up in interviews--I think like easily 99% of a startup's tech problems are probably better reflected by "How do we handle rounded corners in legacy browsers" or "How do you provision a server because we can't afford AWS" or "What would you consider three essential libraries for Javascript on the backend, and why?".
These CS questions just seem like underhanded trivia, especially when you dress up straightforward problem with a bunch of extra noise. They'd be fun to work through with an interviewee, as a way of seeing how they think about a problem, but just dropping it on them as sink-or-swim in a hostile environment doesn't seem very nice.
- rayiner 12y agoI don't think this is an underhanded CS question. It just asks if you can make the conceptual leap from: "does the game terminate?" to "does the sequence get stuck in a loop?" They don't ask for the constant-time cycle finding algorithm, which someone may not necessarily know, but I think the interviewer's providing it reflects well on him.
- angersock 12y agoSo, I agree that the interviewee in the story did the correct thing, but the part where they are describing their reframing of the question ("So, I am to write an algorithm that takes a possibly infinite stream of…”) and then are just cut off (interrupted, as the story says) is kind of what I'm getting at. Like, if that happened in normal conversation, you kind of assume that either the person you're talking to is an asshole, or they are correcting your course because you are going down the wrong path. That, plus the setup of the code with all the variables right there, meaning that you'd of course be tempted to break encapsulation and solve the problem by just adding a "visited" flag to each board[x][y] cell. That's the smarter engineering thing to do, because you a) have access to that state as the problem is setup and b) know that visiting any cell will only ever land you in the same successive cell. Again, the question is bad because it takes a reasonable question ("Can you detect this loop?") and then foists on the interviewee boilerplate that literally begs to not follow the problem constraints.
- rayiner 12y agoGood point.