I still don’t understand why these software interviews do this. Especially when the work in question, is derivative, and mostly just reformulating other ideas and libraries.
It’s like, how often are you going to have to reinvent your own Red Black Binary Search Tree to solve some obscure business problem? Most of the time, the business doesn’t give a damn. Just throw your data into a database, and be done with it. Then use some queries to filter through your data, and get the data you need to solve the problem at hand.
And usually, by looking at someone’s code style, you know how good they really are. You can determine, if (1) they are at a hackerish level and their code has bugs and occasionally breaks, or (2) if their code is really solid software engineering level quality that’s airtight and can survive anything you throw at it.
I prefer these interviews rather than take-home projects, which usually take longer and can be cheated.
A company once sent me a really long take home exercise that took like 3 full days to implement to completion. I said: no thanks, and in the same 3 days I had multiple interviews and even got an offer.