There are few hard and fast rules, but guidelines.

In all the way upwind, or out all the way downwind is sometimes correct, sometimes completely wrong.

Upwind, whether or not to center the traveler depends on the wind strength, wave conditions, and crew weight. If you read Speed and Smarts (newsletter subscription), there have been some excellent articles recently on changing gears and trim for various crew weights. This includes traveler and sheet trim, and their advantages in a variety of conditions.

Downwind, normally the traveler is all the way out. However, if you have a spinnaker, the traveler needs to be centered (and main sheeted in) to keep the mast intact. Also, on non-spinnaker boats, centering the traveler going downwind can help depower the boat in certain conditions.

So, it's not all that simple. Definitely read all that you can and practice different techniques on your boat in a variety of conditions.

Hope this helps.

Mike