Instead, use a concrete footing or treated lumber base plate in the post hole. Fill in around the post with a layer of gravel and then compact the top few inches with dirt. Allowing some flexibility in the ground mitigates the tendency of square timbers to twist above the ground where they are visible. Bolts can be retightened to compensate for the natural expansion and contraction of lumber. Nails should not be used for beam or header connections.
Screws are the preferable fastener for decking, because of their superior holding power.
If nails are used, hot dipped galvanized ring or spiral shank nails resist rust and have the best holding capabilities. Damp lumber will shrink and should not be spaced. The wider the lumber, the greater the tendency for cupping and warping to occur. Even if the joist system is perfectly square, lumber is not always dimensionally stable or exact. Take measurements every four or five runs and make corrections as the next runs are put down.