Also, I highly suspect companies who are having trouble hiring senior devs are having issues stemming from not paying enough for their given situation.
Companies like Square and Stripe have project-centered rounds during their onsite that allows them to assess these skills without giving a take home.
In my case, I do a lot of writing these days and, if someone were to ask me to write a thousand word analysis on some topic I was familiar with, I certainly could knock that off in a few hours. But, assuming I agreed to do it at all as part of the interview process--I'd be far more inclined to just give them a bunch of links to my work--I'm going to put the effort in to come up with a tight, polished product.
I'm not going to jump through stupid hoops, but I love jumping through interesting hoops.
1. Require developers to code on demand during an interview (personally, I have a hard time with this; the pressure of an interview is not a normal working situation).
2. Allow someone to do it on their own time, under no time pressure. (I advocate paying them for their time at a fair market rate).
Do you see another way of a senior developer demonstrating their abilities without hitting either of the two above?
For the junior folks, sure: have them burn through homework.