"How long should you travel on one tack before flopping over to the other?"
Well, you want to stay inside the laylines. And the wind is almost always shifting if you are near-coastal, i.e. morning and evening winds as the sea and land warm up differently. So if you pla the tacks "all the way" to both sides, but the wind is shifting towards (or away) from one of those sides...you'll find that even tacks can't take you to the same place anymore.
North Sails probably still presents the "North University" seminars and materials on racing taactics, they cover all this stuff and more VERY clearly. I've never heard anyone say they weren't well worth the price.