>Here is a coding exercise that will take around and hour. Once you finish it you never end up hearing back anyway and when you send a followup they still don't respond. How are can you know whether you should waste your time doing a coding exercise or not?
If you don't hear back, the company's not interested. Few people write rejection letters as few people react well to them.
We do coding exercises before we interview candidates, but try to keep them as minimalist as possible. It sucks for the candidate who is doing 10 of these a week, but companies waste huge amounts of time with people who are totally unqualified and the pre-screen is necessary to weed such persons out.
>If its not coding exercises its an excessive number of hour long interviews
Hiring someone is a big commitment. If a company wants to interview you a reasonable amount of times, be flattered and enjoy it. Recognize that this is a big commitment for them and they have a lot of candidates to choose from.
>or the employer requiring that you work with them for free for anywhere from a few hours to a week
Stay away from any company that wants you to work for free. Sure, a probationary contract is fine, but if they're actually expecting you to do any non-interview work without paying you for it, you don't want to be involved with that company. Don't even entertain these types of offers.
>Is there any way to weed them out before you waste so much of your time?
Look online for postings that discuss that company's hiring processes. In your cover letter, tell them that you're excited about the prospect of working for their company and ask about their interview process. This will hint that you're sensitive to excessive prospective-employer time consumption, and you'll probably get back some kind of answer with which you can make more of a decision. After you interview, post about the process online for future applicants' benefit.