i once needed a job so bad and was asked to solve a Rails challenge. i never did Rails before but i learned it and solved the challenge in a week. i also thoroughly documented my learning process and decisions. However i was rejected for being too fresh which i understood, i learned a lot during that week and even though i didn't get the job i feel that i achieved something. so i also don't see how you can lose with a contract-to-hire approach.