logoalt Hacker News

kstrauseryesterday at 10:12 PM1 replyview on HN

Cowabunga. I do totally believe you, though. I was the guy doing fizzbuzz screens at a prior job. Before that, I would not have believed the failure rate for that step of the process. "The person has a job as a senior software engineer? Of course they'll ace fizzbuzz! It's insulting to even suggest otherwise!" And yet. I bet at least a third of the candidates simply could not pass that to save their lives. I went out of my way to be the friendly, relaxed, conversational interviewer, too. I never wanted to turn away a good candidate because I intimidated them or made them feel uncomfortable. And with all that, it still didn't work out.

A concrete example: one person could not get it through their head that they could write a function to return the correct value, then unit test that function with arbitrary known values. My question: "how do you know if it gets the right answer for 1,000,000,000,005?" What I wanted:

  def fizzbuzz(n): ...

  assert fizzbuzz(1_000_000_000_005) == "fizzbuzz"
or something similar. What they offered:

"OK, we'll loop from 1 to n and write each of the values out. Then we can compare the contents of that file with a test case!"

"How is that going to work for values like 1 trillion something?"

"We can compress it!"

"And how long is this unit test going to take?"

"Well, let's assume we can process a million answers per second..."

"Aren't you going to run out of hard drive space at some point?"

"We can use `tail` to get the last few lines!"

"OK, let's start over. Can you imagine any way to test some arbitrary value in O(1) time?"

"Nope, can't be done."

"Sigh."


Replies

nomelyesterday at 10:56 PM

There was a binary search problem that I gave in my interviews, in the context of test and measurement. So, instead of reading a value of the monotonic curve at some index in an array, you would have to set a power supply to some voltage (independent) then read the resulting value from a volt meter (dependent). So, exact same concept, different way to "index" and retrieve the value.

To help my explanation, I had a plot to show an example monotonic y=x^2 as a blue line and an example target value as a horizontal dotted red line.

One guy I had said something like, "You can start at the left of the image, then go down looking for a blue pixel. If the blue pixel is at the red line, you have found your value".

So, he wanted to search the image of the plot rather than the data behind the plot. I tried to get him to understand that was an example, and that we had the data, and that he would have to do the measurements himself, but it just resulted in a short interview.

I eventually told all the hiring managers that I could help interview again after their screening process was fixed, at which point I learned that they just removed software from the screening process to save time. This was a ~50% software position.

Same org as the dork above...