According to related topic:
The best way, would be to get transparent agreement between parties, securing interests of both sides (like granting nonexclusive license to Company for parts used in Company's products and Clarifying that rights are released to Employee).
How to formulate such kind of agreement to secure interests of both parties in healthy, fair way (for both of them)? Area : Software Development with all related things (design, formulas, concepts, algorithms and data-structures, patents(?) ...).
Job relationship : Part of Employee's duties is software development (with all related activities), and Employee's is doing software development in spare time (assume healthy relationship: what Employee is doing in spare time is: not competitive, different area (like accounting software and computer games), not related with everyday tasks and Company's core products etc... - feel free to expand or paraphrase)
@Shoan - Yes (though laws vary from place to place). I wrote a letter
which said, "I'm working on [describe project], outside of office
hours and using my own equipment. This project doesn't compete with
[employer]'s business, because [example/explanation of why there's no
overlap]. Please confirm that project isn't covered by [IP assignment
and work for hire defined in employment contract], and that [employer]
disclaims all right, title, and interest in this project." I then
asked my employer to sign it: someone senior (who had signing
authority and could 'bind the company'). – ChrisW Feb 16 '11 at 14:52