Arithmetic, geometry and coding theory