If you drive the nails straight (perpendicular to the surface), then you'll have the end sticking out. If you lay the base of the nail gun flat onto the wood, then the nails will go in on an angle and not stick out the other side. (Ever notice that framing nailers say something like "21 degree...