Let's say I made software initially publicly available, but some time in the future I decided I wish to patent it. Could I? Is there any time limit on how long after making software publicly available that I have to patent it?
In the United States, for any invention you have 1 year to file:
35 U.S.C. 102 Conditions for patentability; novelty and loss of right to patent. A person shall be entitled to a patent unless —
(b) the invention was patented or described in a printed publication in this or a foreign country or in public use or on sale in this country, more than one year prior to the date of the application for patent in the United States
Note that as of March 2013 (for apps filed after then) these rules change in the US; there is still a one-year grace-period -- but only as to your own disclosures. If someone else publishes the concept (or something that would make your invention obvious) before you file then you are (probably) out of luck.