Most racing sailors know that when the wind is oscillating you should tack on the headers. But when exactly should you tack? Should you wait until the wind shifts all the way to one side (and you are sailing the maximum header), or should you tack sometime before then?
In theory, you should tack when you are headed to your median heading. In an oscillating breeze, the goal is to sail on the lifted tack all the way up to the windward mark. If you wait to tack until you are headed as much as possible, this means you will be sailing on headers for a good part of the beat (you are sailing on a header whenever you continue past the point where you are headed to the median).
By tacking when you reach the median, you will always be sailing on a lift, and you will get to the next shift sooner.