It's #3 that makes all the difference: a task that means something, and makes it worth one's while.
Duolingo wanted a functioning nontrivial (albeit sparse) app, expected to take 10 hours to write. I found it amusing on its own, but interviewed & got multiple offers elsewhere in less time.
That's actually harmful for getting quality candidates - "hot" prospects nope out of the process when they get an offer elsewhere.
A clever option is emailing the recruiter at Duolingo with something like "hey, I've got a competing offer, so the 10 hour coding challenge is really not something I have time for at the moment. Is there any other way to proceed through the hiring process?" Either way they answer, you're okay with.
I did that before during an interview with a pretty good company overall and the employer refused to accelerate the process or make an exception and just stopped the process.
Duolingo wanted a functioning nontrivial (albeit sparse) app, expected to take 10 hours to write. I found it amusing on its own, but interviewed & got multiple offers elsewhere in less time.