I keep hearing this, and perhaps I'm not part of the problem. But at a prior company I worked for (which was quite good), our go-to phone screen was "implement min()". This screened an absolutely staggering (to us) fraction of the candidates. I don't see how asking someone who claims to have years of experience in engineering write a for loop is stressful, and anything but real world; I write for loops all the time, and I don't consider that the hard or core part of my job.
(One of our followup questions, usually on-site, amounted to: "can you write a for loop that involves two pointers?"; too many candidates would give them absolutely terrible names like "i" and "j", and not be able to mentally maintain what they actually meant, or were for.)
I like to ask people to "implement reverse()" with similar filter results.
I wonder if there is a cultural component to it, I'm also in the UK.
Also interesting field you are in, that is tangential to something I'm contemplating as a future project :).
At some point interviewers must get it, that these artificial test environments bear no relevance to how we write code in the real world, and putting these false constraints on a candidate just creates stress, and in no way communicates their competence.
Luckily for me (as an interviewer) I do get it. And I suspect that's part of the reason why I've not had a developer leave my company in the 12 years we've been running. I do a first interview, which I keep super chilled and chatty, just trying to get the candidate to relax. I'll focus on projects on their CV, asking high-level questions. Again, no stress. Then if they say anything interesting about a part of a project I may drill down a bit more to make sure they understand the subject they're talking about. Which is slightly more stressful, but if they're competent, they'll know.
I very rarely go into algorithms and data structures. It'll usually be if I'm concerned about a junior dev not having enough CS knowledge.
I then send them an email post interview (if I think I want to see them again for the second interview). The email will have a link to a partially complete project, I ask them to finish it based on a written spec. It shouldn't take more than 45mins - 1hour.
The request in the spec is intentionally a bit obscure. I put at the end of the spec that "If you have any questions or problems, please email me. You won't be marked down for this." The obscureness of the test is to see who emails me to ask for help. That for me is a real positive sign.
So I'm trying to create a real world test:
* A spec to follow
* Programming in a comfortable environment
* Access to dev resource (Google/Stack Overflow/Their friends)
* Access to their boss for advice
And to avoid anybody trying to game it and blag their way with code that they didn't write, I quiz them about their decisions in the second interview.
It works amazingly well. My dev team is something I'm super proud of. A good team of people who collaborate well and believe in the product. No hierarchy or in-fighting. It's a happy place to be. So I endorse this method :)
[1] https://github.com/louthy/language-ext