I recently found myself in the position of writing a small amount of code as an independent contractor. This code interfaces with a popular platform used by specific academic researchers to provide missing functionality.
Obviously, the code I am producing is "work for hire" and therefore the property of the body that hired me.
While researching the problem, I found that a huge number of people out there want/need the functionality I coded.
So...
The code I am producing under my current contract is written in PHP and uses a MySQL database.
If, after this project is done and I get paid, could I rewrite this in a completely different manner and sell it?
For example, could I create the same functionality in, say, Python or Ruby with a nosql database and then market it as a different product?
I guess the question is this... they clearly own the code I wrote for them... but do they own the ideas I had to solve the problem?