A major problem in the US legal system is illustrated here. Even though the activity the programmer is engaging in is both legal and ethical, the software company is attempting to quash competition by threats and implied means. Despite the fact that both parties know who will win and lose in court (either that or they have delusional lawyers, and the former is more likely) the software company will get its way most likely because the cost of mounting a defense is too high to even attempt it.
The problem is, this sort of bullying is borderline legal for US companies (see Abuse of Process) or similar entries on vexatious litigation. It doesn't usually trigger any kind of statutory protection unless it's repeated and obvious.
Similarly to the MPAA and RIAA lawsuits for file sharing, the larger corporate entity involved is relying on the fact that legal defense against them will cost substantially more than complying with their demands, whether the target of the legal action is guilty or innocent.
It's easy to see "simple" solutions to this problem - hire smarter patent examiners, for example or outlaw software patents. These don't fix the real issue, however, which is the excessive level of influence corporations have in the US courts and legislature, and the corresponding changes they have made to the original copyright and patent systems. Originally these systems struck a balance between public interest in a new invention or work, and the right of its creator to profit from it. Nowadays, the systems have been warped into near monopolies enforced by criminal and civil law that benefit certain limited entities. Not the public, and not even the original creator of the work, receive the bulk of the benefit. It is largely the corporations, legal entities created specifically to shield individuals from accountability for their corporate actions, that win here.
Long term, fixing the root of these problems will be very hard. It can be argued that the US Government is too firmly under corporate control for the people of the US to ever take it back. If that's the case, then the US is on a long downward spiral, and someday US citizens will think of these times as a golden age of justice and fairness.
Right now, the only way to have power to affect laws and systems like these is to become a large corporation. Money talks. It's interesting that Google seems to be working toward this end.
Personally, I believe the downward spiral in the US government will end the way such things always have... when the government officials who hold power die of old age, permitting younger officials with different values to lead. There are certain aspects of the system that have become immortal, like the two party lock on government and the spoils system that will be harder to change, but a limited human lifespan is still the saving grace of the US government.