General overview of Intellectual Property rights

I'm not a lawyer so consult an Intellectual Property specialist as well

Dispelling Misconceptions

Ownership of opensourced code is retained by the original author

Interestingly enough, the most innovative areas of the country encourage employees to build their own projects off company time and off company resources

Most innovative companies split credit by sharing patents and rewarding innovation (which builds a culture of trust and encourages additional innovation)

It's actually very rare for people to steal code - consider this example where Google merely used an open source library and got sued for billions - the cost is very high when intellectual property theft or misuse occurs

Even if intellectual property ownership can't be enforced, theft or other kinds of misuse/cybercrime are likely to be punished

Overly broad Assignment of Inventions are likely unenforceable and may violate the law

Very little code is patented (very hard to secure a patent - see below) - most code intellectual property is handled through copyrights

Copyright

Copyright inherently applies to code (once it exists in a fixed state like a file)

Like other creative work, copyright applies whether or not it is explicitly copyrighted or licensed - you don't need the little copyright symbol, etc.

Enforcement of Copyrights

Ownership is inherent but defending one's ownership is a different matter

Code must be registered

Patent

Patent protection applies to novel functionality (not the specific implementation) of a piece of code

Thus, using open-source libraries to build a patent protected piece of software functionality is fully allowed

Thus, the specific language or exact manner in which the functionality is implemented is irrelevant - and the patent provides coverage for all languages used in implementations of that patent

Good States for Employees

Essentially, these states mandate that if you do something on your own time, on your own equipment, and that's not directly related to your main employment - it's yours, no matter what documents you sign

California (California Labor Code, § 2870).
Delaware (Delaware Code Annotated, Title 19, § 805)
Illinois (Illinois Revised Statutes, Chapter 140, §§ 301-303)
Kansas (Kansas Statutes Annotated, §§ 44-130)
Minnesota (Minnesota Statutes Annotated, § 181.78)
North Carolina (North Carolina General Statutes, §§ 66-57.1, 66-57.2)
Utah (Utah Code Annotated, §§ 34-39-2, 34-39-3)
Washington (Washington Revised Code Annotated, §§ 49.44.140, 49.44.150)


Licenses

To make code use-friendly, attaching a license is preferred

Three common open-source licenses include: MIT, Apache, GNU

These grant the right to patent projects on top of the code as long as the licenses remain and novel functionality is provided

Furthermore, these licenses grant explicit copyright to the enduser clarifying potential misunderstandings

Additional Resources

Startups
Gov
IP