And the idea of patenting an algorithm is ridiculous. Algorithms are mathematical formulae, i.e. a representation of natural laws. Making them patentable is as pointless as patenting e=mc^2, or Planck constant. For the same reason gene patents are pointless and outright dangerous.
Algorithms are not mathematical formulae. Those are inherent in the universe.
Code is nearly as arbitrary as a novel. It expresses an idea in specific terms. There are lots of ways to write the same program, and lots of possible programs to write. There is only one correct way to write e=mc^2.
1. Algorithms are a representation of logic, not natural laws--something like quicksort is just a priori math, sensible regardless of what your natural laws are.
2. It's merely an application or representation of natural laws to design a steam engine or something too.