Hacker News new | ask | show | jobs
by GFK_of_xmaspast 3539 days ago
I've had at least one point in my career where bubble sort was the right tool for the job.
2 comments

If I have to do a very careful performance decision on something as well trodden as a sorting algorithm, I'll walk to the bookshelves, pick up The Art of Programming, Volume 3, and let Knuth handle it for me.

As a software engineer, there are things I do all the time: Reading unfamiliar code and third party documentation, do some debugging (often based on logs), and try to write code that is well factored and thoroughly tested. I want to know whether any prospective teammate is good at those things for their experience level.

Interestingly enough, the general algorithm questions are easier the newer you are, and the less you know about all the topics I mentioned, because more often than not those are learned on the jobs, while the basic algorithms are learned in college. I end up reading papers on algorithms at work, but they are not algorithms that I expect to be general knowledge, and that I'd expect people to read on the job when they are applicable: How many candidates are going to be able to explain hyper log log, Paxos or Lamport clocks on command? Is knowing all of those three by heart a sensible pass/no pass signal? I for one don't think so.

But that's the whole point -- it's a corner case.

And hence, kind of silly to use as material to grill people on.

I do not think that these questions probe some corner cases. Rather these probe the general knowledge about the field.

Bubble sort question probes the understanding about the complexity theory, hopscotch hashing about concurrent algorithms and CAP theorem about problems with distributed databases.

Naturally when these questions are not open for discussion and instead only a short answer is expected then there is in my opinion something wrong with the interviewer or with the company.

You have to understand that the other side knowns in fact nothing about you and I find these questions to be quite fair to improve the situation.

Bubble sort question probes the understanding about the complexity theory,

It's just that, again, you're picking a very marginal example to do that with.

And more fundamentally -- simply asking someone "What's the complexity of $foo"? doesn't tell you anything about whether they "understand" complexity. It only tells you whether they've adequately memorized that particular cell on their crib sheet.

As they are thoroughly incentivized to do, thanks to people employing interview techniques like these.

I definitely agree with you that shallow quizzes are not very informative and are alone not a good methodology for job interviews.

Naturally this question in isolation is not very informative and it is hard to differentiate if the answer to it comes from a more general understanding or is just memorized. It has to be supported with other questions and wider discussion.

What I want to say is that in a larger context this question is still not unfounded and it is hard for me to consider this or any other listed questions as a signalling a dominant status.