In most the world, and even in the US to some significant extent, publication prior to the filing date makes it impossible to obtain a patent, I think the US, unlike most of the rest of the world, allows you to exclude your own publications but not any response to them by others.
IBM has been known to publish things that they think not worth patenting so nobody else can patent them. Some of the things disclosed became worth $$$$$$$ within a few years.
There is at least one instance when a charity, for the cost of a few airfares and hotel bills, managed to stop a vast company backed by the US government getting an EU patent. The airfares paid for travel for somebody who could prove prior art.