Unless your an amazing developer, no one will probably want to steal your code.
If you mean, people in your office saying they did what you wrote, a repository and company policy on tagging code with your name (in the comments) work well. And if people are stealing your ideas as a whole, get a patent. Only takes a few days. I think I covered all the bases with this one.
