What you say in public is public, whether you think so or not.
Mitt Romney's comment at a private fundraiser and Donald Sterling's private comments to his girlfriend were captured on digital devices and turned into very damaging public issues. Trying to explain away their comments by where they were uttered would be pointless and irrelevant. You said them, someone heard them and they were posted for all the world to see and hear.
The best way to avoid an embarrassing disclosure is not to say anything in an unguarded moment or outside a secure location. With smartphones everywhere and the prospect of an army of drones overhead, secure locations may be increasingly hard to find. That argues for keeping some thoughts to yourself.
If you have any illusions about keeping information or comments confidential in an open setting, get rid of them. It really is a delusion.
A better assumption to make is that everything you say is being recorded by someone — from a government spy to a teenager randomly shooting video to while away time. This assumption should chasten you to be disciplined in what you say.
Disciplined speech doesn't mean constrained, boring speech. You just need to think before you speak. You can be informative, engaging and even funny. Just not stupid or careless.
The same holds true for written materials you distribute. Once the paper or computer disk leaves your fingers, consider it in the public domain, just as you would expect by posting something online. As the saying goes, "It's out there." And it's not going away, or at least you can't assume it will go away.
Being careful and thoughtful in what you say and promulgate leads some to clam up and say nothing. Unfortunately, saying nothing is saying something and it usually isn't good. It's a lot like a witness who claims Fifth Amendment protection from self-incrimination. He doesn't indict himself in testimony, but in the minds of everyone watching, he is guilty of something.
Good sense may be the best resource to employ in this new world of glass houses. Just keep in mind that anyone could be looking at any time and put on your pajamas before going to bed. You will sleep better at night.