Thanks to Open Source right now there are tons of public code from people, that's why we have created masterbranch.com a service to aggregate, analyze, and list all you OS but also with the option of include non-open source code (the code is not visible if the project is not open source).
Also, the idea of open sourcing a component, a side project, etc. and ask the candidates to contribute I think is a great way to have an idea about how they work.