Like any other business , the only thing you have is the NDA and trust.
First, do not use any programmer outside USA (Indians are popular) where you have not legal recourse to legally protect your NDA.
Second, programmers are people trying to make a living just like you. Most (includng me) are not evil or out to get you.
Third, (someone said this) trust is a large factor. If you do not trust the prgrammer, do not use him.
Four, you want a programmer than can speak your langauge. Do not get a programmer that developes in the medical field and does not know what an inside quote is ....
The programmer will need to know most of your strategy so it can be developed, tested and released. There is really no much you can do about it.
As a trader you are basically running your own business. So as any business you will need good people around you. Unless you are on the mafia, all you have is legal recourses to protect you intellectual property.
The best thing for you to do is find someone you trust. If you are making money and paying your programmer accordingly then your relationship will be a long one. At then end you both will profit from it.
For example, I am a professional programmer entering day trading fulltime. I do have the ability to build my own tools, auto-trading processes, etc.. I do not have defined strategies and it is my biggest risk right now. If I were to find successful trader(s) to work together, I would jump on it. The trader(s) can worry about what they do best, and I'll worry about what I do best (programming) and it would be a perfect and long relationship.
I hope this helps ...