On Constructing Low-Density Parity-Check Codes