As for how long to veg for:
First you have to detrmine how tall you want your plants to get when they are done. That is determined by two factors:
How much room do you have between the lights and the floor.
What kind of lights. The more powerful lamps ( 1000 watt ) will penetrate the foliage farther than the less powerful lamps ( 400 watt, cfl etc... ).
Also different strains will 'stretch' more or less than other strains. Some will hardly stretch at all and others will triple in height. I try and find all I can on whatever strain I happen to be running to find out about the peculiarities of that one strain.
So if you have room for only 3 feet ( as an example ) of total growth, then you want to veg for a shorter amount of time. If you have 1000 watt lamps and plenty of headroom then veg longer for bigger plants.
As an example, I have aproxamitely 6 ft. of usable space between the lamps and the floor. I use 3 and 5 gal. pots for my plants so taking that in consideration I really only have 5 ft. of usable space. I want to keep my plants about 12 to 16 inches away from the 400 watt hps lamps so they don't get burned, so that brings the usable space down to about 3 and a half to 4 ft. as a maximum size of plant that I can grow. If a strain doubles in size during flower, then I would veg until they are 16 inches in height at the maximum. Usually I flip them between 12 and 14 inches on average, but again, this is strain dependant.
Do a google search on your particular strain to see what you can expect from it.
Keep reading the forums and growing articles to learn all you can from other peoples mistakes and discoveries.
The most important tools a gardener has is knowledge, and inquisitive mind, and a willingness to learn from your mistakes.
Hope this helps, welcome to the wonderful world of growing your own.