It seems that nowadays most decent developers jobs are accompanied with some sort of programming challenges that precedes the real interview: usually in the form of a non-trivial project requiring more than just a test about one or two programming concepts.
Previously, it seemed companies requiring such things were rare, and that the most you'd have to deal with is a 30 minute to an hour-long programming task. But now, the longer pre-interview challenge seems to be adopted in many companies, and it seems to be expected that these challenges are to be completed in one's spare time.
How do I adapt to this type of pre-interview screening? Should I be spending a lot of time (sometimes a half a day or more) on these challenges for just one company, or is this too inefficient and not what is expected?
