This ignores different realities in how programmers and writers work. If you're hiring a writer, you cam ask to see his previous work. Unless he worked for CIA, he can point to books he's written, articles he published etc. You can then read them and that's all you need to make a decision if he's competent enough (you might still interview for cultural fit). If you're hiring a senior engineer that claims he spent las…
Not Big Table code of course, just some interesting code examples tailored to the position being negotiated.
Worried about people passing off copy/pasted code on github? That's what the interview is for. It's great to be able to discuss code that someone has written after you've taken some time to review it. They should be able to have a discussion about the code, their design choices, what they would do differently given a twist in the requirements, etc. If they can't do that: then even if they genuinely wrote the code they don't understand it enough.
I feel I should stress that the code doesn't have to be the next big open source project forked/watched by thousands.
Not comfortable putting code up on github because people might see it? I get that, it is scary to put your code out in public. In that case, a simple Dropbox (or whatever) shared folder would suffice.