Yikes. Hopefully paid? What if the candidate is currently employed? Where do you expect them to find the time, knowing that they are not likely to be only applying to your company, but to others as well?
Isn’t this the same thing people who like whiteboard interviews say? “We know Leetcode is a hoop and the most motivated will grind 200 leetcode problems”
Thinking like this loses you candidates who are applying to multiple places. It's so hubristic to think that your job couldn't possibly be equally desirable to others.
Good luck finding remotely decent candidates without an extraordinary offer at the end of significant unpaid work.
Remember, it's a two way process; any candidate worth their salt is interviewing the company.
If the candidate is worth it to the company, they won't expect them to jump through absurd hoops, and will treat them with at least a professional minimum of respect.
That just exposes our different view of where the bottlenecks are - you believe there are a limited number of coders who are up to the task - I believe there are less opportunities than 'adequate to the task' coders.
That's a fair point regarding balance wrt jobs/devs though the general market would seem to indicate good devs have no problems getting jobs.
But I don't see how it carries over to companies expecting a huge investment from a developer up front (a week's work, unpaid!), without some major positive differentiator from the other companies requiring decent devs.
That isn't going to appeal to any developer with options.
What's the upside, why would they invest that time - just go to the non-presumptive company next door.
If the job's not worth it to the candidate, they won't complete the task.
Easy.