Re. the issue of the code being "stolen": under current law, your code is intellectual property. (Whether I personally agree with IP law - which I don't - isn't relevant here.) So, if you can't be assured that he won't "steal" your program, you have the option to license it to him under very strict and specific terms - "You are only allowed to USE the program, nothing more" and then sue him for copyright violation if he does anything else with it. If possible, get him to sign a contract making this explicit. (If you're in the US, you're in luck: under the DMCA, if you have any reason at all to suspect that he's breaching the license, one call to the feds and his computer gets seized. Yes, it's "censor first, ask questions later", and I don't like it one bit. But it definitely solves your problem.)