Sparse Hypergraphs with Applications to Coding Theory