Hacker News new | ask | show | jobs
by twic 3539 days ago
Using something like HackerRank as a screen to check that candidates can actually code seems like a good idea to me. But that means setting problems which depend on that, and not specialist knowledge.

For example, an old employer of mine used something like "write a function which, given two strings representing durations down to a hundredth of a second in the format HH:MM:SS.SS, prints the difference between them, in the same format". To do that, you need to do some basic parsing, some simple maths, and some formatting. You don't need clever algorithms.

On the other hand, a problem which requires a "trickily smart O(N) DP solution" requires specialist knowledge, and is not simply a test of whether someone can code. If a company actually needs people who are good at particular algorithms, then this may still be a useful test. But barely any do.

A more ambiguous case is a test i did recently which asked for a function which printed all primes smaller than N. As it happens, i know a couple of (simple!) algorithms for finding primes, so i just coded one. But i know people - including some brilliant colleagues - who haven't studied maths beyond secondary school, and so won't know those algorithms. They might work one out, given time, but that's time they don't have to spend coding.

2 comments

Frankly, coming up with an inefficient but simple algorithm for finding primes from first principles should work. That is, accumulate primes found so far, check if the next number is divisible by any of them, or even by any number lower than the latest scanned, if you're really bad at number theory, but fine with logic.

Many Project Euler problems are about such special things that you likely didn't know before encountering the problem, but the definition suffices.

"Hackerank" is just the "chitty" culture taking over unfortunately its designed for those who only went into the biz for primarily financial and /or family/cultural pressure