DEV Community

Discussion on: I failed an interview because of an algorithm

 
luiz0x29a profile image
Real AI • Edited

I don't believe that "you need to know X to be a programmer".
No, to be a programmer you don't need to know X, but if you say you know JS, then knowing Array.sort and how to use it is pretty much a given.

Context is precisely the problem. Interviews are a totally artificial context.
The probably just did random things because of the interview, the time limit, that's not how you approach any problem.

Ironically that's how lots of bad companies work, so by doing some interview like that you get to know that they can't manage and only work on time pressure, not on results.

Also, base knowledge like sorting is so commom and basic to being a programer, it will never become obsolete. Javascript will, but all programming languages (given the same paradigm) will have some way or another to sort things.

So I do disagree that you don't need to "know X" to be a programmer. Its like saying a plumber don't need to know any "X", X being pipey thingies.

You don't need to know trivia about the language. JS has a lot of quirks, but you do need to have some foundations in programming, sorting is one of those.
We do have to have some standard of cut, that's the entire purpose of the interview, its just a "search problem" , I do concur that some processes are stupid, like whiteboarding.
No, its not a russian roulette, because there's all the other "human" aspects, not everything should be about programming.

Thread Thread
 
luiz0x29a profile image
Real AI

Actually in some cases you don't need to know "X", if you are doing SQL, for example, or Prolog. Sorting is done by the tool, you do need to know relational algebra in case of SQL, or propositional logic and unification in case of Prolog.
I'll all depend on the context of what's being done, of course.

But sorting is a basic thing a programmer need to know (at least how to use it), its together with things like conditionals and looping/recursion.