Code patents are a nightmare
This is a classic example of business stealing others work, thank goodness they don't apply in the UK :)
I'm sure I wrote programs in the 70's and 80's that I could have held to whole industry to ransom with, however I just was just delighted to come up with something new and original, that can't be patented.
Even today it is fun when you come up with a solution that is better than solution you can find on stack overflow etc.. and the joy of sharing the solution with your fellow coders is it's own reward (had one recently that was infinitely simpler and efficient than any other solution, it was just neat and I was very pleased shared it straight away) :)
This is what helps innovation where people share ideas and build something better, thank goodness Sir Tim had the same view with www.