Finite geometries and linear codes