4 ms·
I just saw that this comment was fading from downvotes. I think HN is just overwhelmed with people who somehow got hired into technical jobs but can't do them.
by ltbarcly3 2y ago
I just saw that this comment was fading from downvotes.
I think HN is just overwhelmed with people who somehow got hired into technical jobs but can't do them. Anyone who thinks that 'finding second largest number in an array' or 'finding if a string is a substring of another string' are hard, or that the pressures of an interview are a valid excuse for being unable to do it are simply not intelligent enough to be successful in this field and they are casting about for some excuse to protect their ego. These are problems that a bright 12 year old with no programming experience could do for fun, and these folks are purporting to be educated, experienced, professional programmers.
As much as people like to say 'muh anxiety', I've yet to meet someone who can't do very basic coding in an interview but also they are capable of basic coding in any other context. I would suggest that this sort of person is so rare that you will probably never meet one over the course of a normal career.
- gjm11 2y agoElsewhere in this thread there is literally an example of someone who, by their own description, worked at a FAANG company for some years getting good performance reviews, has enough interview experience that even if they couldn't generally code their way out of a paper bag they were surely good at interview-question coding, ... and, under pressure from a pushy interviewer, completely failed to do a straightforward coding task. I guess they could just by lying "to protect their ego" but in that case why post their comment at all? It really is the case that some people sometimes completely go to pieces when stressed, and mocking them by saying "muh anxiety" doesn't stop that being true.
- bobthepanda 2y agoI will say that, as the interviewer asking the question, I do recognize that people have anxiety, and I would prefer to nudge them out of a spiral, because a bad interview is generally not pleasant for anybody involved. To some degree the interview is not about getting the question right but also how you respond to questions about your answers. I would rather have someone who started with a totally incorrect answer and then reason back and forth with them til they got on the right path, than someone who came up with the right answer and then clammed up and refused to explain how they got there. (I once had a candidate tell me, verbatim, "I don't think analyzing performance of an algorithm is part of an engineer's job.") I would prefer if there were a more humane, less stressful, and scalable way to do an interview. The problem is that as a profession we lack the continued examination/licensing of other fields like engineering or medicine, so we don't have a good barometer of skills otherwise. And I often have to sift through massive numbers of people clearly overshooting their shot to get a good position.
- ltbarcly3 2y agoThe solution to the problem in question is about 9 lines of very simple code. In a 45 minute interview, that is 5 minutes per line available. It's about 1 character every 40 seconds. I think anyone can get flustered and mess up. It's possible for someone, on a bad day, lack of sleep, hung over, experiencing an anxiety attack to mess this up, but it's really really a stretch. This is a VERY EASY task, and if someone has done it before there's nothing sneaky or hard to do here. The version where you match different kinds of braces is very slightly more complicated but actually less lines of code. Yes maybe someone can't come up with this in an interview. My point is 99.99% of the time when someone fails this they are lying about their work history or they are so stupid they can't hope to do the job. 00.01% of the time they could do this easily and the stars aligned to give them a rare bad day. The best way to deal with that is to just assume everyone who fails this can't do the work, and the 00.01% person just interviews somewhere else and doesn't have another bad day. I don't even know what the alternative to that is, just hire everyone who claims to be qualified and hope for the best? Give everyone who demonstrates very very strong incompetence signals 2 or 3 more tries? def matched(str): count = 0 for c in str: if c == "(": count += 1 elif c == ")": count -= 1 if count < 0: return False return count == 0
- genewitch 2y ago((What happens) if you are missing a close paren?
- genewitch 2y agothe formatting was funky when i first looked at this, i can see it's returning a boolean now, that covers the case of count > 0
- bobthepanda 2y agoAs an interviewer, my company allows the person to pick the language of their choice. At that point, you could just write it in psuedocode if it came down to it, and if you actually knew what you were talking about it doesn’t matter all that much. It’s not like I know the in and outs of every single language people have answered the question in. In an era where linters and autocomplete and IDEs have existed for decades it’s silly to fail an interview based on tiny error checks.
- Tainnor 2y ago> 'finding if a string is a substring of another string' Unless you mean using a "substring" function or regexes... coming up with the naïve O(n^2) algorithm is indeed easy, but finding a fast algorithm like KMP is, I would say, non-trivial? For the "second-largest number in array" it's rather easy to come up with an O(n) algorithm, so I would consider the two cases to be different.
- ltbarcly3 2y agoI mean N^2!