I think it should be fine to copyright and protect code, and have the right to sell it.
BUT I also think that, if somebody were so inclinded, they could write their OWN code to do EXACTLY the same thing. For example, how MS patents the "way" in which software can automatically install itself. Which is why Linux, for so long, required command lines to install, because of patents on auto-installing code. My details are fuzzy on this, but it's something like that.
The way I think is that, there is only SO MANY ways to program something! I mean, if 5 companies patent and copyright 5 ways of doing one objective, that pretty much means nobody else can program their stuff to do that as well. So they are force to find a new way entirely. That is just dumb.
It's like saying, "I copyrighted 1+1=2, so nobody else can use it". Alright, so in order not to infringe, my program uses 1+2-1=2, and I copyrighted that. Now company three, not to be sued by company 1 or 2, writes his code like 4/2=2. And so on and so on. It is retarted I think. In the programming world, in order to complete a task, there is only so many ways and so many languages you can use to complete a task, if everybody has copyrights on all the different ways to code, how the heck can they program something without eventually mimicking or downright writing the same code for the same task!?
I think it's great that MS has their own proprietary code and rights to their software. But I don't think they should be able to stop someone, from writing a new OS, entirely from scratch, to EXACTLY mimick Windows. If I see a program that is really cool, and want to take the months or years it would take to write it myself, I think that should be allowed, so long as I don't steal THEIR code, but instead write it myself. Even if I use the same programming language, and end up using some of the same techniques.
I bugs me to think that I could write a program, and then have some big muscle company pour their wrath down on me, saying they own the rights to X and Y and I can't do that in my program. People should creative freedom to use these languages and write WHATEVER they want to, even if it mimicks or downright copies some other software. I mean, hey, if they spent all the time and research to write it from scratch, so be it.
This is OK in the open source world, which is why there are 10s of Linux distros that all look and act about the same. But only ONE Windows OS.
Anyhow, maybe my thinking is screwed, but I'll stop rambling now.