Ladder codes