←back to thread

191 points foxfired | 1 comments | | HN request time: 0s | source
Show context
sfn42 ◴[] No.45114619[source]
> The interviewer asked: "If you have an array containing a million entries, how would you sort the data by name?" [...] Surely the right answer was to explain why you shouldn't be sorting millions of records in JavaScript. Pagination, database indexing, server-side filtering. So I said exactly that.

> In real-world engineering, simplicity is king. In interviews, complexity is currency.

Seems like a bit of a contradiction.

replies(1): >>45137609 #
CRConrad ◴[] No.45137609[source]
Yes, obviously? It was an example, intended to show how using the language of day-to-day engineering in interviews is a mistake.
replies(1): >>45140172 #
1. sfn42 ◴[] No.45140172[source]
The mistake was not answering the question. There would have been nothing wrong with expanding your answer with notes about how you might avoid having a million items in an array in the first place, but the question was how do you sort it when you have it and you should answer the question you're asked before answering questions nobody asked.

It has nothing to do with language of engineering, and everything to do with him not answering the simple question he was asked. And then he goes on to complain that interviewers value complexity right after the story about how he fumbled a simple question by overcomplicating his answer to the point that it didn't even answer the given question at all.