I've spent some time pondering over this, so here's my 2 cents:

1. Build your product first.

2. It's expensive. If you still believe your idea is unique[1], hire help.

3. Algorithms are not patentable. Systems and methods are.

See: http://paulgraham.com/softwarepatents.html

If you want to patent an algorithm, you have to frame it as a
computer system executing that algorithm. Then it's mechanical;
phew. The default euphemism for algorithm is "system and method."
Try a patent search for that phrase and see how many results you
get.

4. It's a long process. See PG's footnote:

[3] Applying for a patent is now very slow, but it might actually
be bad if that got fixed. At the moment the time it takes to get a
patent is conveniently just longer than the time it takes a
startup to succeed or fail.

and this: http://paulgraham.com/startupfaq.html

There are two kinds of patent suits:
1. Random people suing you in the hope of getting money.
2. Competitors suing you in order to destroy you.
Until you're successful, you won't have to worry about the first
type. And once you are successful, you'll inevitably have a lot of
them to deal with, valid or not. So fatalism is the right plan for
type 1 suits.

and the classic: http://paulgraham.com/wealth.html

One way to put up barriers to entry is through patents. But
patents may not provide much protection. Competitors commonly find
ways to work around a patent. And if they can't, they may simply
violate it and invite you to sue them.

5. It's a defensive gesture, more than a monetization/licensing move.

See: http://www.codinghorror.com/blog/2007/07/the-coming-software...

6. See Modista vs Like.com (http://thenoisychannel.com/2009/12/26/r-i-p-modista/) and Roy van Rijn's ordeal with Shazam's patent lawyers for the ridonkulousness (that's a word, thanks UD) of the patent system. A blogpost describing how to create Shazam in Java receieved a letter from the patent holder requesting it be taken down. The audacity of it in the author's words:

A blogpost describing an algorithm can never be infrigement of
intellectual property. The whole idea of a patent is to preserve
an idea, to write down what it does and how it works for future
generations. A patent has to be publicly available for this sole
reason. This isn’t protecting their intellectual property, this is
plain censorship.

Source:
http://www.redcode.nl/blog/2010/07/patent-infringement/

And http://www.redcode.nl/blog/2010/11/patent-infrigement-part-2...

7. Also read the discussions on quora on whether patents are worth it:

http://www.quora.com/Software-Patents/How-important-is-paten...

And http://www.quora.com/Are-patents-valuable

8. And if you still want to go this route and hire a lawyer, ask the right questions (I've dealt with a few and have concluded that in the end, you're the best person to look out for yourself - the same goes for finances, exercise vs. hiring a personal finance manager, trainer, anything important for that matter):
http://www.inventorinsights.com/Find_Patent_Trademark_Attorn...

a. If the lawyers says his last patent applications were granted on the first submission, that's a bad sign. You're supposed to be as broad as possible, cover your bases, and go back and forth with the patent office a couple of times (see Amazon's 1-click patent).

b. Another rule of thumb is to check his registration number. I don't fully agree with this rule saying that the lower number, the better. Because that's like saying I'm going to hire the oldest guy for my startup because he's wiser. (I.e. he may just not be the right lawyer for you).

I couldn't figure out where I got all my information from, until I found this old bookmark:
Anyone have experience getting software patents? from your very own: http://www.hackerne.ws/item?id=73044

Oh my, I just realized my 2 cent post turned into a 500 word novel. I'll stop now.

[1] Wait! Final thought: my philosophy is to be
transparent about my ideas and share them. Because in the
end, it comes down to execution. One helpful tip is to not
just bounce ideas off other entrepreneurs (who often meet
you with a healthy dose of skepticism) but to ask women.
Guy Kawasaki's Art of the Start explained why better than
I can, so I'll just post the link to his page here:

http://brownieinmotion.ca/guykawasaki_women_killer_gene.png