In general, any work performed 'for hire' ('contract') is the property of the purchaser when all the money
changes hands.
NOTE I am not an OEM nor have ever been one, but did work for an Engineering company once that built CNC burning machines.
THE above statement is wrong. Companies every day create/build machines for other companies/individuals. The work they do is their own, UNLESS they are following a customer guidline that has been laid out in contract.
Alot of people BUY new cars every year or so, we own that car and can sell it at any time BUT do we own in any rights to the creation??? NO.
This isnt too deep for any forum, you get what you pay for. If you buy a machine from someone they you OWN that machine and can do as you wish with it BUT you do not necessarily own any rights to its making...that includes the code if a plc is used. NOTE the car example above..today they use computers with a program..you may pay $25000 for a car (maybe more) but you dont own any rights to its computer program.
Whether my analogy seems proper or not, writing code is not the issue. The development/design/building can/is the issue. Companies deserve the right to protect what they do...that includes ways to password protect or copyright any programs for machines they build/develop.
There are some issues that make this get into legal moraffs..ie possession is 9/10ths of the law...ie they have the program and you dont then you make have to prove legally you are entitled to it.
I have the Engineers/Management include ownership of code/documentation when adding/building a new system, protects ME. If they buy a new machine from an OEM (which they have) and I cant obtain the code (because it wasnt part of the deal) then I have to live with it.
NOTE: I dont have to like tho, at this time I have a rewind machine that uses a KM plc that has a failed analog output, this plc has a high failure rate. The company that actually built the machine has closed, the company that did the electrical/control/programming WILL NOT give us the program NOR will they JUST replace the plc. For some the price they and others want may not seem like much ($60000) but to me its way overboard for the small system the rewind involves.
I am not worried about the machine, I will one way or another rebuild it. I will not deal with that Electrical company in the future. Some of us can recognize what is involved in a business and accepts that, its life in the real world.
Whether a painting, song, story, software, or program code then people should be able to protect what they do. This is not greed, its the ability to protect yourself from greed.
Its funny, all of US have had to learn to PAY for what we get...ie want a car..buy it. Want a house...buy it. Education...buy it.
NOW with PC's and the WEB everyone thinks that so much SHOULD be FREE.
WHY?