Lattices and codes