Has that actually worked for you on a structural bases? Is it worth the time it takes? (Cause not only does the developer-to-be write the code, you need people to judge it). How do you deal with the fact many candidates are under stress? Are you giving them new, non-trivial tasks, or do you give them (part of your) existing code base, and ask to modify it - the latter is for many companies a far more realistic scenario.
From the articles I've read, even a trivial programming problem is useful. It proves that they can code, not just that they say they can. If you want to go detailed and dig into how well they can code and if they can work with your coding style all the more power to you, but that does (as you note) take time and effort on the part of the interviewers. But even a simple 'take two numbers from the user, switch which variables they are in, add them together, and print the result' is better than hiring them and then finding out they are totally incompetent at anything coding related.