The problem, at root, is that the courts are confused about the nature of software. The courts have repeatedly said that mathematical algorithms can't be patented. But many judges also seem to believe that some software is worthy of patent protection. The problem is that "software" and "mathematical algorithm" are two terms for the same thing. Until the courts understand that, the laws regarding software patents are going to be incoherent.
If you ever find yourself arguing with someone who supports software patents - just link to this article by Timothy B. Lee. An excellent and concise look at where software patents come from, the inability of courts to understand software, and why the Supreme Court of the United States seems so hesitant to reaffirm its own rulings about the intrinsic inability to patent software. Key passage:
One reason the courts might hesitate to do this [put an end to software patents] is that it would be a big blow to the bottom lines of some of the biggest companies in America. Such a ruling would have invalidated thousands of dubious software patents held by trolls, but it also would have invalidated Amazon.com's infamous 1-click patent, the "data detectors" patent Apple used to sue Samsung, and Google's patent on its search ranking algorithm. Invalidating software patents would have wiped billions of dollars off the balance sheets of some of America's largest technology companies. The Supreme Court generally tries to avoid making waves, and those would have been some very big waves.
And there you have it. Large American technology companies want to have their cake and eat too - they supposedly support patent reform, but only reform that weakens the position of small players (which happens to include non-practicing entities) while strengthening their own positions.Lee ends with the simile that I have used on numerous occasions in the past - one that perfectly sums up the inherent ridiculousness of patenting software:
The mathematical ideas in software, like the literary ideas in novels, are part of society's common intellectual heritage. Neither should be eligible for patent protection.