Live data from Hacker News

Interview gone wrong

ashu1461.com

21–30 of 209 posts

Re: Interview gone wrong

#22

Why did the author consider this an "interview gone wrong"? What was "wrong" about?

everyone knows the purpose of an interview is to prove that the interviewer knows more than the interviewee, thus the interview failed

Re: Interview gone wrong

#23
I know the point of the piece is the python syntax here, but I got stuck on: "judge things like code quality / speed / conciseness etc."

Do people generally write concise code on right off the bat when confronted with a new problem? I've always taken the same approach I would with writing: get something that works; refactor for concision. Maybe everyone else is playing 3D chess and I'm still on Chutes and Ladders?

Re: Interview gone wrong

#24
If your knowledge of Python comes from JavaScript, I would not blame Python for it. It's the failure of the person to not "read the instructions" and assume instead. Maybe conduct interviews in languages that you're familiar with?

Re: Interview gone wrong

#26

Python evaluates `2 == 2 == 2` to true. JavaScript evaluates the same to false. Somehow we've decided that Python is the weird one it seems.

1 == 1 == 1 is actually true in Javascript due to type coercion You're probably thinking `1 === 1 === 1` which is indeed false

I tried 2 == 2 == 2 in my browser's (Chrome) console and it evaluated to false.

Re: Interview gone wrong

#27
post #11
post #2

Any time you use language specific tricks in an interview, you’re probably going to confuse your interviewer and not do well.

I disagree: if you are demonstrating your mastery of a language (and with Python, these things are important: using appropriate syntax is the difference between dog slow code and fast code), you should use idiomatic patterns like the above. Another of Python features is a great REPL: when unsure or confused by an interviewer, I'd just fire python from shell and type in 'x' == 'x' == 'x' to confirm and demonstrate it…

In the real world you iterate, profile, and optimize

Re: Interview gone wrong

#28
post #15

In this respect, Python makes a lot more sense since that is how you'd normally write such an equality in math, and generally how people chain them: A=B=C means A=B and B=C. Part of the problem here is that we treat true/false as "just another value" in programming, and thus the usual operators are used to compare them. In math notation, if you wanted to compare the result of comparison A=B to a Boolean value C, you'…

Indeed, and likewise, I think Pascal would have thrown a compile-time error due to a type mismatch.

Re: Interview gone wrong

#29
post #21

Why did the author consider this an "interview gone wrong"? What was "wrong" about?

Interviewer made a mistake and confused/sidetracked a candidate in a short interview.

The interviewer made no mistake though, they made an observation; they were confused by the boolean expression. The candidate said they understood the interviewers concerns and was also confused, and didn't have an immediate answer. This is all normal and healthy, and something you'd commonly see in healthy and competent development teams.

The only thing I see that's wrong is that the interviewer thinks something went wrong.

Post reply on HN