I am a noob also, but I don't think the gas line length is any issue. As long as it reaches you c02 tank.
I have 10 ft of 3/16 ID beer line and I was still having a foam issue. I just installed the 10 ft, put my c02 on 8 psi. I have a slow pour, but the foam issue went away (for the most...