I've looked into this quite a bit, and there is quite a lot to it if you want it to be perfect! I think i have it figured out pretty well, so sorry for the wall of text that follows here!
The factors in balancing your beer lines:
1. Temperature
2. Carbonation Level
3. PSI (Determined 1&2 Above)
4. Line Resistance
5. Line Length
6. Height (Vertical distance from center of keg to tap)
Most of the calculators and instructions don't take into account numbers 1 & 2 there, but these are very important as if you don't have your temperature/co2/PSI balanced to maintain your carbonation then balancing the rest of the system is pointless, as chances are you are going to have you adjust your PSI, which means you will need to recalculate to balance the rest of the system all over again!
Now, once you have balanced your system, the only variables that will be adjustable are temperature & PSI. So when you are initially balancing your system, try to pick values that are typical for the style of beer you are drinking most. Me personally I like to shoot for a co2 volume of 2.4, and a temperature of about 42F. Based on the numerous Co2 charts out there, I need 12 PSI at 42F to maintain carbonation.
Now that I have my typical PSI, i can balance the rest of my system around that. I use this calculator here:
http://www.iancrockett.com/brewing/info/kegbalance.shtml
You should enter:
1. Your desired PSI (12 in my case)
2. Your line resistance (for 3/16 line, 2 is a safe/typical value)
3. The height from center of keg to the tap (2 feet in my case)
This will tell you the line length you need. In my case, this is 5.5 feet.
After you have your system balanced, you may need to adjust temperate/psi for different beer styles. Keep in mind, the farther you go from your initial psi value (12 psi) that was used to determine your line lengths, the more unbalanced your system becomes and the more foaming you might get, so I try to adjust temperature as much as possible to maintain co2 volumes rather than adjusting PSI.
For example after balancing my system above, i want to serve beer with a higher carbonation such as a Wheat beer at 2.7 co2 volumes, but I don't want to adjust my PSI and have an unbalanced system. I would have to turn my temperature down all the way to 35-36F to maintain 2.7 carbonation at 12PSI.
If you do not want to adjust your serving temperature, your only other option to maintain balance is to adjust your PSI for serving. When you are serving from your Keg, put it to the PSI you balanced the system at (in this case 12). After you are done serving, you will want to return the PSI to the level that will maintain carbonation (in this case 15-16PSI will maintain 2.7 co2 at 42F) so that your carbonation level does not fall.
It can be difficult after you are done serving from your keg to remember to adjust the PSI back
Maybe I give this too much thought, but I hate wasting beer to foam (and hate even more drinking flat beer after the foam settles!)