When building a deck, always nail a thinner member to a thicker member. Hot-dipped zinc-coated nails are a good choice. For more holding power, consider using either ring- or spiral-shanked nails, or go with deck screws. If using screws, it's best to pre-drill pilot holes.
Treat a sticking hinge by rubbing pencil lead along the spine. Alternatively, smear a little light oil along the hinge with a cloth, working the hinge back and forth until it moves freely.