I've since learned that you keep your ears to the ground at all times, in ANY company you work for.
You don't sit in your cube with your Dr Beat Headphones on, you listen to office talk. You overhear that phone call from a vendor asking where their overdue payment is. You notice the rise in closed-door meetings between management and the CFO. You make friends with the assistant that cuts the checks. When you've done it long enough, you know where you stand and when it's time to get the hell out before you're caught with your pants down.