I wholeheartedly agree, nicely said. The engineering hiring culture is great for picking up juniors fresh out of school, to shape these blank slates into whatever the company wants their programmers to think like. For experienced programmers, these tests do very little to show whether the candidate can identify anti-patterns, or write code that will still be maintainable or even readable after 5 years.
I think the most fair programming test I’ve had was to write a whole example mobile app from scratch to their spec as a take-home assignment. It shows one’s ability to structure a project, use of architectural design, and covering the code with unit tests. It also shows your code contribution habits via commit history. Unfortunately, nobody has time to write a whole app every time they apply for a job.
We should probably be looking more closely at peoples’ public github projects or literature they’ve written on programming to assess for hints of their true value.