A piece of advice that I received during my first "real" job, at Coopers & Lybrand, was that I had until 30 to make political gaffes that could be chalked up to immaturity. After 30, people expected you to know better.
Now that I've passed that point, I think that's it's a good general rule to follow. More good reading on this idea in a post from the Brazen Careerist (focuses mostly on what it means from a female point of view).

Hi, Peter. Thanks for linking to Brazen Careerist. I've written some stuff about turning 30 that applies to men, too.
http://blog.penelopetrunk.com/2006/07/31/navigating-the-quarterlife-crisis/
--Penelope
Posted by: Penelope Trunk | January 01, 2007 at 01:28 PM
Hi Penelope - great post! Funny enough, I'm right on target according to the BLS.
Posted by: Pete | January 02, 2007 at 12:36 AM