If the idea is truly novel and non-obvious to an expert in your field, then I would support a patent, even if it is a software patent. I think the problem with some software patents granted are that they are not novel and not non-obvious to someone working in computer programming. It doesn't make sense to patent every single way that you can solve a problem but if it is indeed some method that is not known or could be developed easily by someone else working on the same problem, then I say go for it.
I think the key question to ask is if you gave the problem you solved to a large group of programmers, would someone come up with a similar idea when solving your problem. If no, then I say you can patent it. If you think that there is a good possibility that someone else would think of it, then I say that it is not patentable.
However, patent offices have some weird ideas about what can be patented and what can not. I think we should start a topic in General Discussion about software patents and what should be patentable and what cannot as well as list some real life examples.