Do half the people decline the coding assignment? A quarter? How many people pass the assignment?
My instinct is it's no different than interviewing for 2 hours. If it's for a coding job, it's probably more efficient for everyone involved.
If it were feasible, I'd actually prefer to pay candidates consulting-rates to do a (useful) 4-5 day project as a final interview. We've actually done this 3 or 4 times - but only when the candidate is thinking about moving his family from abroad to come work for us. We feel like there's an increased obligation on us to make sure we're sure in these cases.
Normally, though, it's just not practical. People are normally in jobs already, and asking them to take 4 or 5 days of holiday isn't fair. Especially if they were in the final stages of applying to 3 or 4 different companies. That's your entire year's holiday allowance down the drain.
At what point does a 4-5 day project morph into a 10 week internship or contract project? (Even after 10 weeks it can be tough to decide on an offer!)
If someone refused or demanded compensation, I would no longer pursue said candidate.
Thanks for sharing your insights into the process. Hiring is a very hard thing to do right. (Maybe impossible to do right, only possible to do less wrong)
The compensation is successfully landing the job. If you aren't willing to commit two hours of your time to landing said job then clearly you don't want the job.