Comment by seanmcdirmid

Comment by seanmcdirmid 3 days ago

11 replies

Similar concept. You have them do some task like fizzbuzz to see if they can program stuff on the fly that they would never need to do in real life. You practice that since school doesn't prepare you for that unless you do ACM programming contests or something. The interview demands this to see if the candidate is capable of cramming for the interview, which correlates with the effort, ability they could put into the job, not with what the skills they actually apply on the job, which are hard to measure in a one hour interview slot anyways.

integralid 3 days ago

If someone doesn't know how to reverse words in a sentence they are absolutely not qualified to be a programmer. Yes they probably won't do this exact task often, but this is like a doctor that can't distinguish heart from the liver. It tells you something has gone horribly wrong.

  • ThunderSizzle 3 days ago

    In many languages, the basic version can be just one line of code, if you know the right libraries to leverage. C# leveraging Linq, for example:

        String.Join(" ",
          String.Split(" ", sentence).Reverse()))
  • chongli 3 days ago

    What if the sentence is in Japanese (which doesn’t use spaces)?

sokoloff 3 days ago

I agree that some random leetcode-hard problem is not a good indicator, but if you can’t write fizzbuzz or can’t sum an array of integers, you’ve given me important data about your skills as a programmer on that day.

  • seanmcdirmid 3 days ago

    I’ve never had an interview question that asked me to do something straightforward. If I did get a question like that, I would be immediately suspicious about what the catch was.

    • sokoloff 2 days ago

      For campus, we ask very straightforward questions to try to weed out the very lowest of coding fluency at that early stage. (Basically to try to guard against late track changers who haven’t actually coded but know that the SWE market is better than whatever their original interest was.)

      If I ask that of a senior candidate, it’s because I got a whiff of “this candidate might not be able to code at all, and I’d like to save us both some time and frustration.”

      • anonymars 2 days ago

        We ask of every candidate. At least half the time, I wish I'd done so before getting invested in the "experience" portion, when that ends up not actually translating to ability (and believe me, I am trying to help them to succeed)

        The beauty is, even a simple exercise answered quickly like "sum of integers" provides ample opportunity to learn a lot about how they think.

        Start digging in to testability, requirement changes, etc. Change it to a rolling sum (producing a sequence instead of a single value). Do they use an array or an iterator? Do they output straight to the console, or produce an actual function? Could the numbers come from other sources (database, queue, etc)? What might the tradeoffs be? If there's something they are unfamiliar with, are they quick on the uptake if you explain it? And so on.

      • seanmcdirmid 2 days ago

        I don’t know, I still think 22 year old me might still flub even a simple on the fly question (granting that I do my first internship with IBM writing lots of code when I was 20).