- A non-trivial take-home exercise and give them a week or two to complete. This should have higher weight on the decision instead of the "Google doc coding" as most likely that's the type of code they'll be shipping to production.
- Use the onsite interviews to improve upon the exercise and/or to get into the nitty gritty details, and also to make sure this is the type of person people would enjoy working with.
- Allow candidates to run the code and to look things up (even Einstein didn't remember how to do long division, he looked it up).
- Give people the benefit of the doubt and assume they are not liars or thieves. If you end up having certain doubts, ask yourself why you have those doubts and take appropriate steps to remove doubts.
And let's be real. Do you think someone with X years of experience having worked at multiple companies (small and big corps) was hired because they couldn't code?
Nitpick: the idea that Einstein struggled with school-level mathematics is a myth. I would be very surprised if he ever had to look up the procedure for long division.
If you'll end up having to do a face to face analysis to make sure someone didn't cheat on a big take home assignment like that, why not just skip to the face to face analysis?