We give a short proof that the coherent information is an achievable rate for the transmission of quantum information through a noisy quantum channel. Our method is to produce random codes by performing a unitarily covariant projective measurement on a typical subspace of a tensor power state. We show that, provided the rank of each measurement operator is sufficiently small, the transmitted data will, with high probability, be decoupled from the channel environment. We also show that our construction leads to random codes whose average input is close to a product state and outline a modification yielding unitarily invariant ensembles of maximally entangled codes.