Why did the author consider this an "interview gone wrong"? What was "wrong" about?
Interview gone wrong
21–30 of 209 posts
Re: Interview gone wrong
#22Why did the author consider this an "interview gone wrong"? What was "wrong" about?
Re: Interview gone wrong
#23Do 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
#24Re: Interview gone wrong
#25This mirrors mathematical notation for things like ranges or equality checks 5 x == y == 10
Re: Interview gone wrong
#26Python 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
Re: Interview gone wrong
#27Any 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…
Re: Interview gone wrong
#28In 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'…
Re: Interview gone wrong
#29Why 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 only thing I see that's wrong is that the interviewer thinks something went wrong.