That is why these tests are bogus. If they measured useful skills they wouldn't require any study.
I've been working with a lot of graph algorithms lately. I've already forgotten several I learned a couple months ago. That is OK.
The more interesting question for interviewees is where they would find the answer rather than whether they can implement algorithm X from memory.
If a candidate says "I'd use A* and maybe compare it to similar algorithms to solve the problem" that's enough. There's no reason they need that permanently committed to memory. Almost no one writes A* twice a year.
But place yourself on the other side of the fence : you just opened a new positions, there is a hundred of applicants and you have limited time to interview them all.
If you do spend 1 hour with each one of them, you have spent at least 200 hours on this task, not accounting for the back and forth to find a right schedule and all, probably spread over several months since most people are only available for interview from 17h to 20h or 12h to 14h.
Let's say you have 5 people dedicated to this, obviously technical ones for this kind of task, interviewing everyday for 4 hours (2h interview + 2h of debrief/internal discussion), that's still a whole month of interviews, everyday, for 5 people who are not HR and probably have better things to do, for one not that long interview for one position.
It's simply not efficient, and smaller structure can not handle that.
Alternatively, you can filter out 50% easily by making them take a programming test, with overall few false negative. There's a non negligible portion of false positive as well, but now from 100 applicants you have 50, so interviews are much easier to manage, you have more time to do it and the overall quality of interviewee is much higher.
So yes, in an ideal world, everyone would know the exact level of everyone just by looking at a CV and people would not need to prove anything by a test, but that's not how it is for now.
If you have a better solution, I'm sure a lot of people would be keen to hear it because recruiting is very costly and arguably one of the most sensitive part to build a company.
There are solutions like referals and such which works very well when they do, but when you have a lot of positions to fill it's hard to find enough people.
I would be careful with this kind of statements. It can also show that most programming jobs don't actually require a sophisticated level of knowledge.
As a crude comparison, it would be like a mathematician being asked to recite his times tables. Something he could probably do, given a bit of time and practice, but so outside the normal day-to-day stuff they normally do that it doesn't tell you much other than they spent time preparing. Which is fine if that's what you're looking to measure.
I think the point that the grandparent is trying to make is that if you take a group of developers with a good amount of experience and who everyone agrees are skilled in their field and administer a test with no warning/preparation, and none of them score very well, are they suddenly not very good developers or is the test not a very good predictor of whether someone is a skilled developer?
Going over the Hackerrank algorithms, how many times do you do things like fancy bit manipulation or game theory algorithms for building a simple CRUD web app? There are certainly programming jobs where bit manipulation is common (systems level / embedded code is one I can think of) but from my experience it's pretty rare to XOR bits in Javascript land.
Same with things like data structures. Again: in the world of C / C++, certainly you'd use trees / linked lists / etc. I do think is good to know about these concepts regardless so that this type of thing is more than just vague black box magic, but in Javascript CRUD web app land all of that stuff is mostly "behind the curtain", so it isn't the most necessary skill to have.
Hackerrank in fact seems really poorly suited to web development positions. No tests on CSS, HTML, design patterns (yer model-view-* patterns, dependency injection, responsive web design, etc etc.), data transmission structures (eg JSON and XML), browser structure (eg the DOM), dynamic communication (eg Ajax/XHR, Websockets), etc.
Heck, Hackerrank may show that you can write some SQL, but ironically for something with "hacker" in it's name, it can't show that you know about how to mitigate the common "web hack" tricks (eg SQL injection, XSS vulnerabilities, URL fuzzing), something I would think would actually be way more relevant for any public CRUD web app.
It is just an advanced version of FizzBuzz : even if it's not enough to determine whether someone is good or not, it definitely burns people that are not able to code at all. It also provide talking points for the interview afterward about coding style and all.
Of course, it's not sufficient, but it's just a stage among others if the interview is done correctly, and it's a useful one
It really depends where you apply. Some companies have interview processes that require a very specific preparation and it can be very time-consuming.
I applied once for a quant position. The interviewer didn't really care about my resume and we started directly with logic and probability puzzles (a few phone interviews). I was about 35 at the time, and this was the type of things I would have been more comfortable doing when I was a 20-years old math undergraduate. On one hand, I like that they put everyone on an equal ground. On the other hand, I think it's a bit of a shame that they dismiss many years of experience.
Well, yeah. I do that too and I've been out of university for 5 years.
You have to prepare for interviews, and to resharpen your skills when you're changing jobs, it's the same whether you're 28 or 48.
I understand finding time is harder when you have a family and all, but it should not take much more than a few hours to get back to a decent skill level, and then you get to the interview stage where you can really stand out with your actual real world experience.