Can I still patent an invention after publishing a paper or blog post?
In the United States, yes, for up to one year after your own publication; in Europe and most other countries, no. Under 35 U.S.C. 102(b)(1), a disclosure made by the inventor, or by someone who obtained the subject matter from the inventor, within one year before the US filing date is not prior art against the inventor. Japan, South Korea, Canada and Australia also offer 12-month grace periods, although the conditions differ and Japan's requires a declaration at filing. Europe, under Article 54 EPC, applies absolute novelty: a paper, preprint, blog post, thesis, GitHub README or conference poster published before the filing date destroys novelty for anything it enables, and the only exceptions (Article 55 EPC) are disclosures made through evident abuse against you and displays at officially recognised international exhibitions, each with a six-month window.
What this means in practice: if the paper is already out, the US route is usually still open, and a US provisional filed quickly preserves the option while you assess what else survives. Anything the publication did not enable, such as a later improvement, a specific implementation or an unpublished parameter range, remains patentable everywhere. arXiv preprints count as publications from the day they appear, so the order of operations for a research-heavy startup is: file first, post the preprint the next day. A thesis deposited in a university library is also a publication, which regularly catches spinouts. The relevant date is when the content became available, not when the journal issue printed.